Bug 1538067 - Review Request: nodejs-decimal-js - A Javascript library for arbitrary-precision arithmetic
Summary: Review Request: nodejs-decimal-js - A Javascript library for arbitrary-precis...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1538076
TreeView+ depends on / blocked
 
Reported: 2018-01-24 12:19 UTC by Timothée Floure
Modified: 2018-02-01 16:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-01 16:33:47 UTC
Type: ---
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Timothée Floure 2018-01-24 12:19:07 UTC
Spec URL: https://fedorapeople.org/~fnux/pkg-reviews/nodejs-decimal-js.spec
SRPM URL: https://fedorapeople.org/~fnux/pkg-reviews/nodejs-decimal-js-9.0.1-1.fc26.src.rpm
Description: A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic.
Fedora Account System Username: fnux

Comment 1 Robert-André Mauchin 🐧 2018-01-24 17:58:42 UTC
 - 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> - 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> - 7.2.3-1
- Let there be package



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

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

Comment 2 Timothée Floure 2018-01-28 16:32:10 UTC
Thank you for the dl-test.sh script, I didn't know it.

Updated specfile and source RPM :

Spec URL: https://fedorapeople.org/~fnux/pkg-reviews/nodejs-decimal-js/nodejs-decimal-js.spec
SRPM URL: https://fedorapeople.org/~fnux/pkg-reviews/nodejs-decimal-js/nodejs-decimal-js-9.0.1-2.fc26.noarch.rpm

Comment 3 Robert-André Mauchin 🐧 2018-01-28 17:24:59 UTC
Package is approved.

Comment 4 Gwyn Ciesla 2018-01-28 20:26:17 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/nodejs-decimal-js


Note You need to log in before you can comment on or make changes to this bug.