commit
599faae649
BIN
3.0.0.tar.gz
Normal file
BIN
3.0.0.tar.gz
Normal file
Binary file not shown.
62
nodejs-with.spec
Normal file
62
nodejs-with.spec
Normal file
@ -0,0 +1,62 @@
|
||||
%{?nodejs_find_provides_and_requires}
|
||||
|
||||
%global enable_tests 1
|
||||
|
||||
Name: nodejs-with
|
||||
Version: 3.0.0
|
||||
Release: 1
|
||||
Summary: Compile time `with` for strict mode JavaScript
|
||||
License: MIT
|
||||
URL: https://github.com/ForbesLindesay/with
|
||||
Source0: https://github.com/ForbesLindesay/with/archive/%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
|
||||
%if 0%{?enable_tests}
|
||||
BuildRequires: mocha uglify-js
|
||||
%endif
|
||||
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%autosetup -n with-%{version}
|
||||
find . -type f -exec chmod -x '{}' \;
|
||||
for i in LICENSE README.md; do
|
||||
sed -i -e 's/\r$//' "${i}"
|
||||
done
|
||||
|
||||
%nodejs_fixdep uglify-js '^2.2'
|
||||
|
||||
|
||||
%build
|
||||
#nothing to do
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/with
|
||||
cp -pr package.json index.js vars.js \
|
||||
%{buildroot}%{nodejs_sitelib}/with
|
||||
|
||||
%nodejs_symlink_deps
|
||||
|
||||
|
||||
%if 0%{?enable_tests}
|
||||
%check
|
||||
%nodejs_symlink_deps --check
|
||||
if [ ! -d node_modules/uglify-js ]; then
|
||||
ln -sf /usr/lib/node_modules/uglify-js node_modules/uglify-js
|
||||
fi
|
||||
/usr/bin/mocha -R spec
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%doc LICENSE README.md
|
||||
%{nodejs_sitelib}/with
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 11 2020 wangxiao <wangxiao65@huawei.com> - 3.0.0-1
|
||||
- package init
|
||||
5
nodejs-with.yaml
Normal file
5
nodejs-with.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/ForbesLindesay/with
|
||||
version_control: github
|
||||
src_repo: ForbesLindesay/with
|
||||
tag_prefix: ""
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user