%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-stylus Version: 0.52.4 Release: 3%{?dist} Summary: Robust, expressive, and feature-rich CSS super-set for Node.js License: MIT Group: System Environment/Libraries URL: https://github.com/stylus/stylus Source0: http://registry.npmjs.org/stylus/-/stylus-%{version}.tgz # These sources are generated by running Source10, which pulls from the # upstream version control repository. Source1: tests-%{version}.tar.bz2 Source2: docs-%{version}.tar.bz2 Source10: dl-tests.sh # Patch the tests to use the "containEql" method instead of the deprecated # 'include' method from newer versions of the 'should' module Patch0: nodejs-stylus-0.52.4_fix-sourcemap-tests.patch 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(css-parse) BuildRequires: npm(debug) BuildRequires: npm(mkdirp) BuildRequires: npm(mocha) BuildRequires: npm(sax) BuildRequires: npm(should) %endif %description Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. It supports both indented syntax and regular CSS style. It has many features, including mixins, keyword arguments, variables, interpolation, operators, conditionals, iteration, over 25 built-in functions, optional compression and many more. %prep %setup -q -n package %setup -q -T -D -a 1 -n package %setup -q -T -D -a 2 -n package %nodejs_fixdep sax find . -name .gitignore -delete %patch0 -p1 %nodejs_fixdep glob %nodejs_fixdep mkdirp %nodejs_fixdep source-map %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/stylus cp -pr package.json index.js lib/ \ %{buildroot}%{nodejs_sitelib}/stylus mkdir -p %{buildroot}%{nodejs_sitelib}/stylus/bin install -p -D -m0755 bin/stylus \ %{buildroot}%{nodejs_sitelib}/stylus/bin/stylus mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/stylus/bin/stylus \ %{buildroot}%{_bindir}/stylus %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{nodejs_sitelib}/mocha/bin/mocha test/ test/middleware/ \ --require should --bail --reporter dot %endif %files %doc LICENSE Readme.md docs/ %{nodejs_sitelib}/stylus %{_bindir}/stylus %changelog * Wed Oct 28 2015 Jared Smith - 0.52.4-3 - Disable tests to bootstrap npm(mocha) * Sat Oct 24 2015 Jared Smith - 0.52.4-2 - Relax build requirements * Sat Oct 24 2015 Jared Smith - 0.52.4-1 - Update to upstream 0.52.4 release * Wed Jun 17 2015 Fedora Release Engineering - 0.44.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu May 14 2015 Ville Skyttä - 0.44.0-3 - Don't ship .gitignore * Sat Jun 07 2014 Fedora Release Engineering - 0.44.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Apr 25 2014 Jamie Nguyen - 0.44.0-1 - update to upstream release 0.44.0 * Sat Apr 19 2014 Jamie Nguyen - 0.43.1-1 - update to upstream release 0.43.1 * Sun Feb 23 2014 Jamie Nguyen - 0.42.2-1 - update to upstream release 0.42.2 - take Source0 from GitHub as the NPM tarball has some files stripped * Tue Jul 30 2013 Jamie Nguyen - 0.35.1-1 - update to upstream release 0.35.1 - restrict to compatible arches * Fri Jun 07 2013 Jamie Nguyen - 0.32.1-2 - add docs/ directory from upstream git - enable tests * Sat May 25 2013 Jamie Nguyen - 0.32.1-1 - update to upstream release 0.32.1 - add custom man page for /usr/bin/stylus * Thu Feb 14 2013 Jamie Nguyen - 0.32.0-1 - initial package