Blame nodejs-xregexp.spec

afc5d3a
# This macro is needed at the start for building on EL6
afc5d3a
%{?nodejs_find_provides_and_requires}
afc5d3a
afc5d3a
%global enable_tests 0
afc5d3a
afc5d3a
%global barename xregexp
afc5d3a
afc5d3a
Name:               nodejs-xregexp
afc5d3a
Version:            2.0.0
afc5d3a
Release:            1%{?dist}
afc5d3a
Summary:            Extended JavaScript regular expressions
afc5d3a
afc5d3a
Group:              Development/Libraries
afc5d3a
License:            MIT
afc5d3a
URL:                https://www.npmjs.org/package/xregexp
afc5d3a
Source0:            http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
afc5d3a
BuildArch:          noarch
afc5d3a
%if 0%{?fedora} >= 19
afc5d3a
ExclusiveArch:      %{nodejs_arches} noarch
afc5d3a
%else
afc5d3a
ExclusiveArch:      %{ix86} x86_64 %{arm} noarch
afc5d3a
%endif
afc5d3a
afc5d3a
BuildRequires:      nodejs-packaging >= 6
afc5d3a
afc5d3a
%if 0%{?enable_tests}
afc5d3a
BuildRequires:      npm(qunit)
afc5d3a
%endif
afc5d3a
afc5d3a
%description
afc5d3a
XRegExp provides augmented, extensible, cross-browser JavaScript regular
afc5d3a
expressions. You get new syntax and flags beyond what browsers support
afc5d3a
natively, along with a collection of utils to make your client-side
afc5d3a
grepping and parsing easier. XRegExp also frees you from worrying about
afc5d3a
pesky inconsistencies in cross-browser regex handling and the dubious
afc5d3a
`lastIndex` property.
afc5d3a
afc5d3a
%prep
afc5d3a
%setup -q -n package
afc5d3a
afc5d3a
# Remove bundled node_modules if there are any..
afc5d3a
rm -rf node_modules/
afc5d3a
afc5d3a
# Fix line endings.
afc5d3a
find . -exec dos2unix {} \;
afc5d3a
afc5d3a
%nodejs_fixdep --caret
afc5d3a
afc5d3a
%build
afc5d3a
%nodejs_symlink_deps --build
afc5d3a
afc5d3a
%install
afc5d3a
mkdir -p %{buildroot}%{nodejs_sitelib}/xregexp
afc5d3a
cp -pr package.json xregexp-all.js \
afc5d3a
    %{buildroot}%{nodejs_sitelib}/xregexp
afc5d3a
afc5d3a
%nodejs_symlink_deps
afc5d3a
afc5d3a
afc5d3a
%check
afc5d3a
%if 0%{?enable_tests}
afc5d3a
%nodejs_symlink_deps --check
afc5d3a
node tests/node-qunit.js
afc5d3a
%endif
afc5d3a
afc5d3a
afc5d3a
%files
53dffae
%doc README.md MIT-LICENSE.txt
afc5d3a
%{nodejs_sitelib}/xregexp/
afc5d3a
afc5d3a
%changelog
afc5d3a
* Tue Jul 22 2014 Ralph Bean <rbean@redhat.com> - 2.0.0-1
afc5d3a
- Initial packaging for Fedora.