# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global commit0 264236ca59694593ffe091e3b75b0f42154d3561 %global gittag0 5.0.3 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global enable_tests 0 %global barename postcss Name: nodejs-postcss Version: 5.0.3 Release: 1%{?dist} Summary: Framework for CSS postprocessors with full source map support License: MIT URL: https://www.npmjs.org/package/postcss # See review ticket for rationale on using the github tarball: # https://bugzilla.redhat.com/show_bug.cgi?id=1115702 #Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz # https://fedoraproject.org/wiki/Packaging:SourceURL#Github # Keep in mind that github tarballs are generated on-demand, so their # modification dates will vary and cause checksum tests to fail. Reviewers will # need to use diff -r to verify the tarballs.. Source0: https://github.com/postcss/%{barename}/archive/%{commit0}.tar.gz#/%{barename}-%{shortcommit0}.tar.gz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 %if 0%{?enable_tests} BuildRequires: npm(concat-with-sourcemaps) BuildRequires: npm(postcss-parser-tests) BuildRequires: npm(gulp-json-editor) BuildRequires: npm(gulp-istanbul) BuildRequires: npm(run-sequence) BuildRequires: npm(babel-eslint) BuildRequires: npm(gulp-eslint) BuildRequires: npm(gulp-mocha) BuildRequires: npm(gulp-babel) BuildRequires: npm(strip-ansi) BuildRequires: npm(yaspeller) BuildRequires: npm(gulp-util) BuildRequires: npm(gulp-run) BuildRequires: npm(fs-extra) BuildRequires: npm(isparta) BuildRequires: npm(eslint) BuildRequires: npm(sinon) BuildRequires: npm(mocha)) BuildRequires: npm(gulp) BuildRequires: npm(chai) BuildRequires: npm(del) %endif %description PostCSS is a framework for CSS postprocessors, to modify CSS with JavaScript with full source map support. %prep %setup -qn %{barename}-%{commit0} # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep js-base64 '2.x' %nodejs_fixdep source-map '0.x' %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/postcss cp -pr package.json index.js d.ts/ lib/ postcss.d.ts \ %{buildroot}%{nodejs_sitelib}/postcss %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check gulp %endif %files %doc docs/ README.md CHANGELOG.md %license LICENSE %{nodejs_sitelib}/postcss/ %changelog * Sun Aug 30 2015 Piotr Popieluch - 5.0.3-1 - Update to new guidelines - Update to latest upstream * Mon Aug 18 2014 Ralph Bean - 2.2.0-1 - Latest upstream. - Use github tarball instead of npmjs. - Specify noarch. - Remove es6-transpiler in the prep section * Tue Jul 08 2014 Ralph Bean - 1.0.0-1 - Initial packaging for Fedora.