!1 add package

Merge pull request !1 from 付安安/master
This commit is contained in:
openeuler-ci-bot 2020-09-08 18:40:28 +08:00 committed by Gitee
commit 981bbdbcd9
4 changed files with 73 additions and 0 deletions

BIN
0.4.13.tar.gz Normal file

Binary file not shown.

23
dl-tests.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
tag=0.4.13
set -e
tmp=$(mktemp -d)
trap cleanup EXIT
cleanup() {
set +e
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}
unset CDPATH
pwd=$(pwd)
pushd "$tmp"
git clone https://github.com/hij1nx/EventEmitter2.git
cd EventEmitter2
git archive --prefix="test/" --format=tar tags/${tag}:test/ \
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
popd

46
nodejs-eventemitter2.spec Normal file
View File

@ -0,0 +1,46 @@
%{?nodejs_find_provides_and_requires}
%global enable_tests 0
Name: nodejs-eventemitter2
Version: 0.4.13
Release: 1
Summary: A Node.js event emitter implementation with namespaces, wildcards and TTL
License: MIT
URL: https://github.com/hij1nx/EventEmitter2
Source0: https://github.com/hij1nx/EventEmitter2/archive/%{version}.tar.gz
Source10: dl-tests.sh
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(nodeunit)
%endif
%description
A Node.js event emitter implementation with namespaces, wildcards,
time to live (TTL) and browser support.
%prep
%autosetup -n EventEmitter2-%{version}
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/eventemitter2
cp -pr package.json index.js lib/ \
%{buildroot}%{nodejs_sitelib}/eventemitter2
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/nodeunit/bin/nodeunit test/simple/
%{nodejs_sitelib}/nodeunit/bin/nodeunit test/wildcardEvents/
%endif
%files
%doc README.md
%{nodejs_sitelib}/eventemitter2
%changelog
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.4.13-1
- package init

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: hij1nx/EventEmitter2
tag_prefix: "^"
seperator: "."