diff --git a/.gitignore b/.gitignore index e69de29..52157fb 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/glob-parent-2.0.0.tgz diff --git a/nodejs-glob-parent.spec b/nodejs-glob-parent.spec new file mode 100644 index 0000000..4594fd7 --- /dev/null +++ b/nodejs-glob-parent.spec @@ -0,0 +1,68 @@ +%{?nodejs_find_provides_and_requires} + +%global packagename glob-parent +%global enable_tests 1 + +Name: nodejs-glob-parent +Version: 2.0.0 +Release: 2%{?dist} +Summary: Strips glob magic from a string to provide the parent path + +License: ISC +URL: https://github.com/es128/glob-parent.git +Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs-packaging +BuildRequires: npm(is-glob) +%if 0%{?enable_tests} +BuildRequires: mocha +%endif + +%description +Strips glob magic from a string to provide the parent path + + +%prep +%setup -q -n package + + +%build +# nothing to do! + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json index.js \ + %{buildroot}%{nodejs_sitelib}/%{packagename} + +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} +%{_bindir}/mocha -R spec +%else +%{_bindir}/echo "Tests disabled..." +%endif + + +%files +%{!?_licensedir:%global license %doc} +%doc *.md +%license LICENSE +%{nodejs_sitelib}/%{packagename} + + +%changelog +* Tue Jul 19 2016 Jared Smith - 2.0.0-2 +- Add missing BuildRequire line + +* Tue Feb 9 2016 Jared Smith - 2.0.0-1 +- Initial packaging diff --git a/sources b/sources index e69de29..5dc6bb0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7dc0b2d10ed856934e289df5e1f12c59 glob-parent-2.0.0.tgz