nodejs18/nodejs.spec

439 lines
16 KiB
RPMSpec
Raw Normal View History

2012-12-18 13:51:29 +00:00
Name: nodejs
Version: 0.10.28
Release: 3%{?dist}
2012-12-18 13:51:29 +00:00
Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages
URL: http://nodejs.org/
# Exclusive archs must match v8
ExclusiveArch: %{ix86} x86_64 %{arm}
# nodejs bundles openssl, but we use the system version in Fedora
# because openssl contains prohibited code, we remove openssl completely from
# the tarball, using the script in Source100
Source0: node-v%{version}-stripped.tar.gz
Source100: %{name}-tarball.sh
# The native module Requires generator remains in the nodejs SRPM, so it knows
# the nodejs and v8 versions. The remainder has migrated to the
# nodejs-packaging SRPM.
Source7: nodejs_native.attr
# Disable running gyp on bundled deps we don't use
Patch1: nodejs-disable-gyp-deps.patch
# use system certificates instead of the bundled ones
# modified version of Debian patch:
# http://patch-tracker.debian.org/patch/series/view/nodejs/0.10.26~dfsg1-1/2014_donotinclude_root_certs.patch
Patch2: nodejs-use-system-certs.patch
# V8 presently breaks ABI at least every x.y release while never bumping SONAME,
# so we need to be more explicit until spot fixes that
%global v8_ge 1:3.14.5.7
%global v8_lt 1:3.15
%global v8_abi 3.14
BuildRequires: v8-devel >= %{v8_ge}
2012-12-18 13:51:29 +00:00
BuildRequires: http-parser-devel >= 2.0
2013-01-02 01:11:13 +00:00
BuildRequires: libuv-devel
2012-12-18 13:51:29 +00:00
BuildRequires: c-ares-devel
BuildRequires: zlib-devel
# Node.js requires some features from openssl 1.0.1 for SPDY support
BuildRequires: openssl-devel >= 1:1.0.1
Requires: v8%{?_isa} >= %{v8_ge}
Requires: v8%{?_isa} < %{v8_lt}
# we need the system certificate store when Patch2 is applied
Requires: ca-certificates
#we need ABI virtual provides where SONAMEs aren't enough/not present so deps
#break when binary compatibility is broken
%global nodejs_abi 0.10
Provides: nodejs(abi) = %{nodejs_abi}
Provides: nodejs(v8-abi) = %{v8_abi}
#this corresponds to the "engine" requirement in package.json
2012-12-28 01:49:11 +00:00
Provides: nodejs(engine) = %{version}
2012-12-18 13:51:29 +00:00
# Node.js currently has a conflict with the 'node' package in Fedora
# The ham-radio group has agreed to rename their binary for us, but
# in the meantime, we're setting an explicit Conflicts: here
Conflicts: node <= 0.3.2-11
%description
Node.js is a platform built on Chrome's JavaScript runtime
for easily building fast, scalable network applications.
Node.js uses an event-driven, non-blocking I/O model that
makes it lightweight and efficient, perfect for data-intensive
real-time applications that run across distributed devices.
2013-01-05 09:55:51 +00:00
%package devel
Summary: JavaScript runtime - development headers
Group: Development/Languages
Requires: %{name}%{?_isa} == %{version}-%{release}
Requires: libuv-devel%{?_isa} http-parser-devel%{?_isa} v8-devel%{?_isa}
Requires: openssl-devel%{?_isa} c-ares-devel%{?_isa} zlib-devel%{?_isa}
Requires: nodejs-packaging
2013-01-05 09:55:51 +00:00
%description devel
Development headers for the Node.js JavaScript runtime.
%package docs
Summary: Node.js API documentation
Group: Documentation
BuildArch: noarch
%description docs
The API documentation for the Node.js JavaScript runtime.
2012-12-18 13:51:29 +00:00
2012-12-18 13:51:29 +00:00
%prep
%setup -q -n node-v%{version}
# remove bundled dependencies
%patch1 -p1
rm -rf deps
2012-12-18 13:51:29 +00:00
# remove bundled CA certificates
%patch2 -p1
rm -f src/node_root_certs.h
2012-12-18 13:51:29 +00:00
%build
# build with debugging symbols and add defines from libuv (#892601)
export CFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
export CXXFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
2012-12-18 13:51:29 +00:00
./configure --prefix=%{_prefix} \
--shared-v8 \
--shared-openssl \
--shared-zlib \
--shared-cares \
--shared-libuv \
--shared-http-parser \
--without-npm \
--without-dtrace
# Setting BUILDTYPE=Debug builds both release and debug binaries
make BUILDTYPE=Debug %{?_smp_mflags}
2012-12-18 13:51:29 +00:00
%install
rm -rf %{buildroot}
2013-01-10 09:15:32 +00:00
./tools/install.py install %{buildroot}
2012-12-18 13:51:29 +00:00
# and remove dtrace file again
rm -rf %{buildroot}/%{_prefix}/lib/dtrace
# Set the binary permissions properly
chmod 0755 %{buildroot}/%{_bindir}/node
# Install the debug binary and set its permissions
install -Dpm0755 out/Debug/node %{buildroot}/%{_bindir}/node_g
2012-12-27 23:45:37 +00:00
# own the sitelib directory
mkdir -p %{buildroot}%{_prefix}/lib/node_modules
# ensure Requires are added to every native module that match the Provides from
# the nodejs build in the buildroot
install -Dpm0644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs_native.attr
cat << EOF > %{buildroot}%{_rpmconfigdir}/nodejs_native.req
#!/bin/sh
echo 'nodejs(abi) = %nodejs_abi'
echo 'nodejs(v8-abi) = %v8_abi'
EOF
chmod 0755 %{buildroot}%{_rpmconfigdir}/nodejs_native.req
2012-12-27 23:45:37 +00:00
#install documentation
mkdir -p %{buildroot}%{_pkgdocdir}/html
cp -pr doc/* %{buildroot}%{_pkgdocdir}/html
rm -f %{buildroot}%{_pkgdocdir}/html/nodejs.1
cp -p LICENSE %{buildroot}%{_pkgdocdir}/html
cp -p ChangeLog LICENSE README.md AUTHORS %{buildroot}%{_pkgdocdir}
2013-01-05 10:15:29 +00:00
#node-gyp needs common.gypi too
2013-01-05 10:19:17 +00:00
mkdir -p %{buildroot}%{_datadir}/node
cp -p common.gypi %{buildroot}%{_datadir}/node
2013-01-05 10:15:29 +00:00
2012-12-18 13:51:29 +00:00
%files
%{_bindir}/node
%{_mandir}/man1/node.*
2012-12-27 23:45:37 +00:00
%dir %{_prefix}/lib/node_modules
%dir %{_datadir}/node
%{_rpmconfigdir}/fileattrs/nodejs_native.attr
%{_rpmconfigdir}/nodejs_native.req
%dir %{_pkgdocdir}
%{_pkgdocdir}/ChangeLog
%{_pkgdocdir}/LICENSE
%{_pkgdocdir}/README.md
%{_pkgdocdir}/AUTHORS
2012-12-18 13:51:29 +00:00
2013-01-05 09:55:51 +00:00
%files devel
%{_bindir}/node_g
2013-01-05 09:55:51 +00:00
%{_includedir}/node
%{_datadir}/node/common.gypi
2013-01-05 09:55:51 +00:00
%files docs
%dir %{_pkgdocdir}
%{_pkgdocdir}/html
2012-12-18 13:51:29 +00:00
%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.28-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat May 03 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.28-2
- use the system certificate store instead of the bundled copy
both are based on the Mozilla CA list, so the only effect this should have is
making additional certificates added by the system administrator available to
node
* Sat May 03 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.28-1
- new upstream release 0.10.28
There is no dfference between 0.10.27 and 0.10.28 for Fedora, as the only
thing updated was npm, which is shipped seperately. The latest was only
packaged to avoid confusion. Please see the v0.10.27 changelog for relevant
changes in this update:
http://blog.nodejs.org/2014/05/01/node-v0-10-27-stable/
* Thu Feb 20 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.26-1
2014-05-03 00:51:14 +00:00
- new upstream release 0.10.26
http://blog.nodejs.org/2014/02/18/node-v0-10-26-stable/
2014-02-14 00:48:49 +00:00
* Fri Feb 14 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.25-2
- rebuild for icu-53 (via v8)
* Mon Jan 27 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.25-1
- new upstream release 0.10.25
http://blog.nodejs.org/2014/01/23/node-v0-10-25-stable/
* Thu Dec 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.24-1
- new upstream release 0.10.24
http://blog.nodejs.org/2013/12/19/node-v0-10-24-stable/
- upstream install script installs the headers now
* Thu Dec 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.23-1
- new upstream release 0.10.23
http://blog.nodejs.org/2013/12/11/node-v0-10-23-stable/
* Tue Nov 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.22-1
- new upstream release 0.10.22
http://blog.nodejs.org/2013/11/12/node-v0-10-22-stable/
* Fri Oct 18 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.21-1
- new upstream release 0.10.21
http://blog.nodejs.org/2013/10/18/node-v0-10-21-stable/
- resolves an undisclosed security vulnerability in the http module
* Tue Oct 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.20-1
- new upstream release 0.10.20
http://blog.nodejs.org/2013/09/30/node-v0-10-20-stable/
* Wed Sep 25 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.19-1
- new upstream release 0.10.19
http://blog.nodejs.org/2013/09/24/node-v0-10-19-stable/
* Fri Sep 06 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.18-1
- new upstream release 0.10.18
http://blog.nodejs.org/2013/09/04/node-v0-10-18-stable/
* Tue Aug 27 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.17-1
- new upstream release 0.10.17
http://blog.nodejs.org/2013/08/21/node-v0-10-17-stable/
- fix duplicated/conflicting documentation files (RHBZ#1001253)
* Sat Aug 17 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.16-1
- new upstream release 0.10.16
http://blog.nodejs.org/2013/08/16/node-v0-10-16-stable/
- add v8-devel to -devel Requires
- restrict -devel Requires to the same architecture
* Wed Aug 14 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.14-3
- fix typo in _isa macro in v8 Requires
* Mon Aug 05 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.14-2
- use unversioned docdir for -docs subpackage
https://fedoraproject.org/wiki/Changes/UnversionedDocdirs
- use main package's docdir instead of a seperate -docs directory
* Thu Jul 25 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.14-1
- new upstream release 0.10.14
http://blog.nodejs.org/2013/07/25/node-v0-10-14-stable/
* Wed Jul 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.13-1
- new upstream release 0.10.13
http://blog.nodejs.org/2013/07/09/node-v0-10-13-stable/
- remove RPM macros, etc. now that they've migrated to nodejs-packaging
* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.12-1
- new upstream release 0.10.12
http://blog.nodejs.org/2013/06/18/node-v0-10-12-stable/
- split off a -packaging subpackage with RPM macros, etc.
- build -docs as noarch
- copy mutiple version logic from nodejs-packaging SRPM for now
* Fri May 31 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.9-1
- new upstream release 0.10.9
http://blog.nodejs.org/2013/05/30/node-v0-10-9-stable/
2013-05-29 03:44:29 +00:00
* Wed May 29 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.8-1
- new upstream release 0.10.8
2013-05-31 02:52:24 +00:00
http://blog.nodejs.org/2013/05/24/node-v0-10-8-stable/
2013-05-29 03:44:29 +00:00
2013-05-29 02:55:25 +00:00
* Wed May 29 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.7-1
- new upstream release 0.10.7
2013-05-31 02:52:24 +00:00
http://blog.nodejs.org/2013/05/17/node-v0-10-7-stable/
- strip openssl from the tarball; it contains prohibited code (RHBZ#967736)
- patch Makefile so we can just remove all bundled deps completely
2013-05-29 02:55:25 +00:00
* Wed May 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.6-1
- new upstream release 0.10.6
http://blog.nodejs.org/2013/05/14/node-v0-10-6-stable/
* Mon May 06 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-3
- nodejs-fixdep: work properly when a package has no dependencies
* Mon Apr 29 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-2
- nodejs-symlink-deps: make it work when --check is used and just
devDependencies exist
* Wed Apr 24 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-1
- new upstream release 0.10.5
http://blog.nodejs.org/2013/04/23/node-v0-10-5-stable/
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.4-1
- new upstream release 0.10.4
http://blog.nodejs.org/2013/04/11/node-v0-10-4-stable/
- add no-op macro to permit spec compatibility with EPEL
* Thu Apr 04 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.3-2
- nodejs-symlink-deps: symlink unconditionally in the buildroot
* Wed Apr 03 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.3-1
- new upstream release 0.10.3
http://blog.nodejs.org/2013/04/03/node-v0-10-3-stable/
- nodejs-symlink-deps: only create symlink if target exists
- nodejs-symlink-deps: symlink devDependencies when --check is used
* Sun Mar 31 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.2-1
- new upstream release 0.10.2
http://blog.nodejs.org/2013/03/28/node-v0-10-2-stable/
- remove %%nodejs_arches macro since it will only be useful if it is present in
the redhat-rpm-config package
- add default filtering macro to remove unwanted Provides from native modules
- nodejs-symlink-deps now supports multiple modules in one SRPM properly
- nodejs-symlink-deps also now supports a --check argument that works in the
current working directry instead of the buildroot
* Fri Mar 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.1-1
- new upstream release 0.10.1
http://blog.nodejs.org/2013/03/21/node-v0-10-1-stable/
* Wed Mar 20 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.0-4
- fix escaping in dependency generator regular expressions (RHBZ#923941)
* Wed Mar 13 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.0-3
- add virtual ABI provides for node and v8 so binary module's deps break when
binary compatibility is broken
- automatically add matching Requires to nodejs binary modules
- add %%nodejs_arches macro to future-proof ExcluseArch stanza in dependent
packages
2013-03-12 15:33:44 +00:00
* Tue Mar 12 2013 Stephen Gallagher <sgallagh@redhat.com> - 0.10.0-2
- Fix up documentation subpackage
* Mon Mar 11 2013 Stephen Gallagher <sgallagh@redhat.com> - 0.10.0-1
- Update to stable 0.10.0 release
- https://raw.github.com/joyent/node/v0.10.0/ChangeLog
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Jan 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-10
- minor bugfixes to RPM magic
- nodejs-symlink-deps: don't create an empty node_modules dir when a module
has no dependencies
- nodes-fixdep: support adding deps when none exist
- Add the full set of headers usually bundled with node as deps to nodejs-devel.
This way `npm install` for native modules that assume the stuff bundled with
node exists will usually "just work".
-move RPM magic to nodejs-devel as requested by FPC
* Sat Jan 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-9
- fix brown paper bag bug in requires generation script
* Thu Jan 10 2013 Stephen Gallagher <sgallagh@redhat.com> - 0.9.5-8
- Build debug binary and install it in the nodejs-devel subpackage
* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-7
- don't use make install since it rebuilds everything
2013-01-10 08:25:01 +00:00
* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-6
- add %%{?isa}, epoch to v8 deps
* Wed Jan 09 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-5
- add defines to match libuv (#892601)
- make v8 dependency explicit (and thus more accurate)
- add -g to $C(XX)FLAGS instead of patching configure to add it
- don't write pointless 'npm(foo) > 0' deps
2013-01-05 09:55:51 +00:00
* Sat Jan 05 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-4
- install development headers
2013-01-05 10:26:47 +00:00
- add nodejs_sitearch macro
2013-01-05 09:55:51 +00:00
* Wed Jan 02 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-3
- make nodejs-symlink-deps actually work
2013-01-02 01:54:12 +00:00
* Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-2
- provide nodejs-devel so modules can BuildRequire it (and be consistent
with other interpreted languages in the distro)
2013-01-02 00:33:10 +00:00
* Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-1
- new upstream release 0.9.5
2013-01-02 00:46:31 +00:00
- provide nodejs-devel for the moment
- fix minor bugs in RPM magic
2013-01-02 01:01:34 +00:00
- add nodejs_fixdep macro so packagers can easily adjust dependencies in
package.json files
2013-01-02 00:33:10 +00:00
* Wed Dec 26 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.4-1
- new upstream release 0.9.4
- system library patches are now upstream
- respect optflags
- include documentation in subpackage
2012-12-27 23:45:37 +00:00
- add RPM dependency generation and related magic
- guard libuv depedency so it always gets bumped when nodejs does
2013-01-05 09:55:51 +00:00
- add -devel subpackage with enough to make node-gyp happy
2012-12-19 11:18:24 +00:00
* Wed Dec 19 2012 Dan Horák <dan[at]danny.cz> - 0.9.3-8
- set exclusive arch list to match v8
* Tue Dec 18 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-7
- Add remaining changes from code review
- Remove unnecessary BuildRequires on findutils
- Remove %%clean section
2012-12-18 13:51:29 +00:00
* Fri Dec 14 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-6
- Fixes from code review
- Fix executable permissions
- Correct the License field
- Build debuginfo properly
2012-12-18 13:51:29 +00:00
* Thu Dec 13 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-5
- Return back to using the standard binary name
- Temporarily adding a conflict against the ham radio node package until they
complete an agreed rename of their binary.
* Wed Nov 28 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-4
- Rename binary and manpage to nodejs
* Mon Nov 19 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-3
- Update to latest upstream development release 0.9.3
- Include upstreamed patches to unbundle dependent libraries
* Tue Oct 23 2012 Adrian Alves <alvesadrian@fedoraproject.org> 0.8.12-1
- Fixes and Patches suggested by Matthias Runge
* Mon Apr 09 2012 Adrian Alves <alvesadrian@fedoraproject.org> 0.6.5
- First build.