%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-transformers Version: 3.0.0 Release: %mkrel 1 Summary: String/Data transformations for Node.js License: MIT Group: System/Libraries URL: https://github.com/ForbesLindesay/transformers Source0: http://registry.npmjs.org/transformers/-/transformers-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source10: dl-tests.sh # https://github.com/ForbesLindesay/transformers/pull/31 Patch0: %{name}-3.0.0-Add-trailing-semicolons-to-uglify-css-test-files.patch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(css) BuildRequires: npm(expect.js) BuildRequires: npm(promise) BuildRequires: uglify-js # A lot (>30) of missing devDependencies not listed here. %endif %description String/Data transformations for use in templating libraries, static site generators and web frameworks. This gathers the most useful transformations you can apply to text or data into one library with a consistent API. Transformations can be pretty much anything but most are either compilers or templating engines. %prep %setup -q -n package %setup -q -T -D -a 1 -n package # Fix wrong-file-end-of-line-encoding for i in history.md LICENSE README.md; do sed -i -e 's/\r$//' "${i}" done #patch0 -p1 %nodejs_fixdep css '~1.6' %nodejs_fixdep promise '4.x' %nodejs_fixdep uglify-js '~2.2' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/transformers cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/transformers %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/mocha %endif %files %doc history.md LICENSE README.md %{nodejs_sitelib}/transformers %changelog * Tue Oct 28 2014 tv <tv> 3.0.0-1.mga5 + Revision: 794213 - disable patch - imported package nodejs-transformers