-
-
Save jmyrland/3143481 to your computer and use it in GitHub Desktop.
RPM spec file for node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define ver 0.8.2 | |
%define rel 1 | |
%define jobs 2 | |
Name: nodejs | |
Version: %{ver} | |
Release: %{rel} | |
Summary: Node's goal is to provide an easy way to build scalable network programs. | |
Group: Applications/Internet | |
License: Copyright Joyent, Inc. and other Node contributors. | |
URL: http://nodejs.org | |
Source0: http://nodejs.org/dist/node-v%{version}.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildRequires: python >= 2.4 | |
%description | |
Node.js is a server-side JavaScript environment that uses an asynchronous | |
event-driven model. This allows Node.js to get excellent performance based on | |
the architectures of many Internet applications. | |
%prep | |
%setup -q -n node-v%{version} | |
%build | |
export JOBS=%{jobs} | |
./configure --prefix=/usr | |
make CFLAGS+=-O2 CXXFLAGS+=-O2 | |
%install | |
rm -rf %{buildroot} | |
make install DESTDIR=%{buildroot} CFLAGS+=-O2 CXXFLAGS+=-O2 | |
%clean | |
rm -rf %{buildroot} | |
%files | |
%defattr(-,root,root,-) | |
%doc AUTHORS ChangeLog LICENSE README.md | |
/usr/bin/node | |
/usr/bin/npm | |
/usr/bin/node-waf | |
/usr/include/node | |
/usr/lib/node | |
/usr/lib/node_modules | |
/usr/share/man/man1/node.1.gz | |
%changelog | |
* Thu Jul 19 2012 Jørn A. Myrland <[email protected]> 0.8.2-1 | |
- Update spec to use v0.8.2 | |
* Fri Jan 06 2012 Sean Plaice <[email protected]> 0.6.6-1 | |
- Update spec to use v0.6.6 | |
* Thu Apr 14 2011 Chris Abernethy <[email protected]> 0.4.6-1 | |
- Initial rpm using upstream v0.4.6 |
I added the following after line 46: /usr/lib/dtrace
I have no idea if that was the right thing to do yet but it suppressed the message.
Update: it worked when I ran the rpm, node is executing.
Now on to npm...
I was having a hell of a time trying to rpmbuild this thing until I found this. Thanks guys.
All creds to @splacie :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've just updated the above code to 0.8.14 and run with rmpbuild but I've received "error: Installed (but unpackaged) file(s) found". Is there anything I may be missing somehow?