Blame SPECS/npm.spec

013f23
%{?scl:%scl_package npm}
013f23
%{!?scl:%global pkg_name %{name}}
013f23
013f23
%{?nodejs_find_provides_and_requires}
013f23
013f23
Name:       %{?scl_prefix}npm
013f23
Version:        3.10.9
58dd9e
Release:        3%{?dist}
013f23
Summary:    Node.js Package Manager
013f23
License:    Artistic 2.0
013f23
URL:        http://npmjs.org/
013f23
#stripped sources are created by script,
013f23
#we remove badly licensed web fonts from documentation
013f23
#http://registry.npmjs.org/%%{npm_name}/-/%%{npm_name}-%%{version}.tgz
58dd9e
#Source0:    npm-%%{version}-stripped.tar.gz
013f23
Source0:    npm-%{version}.tgz
013f23
BuildArch:  noarch
013f23
ExclusiveArch: %{nodejs_arches} noarch
013f23
BuildRequires: %{?scl_prefix}nodejs-devel
013f23
%{?scl:Requires: %{scl}-runtime}
013f23
013f23
%{?scl:Obsoletes: %{scl}-nodejs-npmconf}
013f23
013f23
%description
013f23
npm is a package manager for node.js. You can use it to install and publish your
013f23
node programs. It manages dependencies and does other cool stuff.
013f23
013f23
%prep
013f23
%setup -q -n package
013f23
013f23
#%nodejs_fixdep ansi '>=0.3.0'
013f23
#%nodejs_fixdep cmd-shim '>= 2.0.0'
013f23
%nodejs_fixdep config-chain
013f23
#%nodejs_fixdep dezalgo '>= 1.0.2'
013f23
#%nodejs_fixdep fs-vacuum '>= 1.2.6'
013f23
#%nodejs_fixdep fs-write-stream-atomic '>= 1.0.3'
013f23
#%nodejs_fixdep fstream '>= 1.0.3'
013f23
%nodejs_fixdep graceful-fs
013f23
%nodejs_fixdep inherits '2.0.0'
013f23
%nodejs_fixdep lockfile
013f23
#%nodejs_fixdep mkdirp '>= 0.5.0'
013f23
%nodejs_fixdep node-gyp
013f23
#%nodejs_fixdep npm-install-checks '>=1.0.6'
013f23
%nodejs_fixdep npm-registry-client
013f23
%nodejs_fixdep npm-user-validate
013f23
%nodejs_fixdep npmlog
013f23
%nodejs_fixdep path-is-inside
013f23
#%nodejs_fixdep read '>= 1.0.5'
013f23
%nodejs_fixdep readable-stream
013f23
#%nodejs_fixdep request '>2.16 <3'
013f23
%nodejs_fixdep rimraf
013f23
%nodejs_fixdep sorted-object
013f23
#%nodejs_fixdep strip-ansi '>=3.0.0'
013f23
#%nodejs_fixdep uid-number '>= 0.0.5'
013f23
%nodejs_fixdep which
013f23
%nodejs_fixdep write-file-atomic
013f23
013f23
# these modules aren't listed under dependencies in package json,
013f23
# but npm bundles them, so I added them
013f23
%nodejs_fixdep ansi-regex
013f23
%nodejs_fixdep debuglog
013f23
%nodejs_fixdep imurmurhash
013f23
%nodejs_fixdep lodash._baseindexof
013f23
%nodejs_fixdep lodash._bindcallback
013f23
%nodejs_fixdep lodash._cacheindexof
013f23
%nodejs_fixdep lodash._createcache
013f23
%nodejs_fixdep lodash._getnative
013f23
%nodejs_fixdep lodash.restparam
013f23
%nodejs_fixdep readdir-scoped-modules
013f23
%nodejs_fixdep validate-npm-package-license
013f23
013f23
#remove bundled modules
013f23
rm -rf node_modules
013f23
013f23
#add a missing shebang
013f23
sed -i -e '1i#!/usr/bin/env node' bin/read-package-json.js
013f23
013f23
# delete windows stuff
013f23
rm bin/npm.cmd bin/node-gyp-bin/node-gyp.cmd
013f23
013f23
%build
013f23
#nothing to do
013f23
013f23
%install
013f23
mkdir -p %{buildroot}%{nodejs_sitelib}/npm
013f23
cp -pr bin lib cli.js package.json %{buildroot}%{nodejs_sitelib}/npm/
013f23
013f23
mkdir -p %{buildroot}%{_bindir}
013f23
ln -sf ../lib/node_modules/npm/bin/npm-cli.js %{buildroot}%{_bindir}/npm
013f23
013f23
# ghosted global config files
013f23
mkdir -p %{buildroot}%{_sysconfdir}
013f23
touch %{buildroot}%{_sysconfdir}/npmrc
013f23
touch %{buildroot}%{_sysconfdir}/npmignore
013f23
013f23
# install to mandir
013f23
mkdir -p %{buildroot}%{_mandir}
013f23
cp -pr man/* %{buildroot}%{_mandir}/
013f23
013f23
ln -sf %{_defaultdocdir}/%{name}-%{version}/doc %{buildroot}%{nodejs_sitelib}/npm/doc
013f23
ln -sf %{_defaultdocdir}/%{name}-%{version}/html %{buildroot}%{nodejs_sitelib}/npm/html
013f23
ln -sf %{_defaultdocdir}/%{name}-%{version}/man %{buildroot}%{nodejs_sitelib}/npm/man
013f23
013f23
%nodejs_symlink_deps
013f23
013f23
# probably needs network, need to investigate further
013f23
#%%check
013f23
#%%__nodejs test/run.js
013f23
#%%tap test/tap/*.js
013f23
013f23
%pretrans -p <lua>
013f23
require 'posix'
013f23
require 'os'
013f23
if (posix.stat("%{nodejs_sitelib}/npm/man", "type") == "directory") and (posix.stat("%{nodejs_sitelib}/npm/man", "type") ~= "link") then
013f23
  posix.rmdir("%{nodejs_sitelib}/npm/man")
013f23
end
013f23
013f23
%files
013f23
%{nodejs_sitelib}/npm
013f23
%ghost %{_sysconfdir}/npmrc
013f23
%ghost %{_sysconfdir}/npmignore
013f23
%{_bindir}/npm
013f23
%{_mandir}/man*/*
013f23
%doc AUTHORS man doc html README.md LICENSE
013f23
013f23
%changelog
58dd9e
* Thu May 24 2018 Zuzana Svetlikova <zsvetlik@redhat.com> - 3.10.9-3
58dd9e
- Resolves: RHBZ#1543198, rebuild for multiarch
58dd9e
013f23
* Thu Jan 05 2017 Zuzana Svetlikova <zsvetlik@redhat.com> - 3.10.9-2
013f23
- Add missing bundled dependencies
013f23
- Fixdep
013f23
- Updated with script
013f23
- Investigate removed patches
013f23
013f23
* Tue Apr 12 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-8
013f23
- Fix inherits symlink
013f23
013f23
* Fri Apr 08 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-7
013f23
- Remove some more fixdep macros
013f23
013f23
* Thu Apr 07 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-6
013f23
- Add bundled modules
013f23
013f23
* Thu Apr 07 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-5
013f23
- Add bundled modules
013f23
013f23
* Thu Apr 07 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-4
013f23
- Remove som fixdep macros
013f23
013f23
* Wed Apr 06 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-3
013f23
- Fixed dependency
013f23
013f23
* Wed Apr 06 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.15.1-2
013f23
- Fixed some dependencies
013f23
013f23
* Wed Apr 06 2016 Tomas Hrcka <thrcka@redhat.com> - 2.15.1-1
013f23
- Rebase to latest stable release 2.15.1
013f23
013f23
* Thu Mar 03 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.14.13-9
013f23
- Change required semver version back to 5.0.3
013f23
013f23
* Wed Feb 17 2016 Tomas Hrcka <thrcka@redhat.com> - 2.14.13-8
013f23
- Fix dependency on semver
013f23
013f23
* Tue Feb 16 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.14.13-7
013f23
- Rebuilt with fixed requires
013f23
013f23
* Mon Nov 30 2015 Tomas Hrcka <thrcka@redhat.com> - 2.14.13-6
013f23
- Rebase to new upstream version
013f23
- https://github.com/npm/npm/releases/tag/v2.14.13
013f23
013f23
* Wed Sep 16 2015 Tomas Hrcka <thrcka@redhat.com> - 1.4.28-5
013f23
- Resolves RHBZ#1082002
013f23
013f23
* Thu Jul 23 2015 Tomas Hrcka <thrcka@redhat.com> - 1.4.28-4
013f23
- Remove macros for fixing deps
013f23
013f23
* Tue Jan 13 2015 Tomas Hrcka <thrcka@redhat.com> - 1.4.28-3
013f23
- Replace != with ~= in lua scriptlet
013f23
013f23
* Tue Jan 13 2015 Tomas Hrcka <thrcka@redhat.com> - 1.4.28-2
013f23
- Fix path to lua interpreter
013f23
013f23
* Mon Jan 12 2015 Tomas Hrcka <thrcka@redhat.com> - 1.4.28-1
013f23
- New upstream release 1.4.28
013f23
- Pretrans scriptlet changed to lua RHBZ#1149196 
013f23
- Remove fix_dep on semver package since we have update
013f23
013f23
* Fri May 02 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.24-5
013f23
- Add %pretrans scriptlet RHBZ #1092162
013f23
013f23
* Mon Mar 31 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.24-4
013f23
- Removed patch for help pages
013f23
- Added link to manpages in man dir of npm
013f23
- Fix link to doc dir
013f23
013f23
* Thu Mar 27 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.24-3
013f23
- Add patch to fix help pages path when npm help is used without man
013f23
013f23
* Wed Mar 26 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.24-2
013f23
- Remove patches for system path to man pages, fixed upstream
013f23
013f23
* Mon Feb 03 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.24-1
013f23
- New upstream release 1.3.24
013f23
013f23
* Wed Jan 08 2014 Tomas Hrcka <thrcka@redhat.com> - 1.3.6-4.2
013f23
- invoke fix_dep macro for cmd-shim with version 1.1 and above
013f23
013f23
* Mon Oct 14 2013 Tomas Hrcka <thrcka@redhat.com> - 1.3.6-4.1
013f23
 - new upstream release
