!1 add package

From: @fly_fzc
Reviewed-by: @solarhu
Signed-off-by: @solarhu
This commit is contained in:
openeuler-ci-bot 2020-09-11 22:18:48 +08:00 committed by Gitee
commit dc59ee9199
4 changed files with 74 additions and 0 deletions

BIN
4.2.0.tar.gz Normal file

Binary file not shown.

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

47
nodejs-estraverse.spec Normal file
View File

@ -0,0 +1,47 @@
%{?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: https://github.com/Constellation/estraverse/archive/%{version}.tar.gz
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
%autosetup -n estraverse-%{version}
%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: "."