diff --git a/.gitignore b/.gitignore index e69de29..b99ad34 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/xregexp-2.0.0.tgz diff --git a/nodejs-xregexp.spec b/nodejs-xregexp.spec new file mode 100644 index 0000000..1530f4b --- /dev/null +++ b/nodejs-xregexp.spec @@ -0,0 +1,73 @@ +# This macro is needed at the start for building on EL6 +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +%global barename xregexp + +Name: nodejs-xregexp +Version: 2.0.0 +Release: 1%{?dist} +Summary: Extended JavaScript regular expressions + +Group: Development/Libraries +License: MIT +URL: https://www.npmjs.org/package/xregexp +Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz +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(qunit) +%endif + +%description +XRegExp provides augmented, extensible, cross-browser JavaScript regular +expressions. You get new syntax and flags beyond what browsers support +natively, along with a collection of utils to make your client-side +grepping and parsing easier. XRegExp also frees you from worrying about +pesky inconsistencies in cross-browser regex handling and the dubious +`lastIndex` property. + +%prep +%setup -q -n package + +# Remove bundled node_modules if there are any.. +rm -rf node_modules/ + +# Fix line endings. +find . -exec dos2unix {} \; + +%nodejs_fixdep --caret + +%build +%nodejs_symlink_deps --build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/xregexp +cp -pr package.json xregexp-all.js \ + %{buildroot}%{nodejs_sitelib}/xregexp + +%nodejs_symlink_deps + + +%check +%if 0%{?enable_tests} +%nodejs_symlink_deps --check +node tests/node-qunit.js +%endif + + +%files +%doc README.md MIT-LICENSE +%{nodejs_sitelib}/xregexp/ + +%changelog +* Tue Jul 22 2014 Ralph Bean - 2.0.0-1 +- Initial packaging for Fedora. diff --git a/sources b/sources index e69de29..ac837ac 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c710b2ea3741d4aa2a4b174514df458d xregexp-2.0.0.tgz