From beebbf9eac36894ac6b94518d92f1aa9742ecb03 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 31 2016 08:34:15 +0000 Subject: import rh-nodejs4-nodejs-builtin-modules-1.1.1-4.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..56f97f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/builtin-modules-1.1.1.tgz diff --git a/.rh-nodejs4-nodejs-builtin-modules.metadata b/.rh-nodejs4-nodejs-builtin-modules.metadata new file mode 100644 index 0000000..77b2844 --- /dev/null +++ b/.rh-nodejs4-nodejs-builtin-modules.metadata @@ -0,0 +1 @@ +270f076c5a72c02f5b65a47df94c5fe3a278892f SOURCES/builtin-modules-1.1.1.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/test.js b/SOURCES/test.js new file mode 100644 index 0000000..0c9a151 --- /dev/null +++ b/SOURCES/test.js @@ -0,0 +1,18 @@ +'use strict'; +var test = require('ava'); +var builtinModules = require('./'); +var staticList = require('./static'); + +test(function (t) { + console.log('Builtin modules:', builtinModules); + + t.doesNotThrow(function () { + builtinModules.forEach(function (el) { + require(el); + }); + }); + + t.true(builtinModules.indexOf('fs') !== -1); + t.true(Array.isArray(staticList)); + t.end(); +}); diff --git a/SPECS/nodejs-builtin-modules.spec b/SPECS/nodejs-builtin-modules.spec new file mode 100644 index 0000000..7e26dbd --- /dev/null +++ b/SPECS/nodejs-builtin-modules.spec @@ -0,0 +1,86 @@ +%{?scl:%scl_package nodejs-delegates} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global packagename builtin-modules +%global enable_tests 0 + +Name: %{?scl_prefix}nodejs-builtin-modules +Version: 1.1.1 +Release: 4%{?dist} +Summary: List of the Node.js builtin modules + +License: MIT +URL: https://github.com/sindresorhus/builtin-modules.git +Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz +# The test files are not included in the npm tarball. +Source1: https://raw.githubusercontent.com/sindresorhus/builtin-modules/d317be16fab701f2ac73bc9aa771f60ec052ed66/test.js + +BuildArch: noarch + +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + + +BuildRequires: %{?scl_prefix}nodejs-devel +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(ava) +%endif + +#Requires: nodejs + +%description +List of the Node.js builtin modules + + +%prep +%setup -q -n package +# setup the tests +cp -p %{SOURCE1} . + + + +%build +# nothing to do! + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr *.json *.js \ + %{buildroot}%{nodejs_sitelib}/%{packagename} + +%nodejs_symlink_deps + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +%{_bindir}/xo && %{_bindir}/ava +%endif + + +%files +%{!?_licensedir:%global license %doc} +%doc *.md +%license license +%{nodejs_sitelib}/%{packagename} + + + +%changelog +* Sun Feb 14 2016 Zuzana Svetlikova - 1.1.1-4 +- rebuilt + +* Thu Feb 11 2016 Zuzana Svetlikova - 1.1.1-3 +- Initial packaging for RHEL + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Jan 09 2016 Jared Smith - 1.1.1-1 +- Update to upstream 1.1.1 release + +* Mon Oct 26 2015 Jared Smith - 1.1.0-1 +- Initial packaging