[Bug 1538067] Review Request: nodejs-decimal-js - A Javascript library for arbitrary-precision arithmetic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1538067

Robert-André Mauchin <zebob.m@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |zebob.m@xxxxxxxxx
           Assignee|nobody@xxxxxxxxxxxxxxxxx    |zebob.m@xxxxxxxxx
              Flags|                            |fedora-review?



--- Comment #1 from Robert-André Mauchin <zebob.m@xxxxxxxxx> ---
 - Use the macro %{?nodejs_find_provides_and_requires} in the header for EPEL
compatibility. See
https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/Packagers#Automatic_Requires_and_Provides

 - You should download and run the tests in %check. See how it's done on
another SPEC: https://src.fedoraproject.org/rpms/nodejs-cheerio/tree/master →
i.e. using the dl-tests.sh script.

Basically it looks like this:

%{?nodejs_find_provides_and_requires}

# See https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/Packagers
%global npm_name decimal.js

%global enable_tests 1

Name:        nodejs-decimal-js
Version:    9.0.1
Release:    1%{?dist}
Summary:    A library for arbitrary-precision arithmetic

License:    MIT
URL:        https://github.com/MikeMcl/decimal.js/
Source0:    http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
# The test files are not included in the npm tarball.
# Source{1-9} are generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-%{version}.tar.bz2
Source10:    dl-tests.sh
BuildArch:    noarch
ExclusiveArch:    %{nodejs_arches} noarch
BuildRequires:    nodejs-packaging dos2unix

%description
A JavaScript library for arbitrary-precision decimal and non-decimal
arithmetic.

%prep
%setup -q -n package
# setup the tests
%setup -q -T -D -a 1 -n package
dos2unix README.md CHANGELOG.md

%build
# Nothing to do

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr package.json decimal.d.ts decimal.js decimal.min.js decimal.mjs \
       %{buildroot}%{nodejs_sitelib}/%{npm_name}
%nodejs_symlink_deps

%check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%__nodejs test/test.js
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif


%files
%doc README.md CHANGELOG.md doc/API.html
%license LICENCE.md
%{nodejs_sitelib}/%{npm_name}

%changelog
* Thu Jan 18 2018 Timothée Floure <fnux@xxxxxxxxxxxxxxxxx> - 9.0.1-1
- Update to 9.0.1
- Remove the deprecated 'Group' tag
- Add the 'check' section to comply with packaging guidelines
- Fix end of line encoding for README.md and CHANGELOG.md

* Mon Jun 26 2017 Timothée Floure <fnux@xxxxxxx> - 7.2.3-1
- Let there be package



============

All ok otherwise:
 - Package builds in mock 
 - No RPMLint error
 - License ok
 - Latest version packaged

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux