diff --git a/.gitignore b/.gitignore index e69de29..f1ce3d5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/1.0.0.tar.gz diff --git a/nodejs-requires-port.spec b/nodejs-requires-port.spec new file mode 100644 index 0000000..cfcaf59 --- /dev/null +++ b/nodejs-requires-port.spec @@ -0,0 +1,56 @@ +%{?nodejs_find_provides_and_requires} + +# npm(assume) not available in fedora +%global enable_tests 0 +%global packagename requires-port + +Name: nodejs-%{packagename} +Version: 1.0.0 +Release: 1%{?dist} +Summary: Check if a protocol requires a certain port number +License: MIT +URL: https://github.com/unshiftio/%{packagename} +Source0: https://github.com/unshiftio/%{packagename}/archive/%{version}.tar.gz + +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +BuildRequires: nodejs-packaging + +%if 0%{?enable_tests} +BuildRequires: npm(mocha) +BuildRequires: npm(assume) +%endif + +%description +This module is intended to be used with browserify or Node.js +and is distributed in the public npm registry. + +%prep +%autosetup -n %{packagename}-%{version} + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json *.js \ + %{buildroot}%{nodejs_sitelib}/%{packagename} + +%nodejs_symlink_deps + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +mocha test.js +%endif + +%files +%doc README.md +%license LICENSE +%{nodejs_sitelib}/%{packagename} + +%changelog +* Mon Apr 24 2017 Parag Nemade - 1.0.0-1 +- initial package diff --git a/sources b/sources index e69de29..390bc97 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (1.0.0.tar.gz) = ff55b9b4ecf5a1cd4a44bd7f15b0257e05b20095fad5a5447a26bebf7c56decd5d3722ca2b967368109f9971837528eb122c8f5ae87e7db554c02dc7eb4dd268