Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-node-stringprep
Version:    0.7.3
Release:    1%{?dist}
Summary:    ICU StringPrep profiles for Node.js
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/node-xmpp/node-stringprep
Source0:    https://registry.npmjs.org/node-stringprep/-/node-stringprep-%{version}.tgz

%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches}
%else
ExclusiveArch: %{ix86} x86_64 %{arm}
%endif

BuildRequires:  libicu-devel
BuildRequires:  nodejs-packaging
BuildRequires:  node-gyp
BuildRequires:  npm(bindings)
BuildRequires:  npm(nan) >= 1.8.4, npm(nan) < 2.0.0

# The project uses Grunt, but there isn't anything fancy being done so we
# can just use mocha directly.
%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
BuildRequires:  npm(should)
BuildRequires:  npm(proxyquire)
%endif

%description
This module exposes predefined Unicode normalization functions that are
required by many protocols. This is just a binding to ICU, which is said
to be fast.


%prep
%setup -q -n package
%nodejs_fixdep bindings '~1.1'


%build
%nodejs_symlink_deps --build
export CXXFLAGS="%{optflags}"
node-gyp configure
node-gyp build


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/node-stringprep
cp -p package.json index.js \
    %{buildroot}%{nodejs_sitelib}/node-stringprep
install -p -D -m0755 build/Release/node_stringprep.node \
    %{buildroot}%{nodejs_sitelib}/node-stringprep/build/node-stringprep.node

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
# fallback test needs to be run in a separate process
/usr/bin/mocha -R spec --ui tdd --require should test/fallback.js
/usr/bin/mocha -R spec --ui tdd test/leakcheck.js test/toascii.js test/tounicode.js
%endif


%files
%doc README.markdown
%license LICENSE
%{nodejs_sitelib}/node-stringprep


%changelog
* Mon Nov 23 2015 Tom Hughes <tom@compton.nu> - 0.7.3-1
- Update to 0.7.3 upstream release
- Enable tests

* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 0.2.3-11
- rebuild for ICU 56.1

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

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.2.3-9
- Rebuilt for GCC 5 C++11 ABI change

* Mon Jan 26 2015 David Tardon <dtardon@redhat.com> - 0.2.3-8
- rebuild for ICU 54.1

* Tue Aug 26 2014 David Tardon <dtardon@redhat.com> - 0.2.3-7
- rebuild for ICU 53.1

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

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

* Sat May 10 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.3-4
- patch for new Nan 1.0.0 API

* Sat May 10 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.3-3
- fix version of npm(nan)

* Mon Apr 21 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.3-2
- fix version of npm(nan) and npm(bindings) dependencies

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

* Fri Feb 14 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.8-2
- rebuild for icu-53 (via v8)

* Sun Jul 28 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.8-1
- update to upstream release 0.1.8
- add ExclusiveArch logic
- enable tests

* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.5-5
- rebuild for missing npm(node-stringprep) provides on EL6

* Sun Mar 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.5-4
- remove npm(bindings) from Requires

* Sun Mar 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.5-3
- remove dependencies on v8 as these are now automatic
- remove redundant comments
- add libicu-devel to BuildRequires
- fix the test in %%check
- move library to %%{nodejs_sitelib}/node-stringprep/node-stringprep.node
  to comply with packaging guidelines

* Thu Feb 14 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.5-2
- make use of %%nodejs_fixdep

* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.5-1
- initial package