diff --git a/.gitignore b/.gitignore index e69de29..ed40e07 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/netmask-1.0.4.tgz diff --git a/nodejs-netmask.spec b/nodejs-netmask.spec new file mode 100644 index 0000000..f1370cf --- /dev/null +++ b/nodejs-netmask.spec @@ -0,0 +1,71 @@ +# This macro is needed at the start for building on EL6 +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +%global barename netmask + +Name: nodejs-netmask +Version: 1.0.4 +Release: 1%{?dist} +Summary: Parse and lookup IP network blocks + +Group: Development/Libraries +License: MIT +URL: https://www.npmjs.org/package/netmask +Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs-packaging >= 6 + + + +%if 0%{?enable_tests} +BuildRequires: npm(coffee-script) +BuildRequires: npm(vows) +%endif + + +%description +The Netmask class parses and understands IPv4 CIDR blocks so they can be +explored and compared. This module is highly inspired by Perl Net::Netmask +module. + +%prep +%setup -q -n package + +# Remove bundled node_modules if there are any.. +rm -rf node_modules/ + +%nodejs_fixdep --caret + +%build +%nodejs_symlink_deps --build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/netmask +cp -pr package.json lib \ + %{buildroot}%{nodejs_sitelib}/netmask + +%nodejs_symlink_deps + + +%check +%if 0%{?enable_tests} +%nodejs_symlink_deps --check +vows --spec test/* +%endif + + +%files +%doc README.md +%{nodejs_sitelib}/netmask/ + +%changelog +* Tue Jul 22 2014 Ralph Bean - 1.0.4-1 +- Initial packaging for Fedora. diff --git a/sources b/sources index e69de29..e618296 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +71610b97bd2afe73f2a1be2757e5ac9a netmask-1.0.4.tgz