diff --git a/.gitignore b/.gitignore index e69de29..bffa455 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/fn-name-4e7e99e.tar.gz diff --git a/nodejs-fn-name.spec b/nodejs-fn-name.spec new file mode 100644 index 0000000..81512c0 --- /dev/null +++ b/nodejs-fn-name.spec @@ -0,0 +1,61 @@ +%global enable_tests 1 +%global srcname fn-name + +%global commit0 4e7e99e94301e20cf9a919d01688848e0b9d09ef +%global gittag0 v2.0.1 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +Name: nodejs-%{srcname} +Version: 2.0.1 +Release: 1%{?dist} +Summary: Get the name of a named function +License: MIT +URL: https://www.npmjs.com/package/%{srcname} +Source0: https://github.com/sindresorhus/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz + +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +BuildRequires: nodejs-packaging + +%if 0%{?enable_tests} +BuildRequires: npm(mocha) +%endif + + +%description +%{summary}. + +%prep +%setup -qn %{srcname}-%{commit0} +rm -rf node_modules/ + + +%build +#nothing to do + + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} +cp -pr index.js package.json \ + %{buildroot}%{nodejs_sitelib}/%{srcname} + +%nodejs_symlink_deps + + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +mocha +%endif + + +%files +%doc readme.md +%license license +%{nodejs_sitelib}/%{srcname} + + +%changelog +* Sat Oct 17 2015 Piotr Popieluch - 2.0.1-1 +- Initial package diff --git a/sources b/sources index e69de29..fa192b6 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7e8a5702d81bb6f2ac4f62d28b42ad55 fn-name-4e7e99e.tar.gz