fuanan add package

This commit is contained in:
fwx913451 2020-09-01 10:20:03 +08:00
parent 540644f1a8
commit 556330914c
5 changed files with 76 additions and 0 deletions

23
dl-tests.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
tag=1.5.0
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 git://github.com/Constellation/estraverse.git
cd estraverse
git archive --prefix="test/" --format=tar tags/${tag}:test/ \
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
popd

BIN
estraverse-4.2.0.tgz Normal file

Binary file not shown.

49
nodejs-estraverse.spec Normal file
View File

@ -0,0 +1,49 @@
%{?nodejs_find_provides_and_requires}
%global enable_tests 0
Name: nodejs-estraverse
Version: 4.2.0
Release: 1
Summary: ECMAScript JS AST traversal functions
License: BSD
URL: https://github.com/Constellation/estraverse
Source0: http://registry.npmjs.org/estraverse/-/estraverse-%{version}.tgz
Source1: tests-%{version}.tar.bz2
Source10: dl-tests.sh
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(coffee-script)
%if 0%{?enable_tests}
BuildRequires: npm(chai) npm(espree) npm(mocha)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/estraverse
cp -pr package.json estraverse.js \
%{buildroot}%{nodejs_sitelib}/estraverse
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/mocha --compilers coffee:coffee-script/register
%endif
%files
%{!?_licensedir:%global license %doc}
%doc LICENSE.BSD
%{nodejs_sitelib}/estraverse
%changelog
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 4.2.0-1
- package init

4
nodejs-estraverse.yaml Normal file
View File

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

BIN
tests-4.2.0.tar.bz2 Normal file

Binary file not shown.