%{?nodejs_find_provides_and_requires} %global realname zlib.js Summary: JavaScript library reimplementing compression Name: zlib-js Version: 0.1.7 Release: 1%{?dist} License: MIT URL: https://github.com/imaya/%{realname} # .tar.gz is truncated for some reason Source0: https://github.com/imaya/%{realname}/archive/%{version}.tar.gz BuildArch: noarch BuildRequires: ant BuildRequires: closure-compiler BuildRequires: python2 BuildRequires: nodejs-packaging BuildRequires: web-assets-devel Requires: web-assets-filesystem %description %{realname} is ZLIB(RFC1950), DEFLATE(RFC1951), GZIP(RFC1952), and PKZIP implementation in JavaScript. This library can be used to perform compression and decompression in the browser. %package -n nodejs-zlib-js Summary: Node library reimplementing compression %description -n nodejs-zlib-js %{_description} %prep %setup -q -n %{realname}-%{version} rm -rf vendor rm -f bin/* sed -i -e 's###' \ -e 's#PERFORMANCE_OPTIMIZATIONS#ADVANCED_OPTIMIZATIONS#' \ build.xml sed -i -e 's#./bin/node-zlib.js#zlib.js#' \ -e 's#"buster".*##' \ package.json %build ant all %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{realname} cp -pr package.json %{buildroot}%{nodejs_sitelib}/%{realname}/ cp -pr bin/node-zlib.js %{buildroot}%{nodejs_sitelib}/%{realname}/zlib.js mkdir -p %{buildroot}%{_webassetdir}/%{realname} pushd bin for i in *.min.js; do \ cp $i %{buildroot}%{_webassetdir}/%{realname}/${i/.min./.}; \ done popd %nodejs_symlink_deps %check # buster is not available %files %doc LICENSE README.md README.en.md ChangeLog.md %{_webassetdir}/%{realname} %files -n nodejs-zlib-js %{nodejs_sitelib}/%{realname} %doc LICENSE %changelog * Tue Oct 29 2013 Zbigniew Jędrzejewski-Szmek - 0.1.7-1 - Initial package.