Name: nodejs-zipfile
Version: 0.5.0
Release: 1%{?dist}
Summary: C++ library for handling zipfiles in Node.js
License: BSD
URL: https://github.com/springmeyer/node-zipfile
Source0: http://registry.npmjs.org/zipfile/-/zipfile-%{version}.tgz
Patch0: nodejs-zipfile-pregyp.patch
ExclusiveArch: %{nodejs_arches}
BuildRequires: nodejs-devel
BuildRequires: node-gyp
BuildRequires: libzip-devel >= 0.11.2
BuildRequires: zlib-devel
BuildRequires: npm(mocha)
BuildRequires: npm(mkdirp)
%{?nodejs_default_filter}
%description
Bindings to libzip for handling zipfile archives in Node.js.
%prep
%setup -q -n package
%patch0 -p1
rm -rf deps/* node_modules
echo "{}" > deps/common-libzip.gypi
# Fix file names corrupted in NPM registry tar ball, see:
# https://github.com/springmeyer/node-zipfile/issues/29
mv test/data/Clément test/data/Clément
mv test/data/Clément/Olá.zip test/data/Clément/Olá.zip
%build
export CXXFLAGS="%{optflags}"
node-gyp configure -- -Dshared_libzip=true -Dmodule_name=zipfile -Dmodule_path=lib/binding
node-gyp build
%install
mkdir -p %{buildroot}/%{nodejs_sitearch}/zipfile
cp -pr package.json lib %{buildroot}/%{nodejs_sitearch}/zipfile
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha -R spec
%files
%doc LICENSE.txt README.md
%{nodejs_sitearch}/zipfile
%changelog
* Fri Mar 14 2014 Tom Hughes <tom@compton.nu> - 0.5.0-1
- Update to 0.5.0 upstream release
* Fri Feb 14 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.4.3-2
- rebuild for icu-53 (via v8)
* Fri Dec 20 2013 Tom Hughes <tom@compton.nu> - 0.4.3-1
- Update to 0.4.3 upstream release
* Wed Oct 30 2013 Tom Hughes <tom@compton.nu> - 0.4.2-1
- Update to 0.4.2 upstream release
* Tue Oct 1 2013 Tom Hughes <tom@compton.nu> - 0.4.1-1
- Update to 0.4.1 upstream release
* Wed Aug 21 2013 Remi Collet <rcollet@redhat.com> - 0.4.0-2
- rebuild for new libzip
* Sun Aug 11 2013 Tom Hughes <tom@compton.nu> - 0.4.0-1
- Update to 0.4.0 upstream release
- Update to latest nodejs packaging standards
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Apr 3 2013 Tom Hughes <tom@compton.nu> - 0.3.4-4
- Filter out provide for Node.js native extension
- Enable tests
* Wed Mar 13 2013 Tom Hughes <tom@compton.nu> - 0.3.4-3
- Restrict supported architectures using ExclusiveArch
- Rebuild against node 0.10
* Sat Mar 2 2013 Tom Hughes <tom@compton.nu> - 0.3.4-2
- Fix permissions on _zipfile.node
- BuildRequire zlib-devel
- BuildRequire mkdirp for tests
- Link node_modules for tests
- Set NODE_PATH when running tests
* Sun Feb 10 2013 Tom Hughes <tom@compton.nu> - 0.3.4-1
- Initial build of 0.3.4