%global enable_tests 1
%global module_name rc
Name: nodejs-%{module_name}
Version: 1.1.6
Release: 2%{?dist}
Summary: Hardwired configuration loader
License: MIT or BSD or ASL 2.0
URL: https://github.com/dominictarr/rc
Source0: http://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(deep-extend)
BuildRequires: npm(ini)
BuildRequires: npm(minimist)
BuildRequires: npm(strip-json-comments)
%endif
%description
The non-configurable configuration loader for lazy people.
%prep
%setup -q -n package
%nodejs_fixdep deep-extend "^0.3.2"
%nodejs_fixdep strip-json-comments "^1.0.2"
rm -rf node_modules
%build
# nothing to build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json *.js lib %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%__nodejs test/test.js
%__nodejs test/ini.js
%__nodejs test/nested-env-vars.js
%endif
%files
%doc README.md
%license LICENSE.MIT LICENSE.APACHE2 LICENSE.BSD
%{nodejs_sitelib}/%{module_name}
%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jan 20 2016 Tom Hughes <tom@compton.nu> - 1.1.6-1
- Update to 1.1.6 upstream release
* Sat Dec 12 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.6.0-3
- Fixdep updated minimist
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Feb 04 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.6.0-1
- update to 0.6.0 upstream release
* Mon Dec 08 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.5.4-2
- Add missing multilicense tag and its text
* Thu Dec 04 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.5.4-1
- Initial packaging