• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2013, StrongLoop, Inc. <callback@strongloop.com>
2#
3# Permission to use, copy, modify, and/or distribute this software for any
4# purpose with or without fee is hereby granted, provided that the above
5# copyright notice and this permission notice appear in all copies.
6#
7# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
15# This is updated by rpmbuild.sh.
16%define _version 0.10.12
17
18Name: node
19Version: %{_version}
20Release: 1
21Summary: Node.js is a platform for building fast, scalable network applications.
22Group: Development/Languages
23License: MIT
24URL: https://nodejs.org/
25Source0: https://nodejs.org/dist/v%{_version}/node-v%{_version}.tar.gz
26BuildRequires: gcc
27BuildRequires: gcc-c++
28BuildRequires: glibc-devel
29BuildRequires: make
30BuildRequires: python
31
32# Conflicts with the HAM radio package.
33Conflicts: node <= 0.3.2-11
34
35# Conflicts with the Fedora node.js package.
36Conflicts: nodejs
37
38
39%description
40Node.js is a platform built on Chrome's JavaScript runtime for easily
41building fast, scalable network applications.
42
43Node.js uses an event-driven, non-blocking I/O model that makes it
44lightweight and efficient, perfect for data-intensive real-time
45applications that run across distributed devices.
46
47
48%prep
49%setup -q
50
51
52%build
53%ifarch arm
54%define _dest_cpu arm
55%endif
56
57%ifarch i386 i686
58%define _dest_cpu ia32
59%endif
60
61%ifarch x86_64
62%define _dest_cpu x64
63%endif
64
65./configure --prefix=/usr --dest-cpu=%{_dest_cpu}
66make %{?_smp_mflags}
67
68
69%check
70#make test
71
72
73# Use mildly hard-coded paths in the install and files targets for now.
74# _libdir is /usr/lib64 on some systems but the installer always installs
75# to /usr/lib.  I have commits sitting in a branch that add --libdir and
76# --mandir configure switches to the configure script but it's debatable
77# if it's worth the extra complexity.
78%install
79export DONT_STRIP=1  # Don't strip debug symbols for now.
80make install DESTDIR=%{buildroot}
81rm -fr %{buildroot}/usr/lib/dtrace/  # No systemtap support.
82install -m 755 -d %{buildroot}/usr/lib/node_modules/
83install -m 755 -d %{buildroot}%{_datadir}/%{name}
84
85# Remove junk files from node_modules/ - we should probably take care of
86# this in the installer.
87for FILE in .gitmodules .gitignore .npmignore .travis.yml \*.py[co]; do
88  find %{buildroot}/usr/lib/node_modules/ -name "$FILE" -delete
89done
90
91
92%files
93/usr/bin/*
94/usr/include/*
95/usr/lib/node_modules/
96/usr/share/doc/node/gdbinit
97/usr/share/man/man1/node.1.gz
98/usr/share/systemtap/tapset/node.stp
99%{_datadir}/%{name}/
100%doc CHANGELOG.md LICENSE README.md
101
102
103%changelog
104* Tue Jul 7 2015 Ali Ijaz Sheikh <ofrobots@google.com>
105- Added gdbinit.
106
107* Mon Apr 13 2015 Dan Varga <danvarga@gmail.com>
108- Fix paths for changelog and manpage
109
110* Thu Dec 4 2014 Ben Noordhuis <info@bnoordhuis.nl>
111- Rename to iojs.
112
113* Fri Jul 5 2013 Ben Noordhuis <info@bnoordhuis.nl>
114- Initial release.
115