!1 package init
From: @zhanghua1831 Reviewed-by: @solarhu Signed-off-by: @solarhu
This commit is contained in:
commit
2f3658099c
BIN
1.9.1.tar.gz
Normal file
BIN
1.9.1.tar.gz
Normal file
Binary file not shown.
65
nodejs-underscore.spec
Normal file
65
nodejs-underscore.spec
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global enable_tests 0
|
||||||
|
%global installdir %{_jsdir}/underscore
|
||||||
|
Name: nodejs-underscore
|
||||||
|
Version: 1.9.1
|
||||||
|
Release: 1
|
||||||
|
Summary: JavaScript's functional programming helper library
|
||||||
|
License: MIT
|
||||||
|
URL: http://github.com/jashkenas/underscore
|
||||||
|
Source0: http://github.com/jashkenas/underscore/archive/%{version}.tar.gz
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: web-assets-devel
|
||||||
|
BuildRequires: nodejs-packaging uglify-js
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(phantomjs)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
Underscore.js is a utility-belt library for JavaScript that provides support
|
||||||
|
for the usual functional suspects (each, map, reduce, filter...) without
|
||||||
|
extending any core JavaScript objects.
|
||||||
|
|
||||||
|
%package -n js-underscore
|
||||||
|
Summary: JavaScript's functional programming helper library
|
||||||
|
Requires: web-assets-filesystem
|
||||||
|
%description -n js-underscore
|
||||||
|
Underscore.js is a utility-belt library for JavaScript that provides support
|
||||||
|
for the usual functional suspects (each, map, reduce, filter...) without
|
||||||
|
extending any core JavaScript objects.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n underscore-%{version}
|
||||||
|
rm -f underscore-min.*
|
||||||
|
|
||||||
|
%build
|
||||||
|
/usr/bin/uglifyjs underscore.js -m --source-map underscore-min.map \
|
||||||
|
-o underscore-min.js
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/underscore
|
||||||
|
cp -pr package.json underscore.js underscore-min.js underscore-min.map \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/underscore
|
||||||
|
mkdir -p %{buildroot}%{installdir}
|
||||||
|
cp -pr underscore.js underscore-min.js underscore-min.map \
|
||||||
|
%{buildroot}%{installdir}
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{nodejs_sitelib}/phantomjs/bin/phantomjs \
|
||||||
|
test/vendor/runner.js test/index.html?noglobals=true
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc LICENSE README.md
|
||||||
|
%{nodejs_sitelib}/underscore
|
||||||
|
|
||||||
|
%files -n js-underscore
|
||||||
|
%doc LICENSE README.md
|
||||||
|
%{installdir}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 20 2020 zhanghua <zhanghua40@huawei.com> - 1.9.1-1
|
||||||
|
- Package init
|
||||||
4
nodejs-underscore.yaml
Normal file
4
nodejs-underscore.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: jashkenas/underscore
|
||||||
|
tag_pattern: "^"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user