Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-compressible
Version:    1.0.1
Release:    3%{?dist}
Summary:    Compressible Content-Type/MIME checking for Node.js
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/expressjs/compressible
Source0:    http://registry.npmjs.org/compressible/-/compressible-%{version}.tgz
Source1:    https://raw.githubusercontent.com/expressjs/compressible/1fa49dfbff3dac20a170d8146b7e7dae555f5604/test/compressible.js

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
%endif

%description
%{summary}.


%prep
%setup -q -n package
mkdir -p test/
cp -p %{SOURCE1} test/


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/compressible
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/compressible

mkdir -p %{buildroot}%{_datadir}/%{name}
cp -p specifications.json %{buildroot}%{_datadir}/%{name}
ln -sf %{_datadir}/%{name}/specifications.json \
    %{buildroot}%{nodejs_sitelib}/compressible/specifications.json

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha --reporter spec
%endif


%files
%doc README.md
%{nodejs_sitelib}/compressible
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/specifications.json


%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.1-1
- update to upstream release 1.0.1

* Wed Mar 12 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.0-2
- move specifications.json to {_datadir}

* Sun Mar 02 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.0-1
- initial package