Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:           nodejs-stylus
Version:        0.53.0
Release:        6%{?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:        https://github.com/stylus/stylus/archive/%{version}/%{name}-%{version}.tar.gz
# https://github.com/stylus/stylus/pull/2078
Patch0:         nodejs-stylus-should.patch

BuildArch:      noarch
ExclusiveArch:  %{ix86} x86_64 %{arm} noarch

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
%autosetup -p 1 -n stylus-%{version}
%nodejs_fixdep glob "^6.0.3"
%nodejs_fixdep sax "^0.6.0"
%nodejs_fixdep source-map "^0.5.2"


%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 *.md docs/
%license LICENSE
%{nodejs_sitelib}/stylus
%{_bindir}/stylus


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.53.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 10 2016 Tom Hughes <tom@compton.nu> - 0.53.0-5
- Update npm(source-map) dependency

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.53.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sat Jan  2 2016 Tom Hughes <tom@compton.nu> - 0.53.0-3
- Update npm(sax) depndency

* Fri Jan  1 2016 Tom Hughes <tom@compton.nu> - 0.53.0-2
- Update npm(glob) dependency

* Fri Jan  1 2016 Tom Hughes <tom@compton.nu> - 0.53.0-1
- Update to 0.53.0 upstream release
- Enable tests

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

* Thu May 14 2015 Ville Skyttä <ville.skytta@iki.fi> - 0.44.0-3
- Don't ship .gitignore

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

* Fri Apr 25 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.44.0-1
- update to upstream release 0.44.0

* Sat Apr 19 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.43.1-1
- update to upstream release 0.43.1

* Sun Feb 23 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 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 <jamielinux@fedoraproject.org> - 0.35.1-1
- update to upstream release 0.35.1
- restrict to compatible arches

* Fri Jun 07 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.32.1-2
- add docs/ directory from upstream git
- enable tests

* Sat May 25 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 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 <jamielinux@fedoraproject.org> - 0.32.0-1
- initial package