forked from kazuhisya/nodejs-rpm
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnodejs.spec
More file actions
260 lines (231 loc) · 8.75 KB
/
nodejs.spec
File metadata and controls
260 lines (231 loc) · 8.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
%define _prefix /opt/node7
%define _base is24-node
%define _orig_base node
%define _includedir %{_prefix}/include
%define _bindir %{_prefix}/bin
%define _libdir %{_prefix}/lib
%define _node_original_docdir /opt/node7/share/doc/node
%define _build_number %(echo ${BUILD_NUMBER:-1})
%if 0%{?rhel} == 5
%define _datarootdir%{_datadir}
%endif
%global tapsetroot %{_prefix}/share/systemtap
%global tapsetdir %{tapsetroot}/tapset/%{_build_cpu}
Name: %{_base}js
Version: 6.11.1
Release: %{_build_number}%{?dist}
Provides: %{_base}js(engine)
Summary: Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model.
Packager: Ralph Angenendt <ralph.angenendt@scout24.com>
Group: Development/Libraries
License: MIT License
URL: https://nodejs.org
Source0: %{url}/dist/v%{version}/%{_orig_base}-v%{version}.tar.gz
Source1: bui_node7_env.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-tmp
Prefix: /opt/node7
BuildRequires: tar
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: libstdc++-devel
BuildRequires: zlib-devel
BuildRequires: gzip
BuildRequires: python
%{?el5:BuildRequires: python27}
%{?el5:BuildRequires: redhat-rpm-config}
Patch0: node-js.centos5.configure.patch
Patch1: node-js.centos5.gyp.patch
Patch2: node-js.centos5.icu.patch
Patch3: node-js.v8_inspector.gyp.patch
Patch4: node-js.node.gyp-python27.patch
%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.
%package binary
Summary: Node.js build binary tarballs
Group: Development/Libraries
License: MIT License
URL: http://nodejs.org
%description binary
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.
%package npm
Summary: Node Packaged Modules
Group: Development/Libraries
License: MIT License
URL: http://nodejs.org
Provides: is24-npm
Requires: is24-nodejs
%description npm
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.
%package devel
Summary: Header files for %{name}
Group: Development/Libraries
Requires: %{name}
%description devel
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
rm -rf $RPM_SOURCE_DIR/%{_orig_base}-v%{version}
%setup -q -n %{_orig_base}-v%{version}
%if 0%{?rhel} == 5
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%endif
%build
%if 0%{?rhel} == 5
export PYTHON=python2.7
%endif
%define _node_arch %{nil}
%ifarch x86_64
%define _node_arch x64
%endif
%ifarch i386 i686
%define _node_arch x86
%endif
if [ -z %{_node_arch} ];then
echo "bad arch"
exit 1
fi
./configure \
--shared-openssl \
--shared-openssl-includes=%{_includedir} \
--shared-zlib \
--shared-zlib-includes=%{_includedir}
make binary %{?_smp_mflags}
pushd $RPM_SOURCE_DIR
mv $RPM_BUILD_DIR/%{_orig_base}-v%{version}/%{_orig_base}-v%{version}-linux-%{_node_arch}.tar.gz .
rm -rf %{_orig_base}-v%{version}
tar zxvf %{_orig_base}-v%{version}-linux-%{_node_arch}.tar.gz
popd
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}
cp -Rp $RPM_SOURCE_DIR/%{_orig_base}-v%{version}-linux-%{_node_arch}/* $RPM_BUILD_ROOT%{_prefix}/
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{_orig_base}-v%{version}/
for file in CHANGELOG.md LICENSE README.md ; do
mv $RPM_BUILD_ROOT%{_prefix}/$file $RPM_BUILD_ROOT%{_defaultdocdir}/%{_orig_base}-v%{version}/
done
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d/
mv $RPM_BUILD_ROOT%{_node_original_docdir}/* $RPM_BUILD_ROOT%{_defaultdocdir}/%{_orig_base}-v%{version}/
rm -rf $RPM_BUILD_ROOT%{_node_original_docdir}
mkdir -p $RPM_BUILD_ROOT%{_datarootdir}/%{_orig_base}js
mv $RPM_SOURCE_DIR/%{_orig_base}-v%{version}-linux-%{_node_arch}.tar.gz $RPM_BUILD_ROOT%{_datarootdir}/%{_orig_base}js/
# prefix all manpages with "npm-"
pushd $RPM_BUILD_ROOT%{_libdir}/node_modules/npm/man/
for dir in *; do
mkdir -p $RPM_BUILD_ROOT%{_mandir}/$dir
pushd $dir
for page in *; do
if [[ $page != npm* ]]; then
mv $page npm-$page
fi
done
popd
cp $dir/* $RPM_BUILD_ROOT%{_mandir}/$dir
done
popd
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_SOURCE_DIR/%{_orig_base}-v%{version}-linux-%{_node_arch}
%files
%defattr(-,root,root,-)
%{_defaultdocdir}/%{_orig_base}-v%{version}
%defattr(755,root,root)
%{_bindir}/node
%defattr(644,root,root)
/etc/profile.d/bui_node7_env.sh
%doc
%{_mandir}/man1/node*
%files binary
%defattr(-,root,root,-)
%{_datarootdir}/%{_orig_base}js/%{_orig_base}-v%{version}-linux-%{_node_arch}.tar.gz
%files npm
%defattr(-,root,root,-)
%{_libdir}/node_modules/npm
%{_bindir}/npm
%doc
%{_mandir}/man1/npm*
%{_mandir}/man5
%{_mandir}/man7
%files devel
%{_includedir}/node/
%{tapsetroot}
%changelog
* Tue Jul 18 2017 Robert Ehmann <robert.ehmann@scout24.com> - 6.11.1-1
- downgrade to LTS version 6.11.1
* Tue Jul 18 2017 Robert Ehmann <robert.ehmann@scout24.com> - 7.10.1-1
- update to 7.10.1
* Wed Apr 12 2017 Ralph Angenendt <ralph.angenendt@scout24.com> - 7.9.0-1
- update to 7.9.0
* Mon Apr 03 2017 Ralph Angenendt <ralph.angenendt@scout24.com> - 7.8.0-1
- update to 7.8.0, build for IS24 environment
* Wed Mar 22 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.7.4-1
- updated to node.js version 7.7.4
* Wed Mar 15 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.7.3-1
- updated to node.js version 7.7.3
* Thu Mar 9 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.7.2-1
- updated to node.js version 7.7.2
* Thu Mar 2 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.7.1-1
- updated to node.js version 7.7.1
* Wed Mar 1 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.7.0-1
- updated to node.js version 7.7.0
* Wed Feb 22 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.6.0-1
- updated to node.js version 7.6.0
* Wed Feb 1 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.5.0-1
- updated to node.js version 7.5.0
* Thu Jan 5 2017 Kazuhisa Hara <kazuhisya@gmail.com> - 7.4.0-1
- updated to node.js version 7.4.0
* Wed Dec 21 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 7.3.0-1
- updated to node.js version 7.3.0
* Wed Dec 7 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 7.2.1-1
- updated to node.js version 7.2.1
* Thu Nov 24 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 7.2.0-1
- updated to node.js version 7.2.0
* Wed Nov 9 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 7.1.0-1
- updated to node.js version 7.1.0
* Wed Oct 26 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 7.0.0-1
- updated to node.js version 7.0.0
* Mon Oct 24 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.9.1-1
- updated to node.js version 6.9.1
* Wed Oct 19 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.9.0-1
- updated to node.js version 6.9.0
* Tue Oct 18 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.8.1-1
- updated to node.js version 6.8.1
* Thu Oct 13 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.8.0-1
- updated to node.js version 6.8.0
* Fri Sep 30 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.7.0-1
- updated to node.js version 6.7.0
* Fri Sep 16 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.6.0-1
- updated to node.js version 6.6.0
* Tue Sep 13 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.5.0-2
- Added SUSE Support. fix #58
* Tue Aug 30 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.5.0-1
- updated to node.js version 6.5.0
* Wed Aug 17 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.4.0-1
- updated to node.js version 6.4.0
* Fri Jul 22 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.3.1-1
- updated to node.js version 6.3.1
* Thu Jul 21 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.3.0-2
- Minor fixes to make it fully compatible with CentOS 7 #57
* Thu Jul 7 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.3.0-1
- updated to node.js version 6.3.0
* Mon Jun 20 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.2.2-1
- updated to node.js version 6.2.2
* Fri Jun 3 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.2.1-1
- updated to node.js version 6.2.1
* Wed May 18 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.2.0-1
- Updated to node.js version 6.2.0
* Tue May 10 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.1.0-2
- dist tag is get in the way in accordance with the guidelines. #54
* Fri May 6 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.1.0-1
- Updated to node.js version 6.1.0
* Wed Apr 27 2016 Kazuhisa Hara <kazuhisya@gmail.com> - 6.0.0-1
- Updated to node.js version 6.0.0