52 lines
1.3 KiB
RPMSpec
52 lines
1.3 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global packagename docopt
|
|
%global enable_tests 1
|
|
Name: nodejs-docopt
|
|
Version: 0.6.3
|
|
Release: 1
|
|
Summary: A command line option parser that will make you smile
|
|
License: MIT
|
|
URL: https://github.com/scarnie/docopt.coffee
|
|
Source0: https://github.com/scarnie/docopt.coffee/archive/%{version}.tar.gz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: coffee-script mocha npm(chai)
|
|
%endif
|
|
|
|
%description
|
|
A command line option parser that will make you smile
|
|
|
|
%prep
|
|
%autosetup -n docopt.coffee-%{version}
|
|
|
|
%build
|
|
%{_bindir}/coffee -c docopt.coffee
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
cp -pr package.json *.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{__nodejs} -e 'require("./")'
|
|
%{_bindir}/mocha --compilers coffee:coffee-script/register -R spec
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md examples/
|
|
%license LICENSE-MIT
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
%changelog
|
|
* Mon Oct 30 2023 liyanan <liyanan61@h-parners.com> - 0.6.3-1
|
|
- Update to 0.6.3
|
|
|
|
* Fri Aug 21 2020 leiju <leiju4@huawei.com> - 0.6.2-1
|
|
- Package init
|