- node.js rpm spec : https://github.com/kazuhisya/nodejs-rpm
- node.js source : http://nodejs.org/dist/
Tested working (as sane as I could test for) on:
- RHEL/CentOS 7 x86_64
- RHEL/CentOS/SL/OL 6 x86_64
- when you try to build on el6, can use
devtoolset-3
andSCL
repository.- RHEL6.x: Red Hat Developer Toolset 3 , Red Hat Software Collections
- CentOS6.x: Devtoolset-3 , SCL: run
yum install -y centos-release-SCL
yum install -y devtoolset-3-gcc-c++ python27
- when you try to build on el6, can use
- RHEL/CentOS/SL/OL 5 x86_64
- when you try to build on el5, you can use
devtoolset-2
(devtoolset-2-gcc-c++
)- RHEL5.x: Red Hat Developer Toolset 2
- CentOS5.x: devtools-2
- when you try to build on el5, you can use
- Fedora 19 x86_64
- This spec is tested under el7, el6 and el5 only.
- However, Fedora15 or later work. maybe.
Prerequisites:
- Python 2.7
gcc
andg++ 4.8
or newer
setting up:
$ sudo yum install -y yum-utils rpmdevtools make
git clone and make:
$ git clone https://github.com/kazuhisya/nodejs-rpm.git
$ cd nodejs-rpm
$ sudo yum-builddep ./nodejs.spec
el7:
$ make rpm
el6 : with Software Collections and Devtoolset
$ scl enable python27 devtoolset-3 'make rpm'
install package:
$ cd ./dist/RPMS/x86_64/
$ sudo yum install ./nodejs-X.X.X-X.el6.x86_64.rpm ./nodejs-npm-X.X.X-X.el6.x86_64.rpm --nogpgcheck
el5 : with Devtoolset
$ sudo yum install -y yum-utils rpmdevtools redhat-rpm-config tar make openssl-devel libstdc++-devel zlib-devel gzip
$ sudo yum install -y devtoolset-2-gcc-c++ python27
$ git clone https://github.com/kazuhisya/nodejs-rpm.git
$ cd nodejs-rpm
$ rpmdev-setuptree
$ spectool -g ./nodejs.spec
$ cp *.patch ~/rpmbuild/SOURCES/ ; cp *.md ~/rpmbuild/SOURCES/ ; cp *.tar.gz ~/rpmbuild/SOURCES/
$ scl enable devtoolset-2 'rpmbuild -ba ./nodejs.spec'