Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global packagename bcrypt
%global enable_tests 1

Name:		nodejs-bcrypt
Version:	0.8.7
Release:	12%{?dist}
Summary:	A bcrypt library for NodeJS

License:	MIT
URL:		https://github.com/ncb000gt/node.bcrypt.js
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz


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

BuildRequires:	nodejs-packaging
BuildRequires:	node-gyp
BuildRequires:	nodejs-devel
BuildRequires:	npm(bindings)
BuildRequires:	npm(nan)

%if 0%{?enable_tests}
BuildRequires:	npm(nodeunit)
%endif

%description
A bcrypt library for NodeJS.


%prep
%autosetup -n package
%nodejs_fixdep bindings "^1.2.1"
%nodejs_fixdep --dev --move nan

%build
%nodejs_symlink_deps --build
%set_build_flags
node-gyp rebuild
rm -rf node_modules

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js build/ \
	%{buildroot}%{nodejs_sitelib}/%{packagename}

%nodejs_symlink_deps

%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/nodeunit test
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif

%files
%{!?_licensedir:%global license %doc}
%doc *.md examples/
%license LICENSE
%{nodejs_sitelib}/%{packagename}

%changelog
* Fri Jun 22 2018 Tom Hughes <tom@compton.nu> - 0.8.7-12
- Rebuild for Node.js 10.5.0

* Thu Mar  8 2018 Tom Hughes <tom@compton.nu> - 0.8.7-10
- Relax npm(bindings) dependency

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Jan 23 2018 Tom Hughes <tom@compton.nu> - 0.8.7-8
- Export LDFLAGS for hardened build support
- Allow undefined symbols in the shared object

* Thu Aug 10 2017 Tom Hughes <tom@compton.nu> - 0.8.7-7.1
- Rebuild for Node.js 8.3.0

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-6.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-5.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Jun 28 2017 Tom Hughes <tom@compton.nu> - 0.8.7-4.1
- Rebuild for Node.js 8.1.2

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Oct 19 2016 Kalev Lember <klember@redhat.com> - 0.8.7-3
- Rebuild for nodejs(v8-abi) update

* Thu Sep 01 2016 Stephen Gallagher <sgallagh@redhat.com> - 0.8.7-2
- Rebuild for nodejs(v8-abi) update

* Fri Jul  8 2016 Jared Smith <jsmith@fedoraproject.org> - 0.8.7-1
- Initial packaging