013f23
 - remove patches that are already in upstream release
013f23
013f23
* Thu Aug 08 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.6-4
013f23
 - remove unnecessary symlink to mandir
013f23
  fixes upgrade path from certain older versions of npm
013f23
013f23
* Tue Jul 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.6-2
013f23
 - license changed from MITNFA to Artistic 2.0
013f23
013f23
* Tue Jul 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.6-1
013f23
 - new upstream release 1.3.6
013f23
013f23
* Mon Jul 22 2013 Tomas Hrcka thrcka@redhat.com - 1.2.17-9
013f23
 - RHBZ #983930 CVE-2013-4116 Insecure temporary directory generation
013f23
013f23
* Mon Jul 22 2013 Tomas Hrcka  <thrcka@redhat.com> - 1.2.17-8
013f23
 - patch for font deletion was replaced by script that strip webfons from tarball
013f23
013f23
* Thu Jul 18 2013 Tomas Hrcka  <thrcka@redhat.com> - 1.2.17-7
013f23
 - Removed badly licensed fonts from html documentation
013f23
013f23
* Fri Jul 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.3-1
013f23
- new upstream release 1.3.3
013f23
- fixes insecure temporary directory generation (CVE-2013-4116; RHBZ#983917)
013f23
013f23
* Tue Jul 02 2013 Tomas Hrcka  <thrcka@redhat.com> - 1.2.17-6
013f23
 - replaced manpath to use system paths
013f23
 - replaced previous patch to fix gz extension
013f23
* Sun Jun 23 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.0-1
013f23
- new upstream release 1.3.0
013f23
- use system paths for manual pages and documentation (RHBZ#953051)
013f23
013f23
* Sat Jun 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.17-6
013f23
- restrict to compatible arches
013f23
013f23
* Sun Jun 02 2013 Tomas Hrcka <thrcka@redhat.com> - 1.2.17-5.2
013f23
 - patch that add .gz extension when help.j calls 'man' fix RHBZ#965439
013f23
 
013f23
* Tue May 07 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.2.17-5.1
013f23
 - Add runtime dependency on scl-runtime
013f23
013f23
* Wed Apr 17 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.2.17-5
013f23
- Fix manpage names so that npm help finds them
013f23
013f23
* Mon Apr 15 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.2.17-4.1
013f23
- Fix documentation symlink
013f23
- Use new requires/provides macro
013f23
013f23
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.17-4
013f23
- add EPEL dependency generation macro
013f23
013f23
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.17-3
013f23
- rebuilt
013f23
013f23
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.17-2
013f23
- revert a change that adds a dep (that only affects Windows anyway)
013f23
- fix bogus date in changelog warning
013f23
013f23
* Fri Apr 12 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.2.17-2
013f23
- Add support for software collections
013f23
013f23
* Wed Apr 03 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.17-1
013f23
- new upstream release 1.2.17
013f23
013f23
* Wed Mar 13 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.14-2
013f23
- fix dependencies
013f23
013f23
* Mon Mar 11 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.2.14-1
013f23
- New upstream release 1.2.14
013f23
- Bring npm up to the latest to match the Node.js 0.10.0 release
013f23
013f23
* Wed Feb 13 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.10-2
013f23
- fix dep for updated read-package-json
013f23
013f23
* Sat Feb 09 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.10-1
013f23
- new upstream release 1.2.10
013f23
013f23
* Sat Jan 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.1-2
013f23
- fix rpmlint warnings
013f23
013f23
* Fri Jan 18 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.1-1
013f23
- new upstream release 1.2.1
013f23
- fix License tag
013f23
013f23
* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.0-1
013f23
- new upstream release 1.2.0
013f23
013f23
* Tue Jan 08 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.70-2
013f23
- add missing build section
013f23
013f23
* Mon Dec 31 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.70-1
013f23
- new upstream release 1.1.70
013f23
013f23
* Wed May 02 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.19-1
013f23
- New upstream release 1.1.19
013f23
013f23
* Wed Apr 18 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.18-1
013f23
- New upstream release 1.1.18
013f23
013f23
* Fri Apr 06 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.16-1
013f23
- New upstream release 1.1.16
013f23
013f23
* Mon Apr 02 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.15-1
013f23
- New upstream release 1.1.15
013f23
013f23
* Thu Mar 29 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.14-1
013f23
- New upstream release 1.1.14
013f23
013f23
* Wed Mar 28 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.13-2
013f23
- new dependencies fstream-npm, uid-number, and fstream-ignore (indirectly)
013f23
013f23
* Wed Mar 28 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.13-1
013f23
- new upstream release 1.1.13
013f23
013f23
* Thu Mar 22 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.12-1
013f23
- new upstream release 1.1.12
013f23
013f23
* Thu Mar 15 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.9-1
013f23
- new upstream release 1.1.9
013f23
013f23
* Sun Mar 04 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.4-1
013f23
- new upstream release 1.1.4
013f23
013f23
* Sat Feb 25 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.2-1
013f23
- new upstream release 1.1.2
013f23
013f23
* Sat Feb 11 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.1-2
013f23
- fix node_modules symlink
013f23
013f23
* Thu Feb 09 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.1-1
013f23
- new upstream release 1.1.1
013f23
013f23
* Sun Jan 29 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.0-2.3
013f23
- new upstream release 1.1.0-3
013f23
013f23
* Sat Jan 21 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.0-2.2
013f23
- missing Group field for EL5
013f23
013f23
* Sat Jan 21 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.0-1.2
013f23
- new upstream release 1.1.0-2
013f23
013f23
* Thu Nov 17 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.106-1
013f23
- new upstream release 1.0.106
013f23
- ship manpages again
013f23
013f23
* Thu Nov 10 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.105-1
013f23
- new upstream release 1.0.105
013f23
- use relative symlinks instead of absolute
013f23
- fixes /usr/bin/npm symlink on i686
013f23
013f23
* Mon Nov 07 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.104-1
013f23
- new upstream release 1.0.104
013f23
- adds node 0.6 support
013f23
013f23
* Wed Oct 26 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.101-2
013f23
- missing Requires on nodejs-request
013f23
- Require compilers too so native modules build properly
013f23
013f23
* Tue Oct 25 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.101-1
013f23
- new upstream release
013f23
- use symlink /usr/lib/node_modules -> /usr/lib/nodejs instead of patching
013f23
013f23
* Thu Aug 25 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.26-2
013f23
- rebuilt with fixed nodejs_fixshebang macro from nodejs-devel-0.4.11-3
013f23
013f23
* Tue Aug 23 2011 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.26-1
013f23
- initial package