]> git.pld-linux.org Git - packages/nodejs.git/blame - nodejs.spec
- new soname for 0.6 series
[packages/nodejs.git] / nodejs.spec
CommitLineData
210abff9 1Summary: Asynchronous JavaScript Engine
2Name: nodejs
c3b531ba
ER
3Version: 0.6.8
4Release: 1
210abff9 5License: BSD
6Group: Libraries
c3b531ba
ER
7URL: http://www.nodejs.org/
8Source0: http://www.nodejs.org/dist/node-v%{version}.tar.gz
9# Source0-md5: 9fd7baa2d27b848c3134e6ae35bb87b2
fb6f511a 10Patch1: %{name}-soname.patch
a6070ceb
ER
11# force node to use /usr/lib/node as the systemwide module directory
12Patch2: %{name}-libpath.patch
13# use /usr/lib64/node as an arch-specific module dir when appropriate
14Patch3: %{name}-lib64path.patch
a3293030 15BuildRequires: c-ares-devel >= 1.7.4
12a49d35 16BuildRequires: gcc >= 5:4.0
210abff9 17BuildRequires: libeio-devel
a3293030 18BuildRequires: libev-devel >= 4.0.0
210abff9 19BuildRequires: libstdc++-devel
a6070ceb
ER
20BuildRequires: python >= 1:2.5.2
21BuildRequires: python-jsmin
12a49d35 22BuildRequires: rpm >= 4.4.9-56
a6070ceb 23BuildRequires: v8-devel >= 3.6
210abff9 24ExclusiveArch: %{ix86} %{x8664} arm
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
c3b531ba
ER
28Node.js is a platform built on Chrome's JavaScript runtime for easily
29building fast, scalable network applications. Node.js uses an
30event-driven, non-blocking I/O model that makes it lightweight and
31efficient, perfect for data-intensive real-time applications that run
32across distributed devices.
210abff9 33
210abff9 34%package devel
12a49d35 35Summary: Development headers for nodejs
210abff9 36Group: Development/Libraries
a8f57a3f 37Requires: %{name} = %{version}-%{release}
210abff9 38
39%description devel
12a49d35 40Development headers for nodejs.
210abff9 41
a6070ceb
ER
42%package doc
43Summary: Evented I/O for V8 JavaScript - documentation
44Group: Documentation
45
46%description doc
47Node.js is a server-side JavaScript environment that uses an
48asynchronous event-driven model. Node's goal is to provide an easy way
49to build scalable network programs.
50
51This package contains the documentation for nodejs.
52
53%package waf
54Summary: Evented I/O for V8 JavaScript - customized WAF build system
55Group: Libraries
56Requires: %{name} = %{version}-%{release}
57
58%description waf
59Node.js is a server-side JavaScript environment that uses an
60asynchronous event-driven model. Node's goal is to provide an easy way
61to build scalable network programs.
62
63This package contains the customized version of the WAF build system
64used by Node.js and many of its modules.
65
210abff9 66%prep
67%setup -q -n node-v%{version}
fb6f511a 68%patch1 -p1
a6070ceb
ER
69%if %{_lib} == "lib64"
70%patch3 -p1
71%else
72%patch2 -p1
73%endif
210abff9 74
75%build
a6070ceb 76%undefine with_ccache
210abff9 77# build library
a6070ceb
ER
78CFLAGS="%{rpmcflags} -fPIC"
79CXXFLAGS="%{rpmcxxflags} -fPIC"
210abff9 80LDFLAGS="%{rpmcflags}"
81%if "%{pld_release}" == "ac"
8791ea86
ER
82CC="%{__cc}4"
83CXX="%{__cxx}4"
210abff9 84%else
8791ea86
ER
85CC="%{__cc}"
86CXX="%{__cxx}"
210abff9 87%endif
58494f0c 88export CFLAGS LDFLAGS CXXFLAGS CC CXX
210abff9 89
a6070ceb 90# NOT autoconf so dont use macro
7372d27d 91export PYTHONPATH=tools
a6070ceb 92./configure \
b52d635c 93 --shared-cares \
a6070ceb
ER
94 --shared-v8 \
95 --shared-zlib \
a8f57a3f 96 --libdir=%{_libdir} \
210abff9 97 --prefix=%{_prefix}
98
a6070ceb
ER
99%{__make} dynamiclib
100%{__make} program
7372d27d 101
a6070ceb
ER
102# relink with shared lib
103$CC -o out/Release/node src/node_main.cc -Isrc -Ideps/uv/include -lnode -Lout/Release
210abff9 104
105%install
106rm -rf $RPM_BUILD_ROOT
a6070ceb
ER
107%{__make} install \
108 DESTDIR=$RPM_BUILD_ROOT
109
c3b531ba
ER
110ln -s node $RPM_BUILD_ROOT%{_bindir}/nodejs
111
a6070ceb 112# install shared lib
7372d27d 113export PYTHONPATH=tools
8791ea86 114%{__python} tools/waf-light install \
7372d27d 115 --product-type=cshlib \
116 --destdir=$RPM_BUILD_ROOT
117
87c4fdf2
ER
118chmod a+x $RPM_BUILD_ROOT%{_libdir}/*.so*
119
a6070ceb
ER
120# create pkgconfig
121install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
122cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
123version=%{version}
c3b531ba 124prefix=%{_prefix}
87c4fdf2 125libdir=${prefix}/%{_lib}
a6070ceb
ER
126includedir=${prefix}/include/node
127
128Name: nodejs
129Description: Evented I/O for V8 JavaScript.
130Version: ${version}
131Cflags: -I${includedir}
132EOF
a752c1c0 133
a6070ceb
ER
134# install documentation
135install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/html
136cp -a doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/html
137cd $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
138install -d api
139mv html/api/*.markdown api
140mv html/api/api/* html/api
141rm -rf html/api/api
142cd -
143
144# remove NPM; it's buggy in 0.6.3
145# but really we package npm from separate spec
146rm -rf $RPM_BUILD_ROOT%{_libdir}/node_modules
147rm $RPM_BUILD_ROOT%{_bindir}/npm
27cf5215 148
210abff9 149%clean
150rm -rf $RPM_BUILD_ROOT
151
7372d27d 152%post -p /sbin/ldconfig
153%postun -p /sbin/ldconfig
154
210abff9 155%files
156%defattr(644,root,root,755)
a6070ceb 157%doc README.md AUTHORS ChangeLog LICENSE
210abff9 158%attr(755,root,root) %{_bindir}/node
c3b531ba 159%attr(755,root,root) %{_bindir}/nodejs
7372d27d 160%attr(755,root,root) %{_libdir}/libnode.so.*.*.*
8791ea86
ER
161%ghost %{_libdir}/libnode.so.4
162%dir %{_libdir}/node
210abff9 163%{_mandir}/man1/node.1*
164
210abff9 165%files devel
166%defattr(644,root,root,755)
7372d27d 167%{_libdir}/libnode.so
58494f0c 168%{_includedir}/node
a6070ceb
ER
169%{_pkgconfigdir}/nodejs.pc
170
171%files doc
172%defattr(644,root,root,755)
173%doc %{_docdir}/%{name}-doc-%{version}
174
175%files waf
176%defattr(644,root,root,755)
c6be74cc 177%attr(755,root,root) %{_bindir}/node-waf
afb1c7e5
PZ
178%dir %{_libdir}/node/wafadmin
179%dir %{_libdir}/node/wafadmin/Tools
180%{_libdir}/node/wafadmin/*.py
181%{_libdir}/node/wafadmin/Tools/*.py
This page took 0.056826 seconds and 4 git commands to generate.