Blame SPECS/npm.spec

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