]> git.pld-linux.org Git - packages/nodejs.git/blame - nodejs.spec
- 0.4.3
[packages/nodejs.git] / nodejs.spec
CommitLineData
210abff9 1
210abff9 2Summary: Asynchronous JavaScript Engine
3Name: nodejs
fb6f511a 4Version: 0.4.3
210abff9 5Release: 0
6License: BSD
7Group: Libraries
8URL: http://nodejs.org/
9Source0: http://nodejs.org/dist/node-v%{version}.tar.gz
fb6f511a 10# Source0-md5: a2a6a6699e275a30f6047b1f33281a77
a3293030 11Patch0: %{name}-ev-multiplicity.patch
fb6f511a 12Patch1: %{name}-soname.patch
a3293030 13BuildRequires: c-ares-devel
14BuildRequires: c-ares-devel >= 1.7.4
12a49d35 15BuildRequires: gcc >= 5:4.0
210abff9 16BuildRequires: libeio-devel
a3293030 17BuildRequires: libev-devel >= 4.0.0
210abff9 18BuildRequires: libstdc++-devel
19BuildRequires: python
12a49d35 20BuildRequires: rpm >= 4.4.9-56
2bc97491 21BuildRequires: v8-devel >= 3.1.5
a752c1c0 22BuildRequires: waf
210abff9 23ExclusiveArch: %{ix86} %{x8664} arm
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
e47cb1b9 26%define _plainlibdir %{_prefix}/lib
27
210abff9 28%description
29Node's goal is to provide an easy way to build scalable network
30programs. In the above example, the two second delay does not prevent
31the server from handling new requests. Node tells the operating system
32(through epoll, kqueue, /dev/poll, or select) that it should be
33notified when the 2 seconds are up or if a new connection is made --
34then it goes to sleep. If someone new connects, then it executes the
35callback, if the timeout expires, it executes the inner callback. Each
36connection is only a small heap allocation.
37
210abff9 38%package devel
12a49d35 39Summary: Development headers for nodejs
210abff9 40Group: Development/Libraries
a752c1c0 41Requires: waf
a8f57a3f 42Requires: %{name} = %{version}-%{release}
210abff9 43
44%description devel
12a49d35 45Development headers for nodejs.
210abff9 46
47%prep
48%setup -q -n node-v%{version}
a3293030 49%patch0 -p1
fb6f511a 50%patch1 -p1
210abff9 51
52%build
53# build library
210abff9 54CFLAGS="%{rpmcflags}"
55CXXFLAGS="%{rpmcxxflags}"
56LDFLAGS="%{rpmcflags}"
57%if "%{pld_release}" == "ac"
58CC=%{__cc}4
59CXX=%{__cxx}4
60%else
61CC=%{__cc}
62CXX=%{__cxx}
63%endif
58494f0c 64export CFLAGS LDFLAGS CXXFLAGS CC CXX
210abff9 65
58494f0c
ER
66export PYTHONPATH=tools
67%waf configure \
b52d635c 68 --shared-v8 \
69 --shared-cares \
70 --shared-libev \
a8f57a3f 71 --libdir=%{_libdir} \
210abff9 72 --prefix=%{_prefix}
73
a8f57a3f 74%waf build \
75 --product-type=cshlib
76
77$CC -o node -Isrc src/node_main.cc -lnode -Lbuild/default
210abff9 78
79%install
80rm -rf $RPM_BUILD_ROOT
e47cb1b9 81install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries,%{_plainlibdir}/waf/wafadmin/Tools}
a752c1c0 82
58494f0c
ER
83export PYTHONPATH=tools
84%waf install \
a8f57a3f 85 --product-type=cshlib \
210abff9 86 --destdir=$RPM_BUILD_ROOT
87
a8f57a3f 88install node $RPM_BUILD_ROOT%{_bindir}/node
89
e550379f 90cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries
e47cb1b9 91cp tools/wafadmin/Tools/node_addon.py $RPM_BUILD_ROOT%{_plainlibdir}/waf/wafadmin/Tools
6505a74e 92
a752c1c0 93rm $RPM_BUILD_ROOT%{_bindir}/node-waf
58494f0c
ER
94# ? really required?
95ln -s waf $RPM_BUILD_ROOT%{_bindir}/node-waf
a752c1c0 96
210abff9 97%clean
98rm -rf $RPM_BUILD_ROOT
99
a8f57a3f 100%post -p /sbin/ldconfig
101%postun -p /sbin/ldconfig
102
210abff9 103%files
104%defattr(644,root,root,755)
105%doc AUTHORS ChangeLog LICENSE
106%attr(755,root,root) %{_bindir}/node
210abff9 107%dir %{_libdir}/node
a8f57a3f 108%attr(755,root,root) %{_libdir}/libnode.so.*.*.*
210abff9 109%dir %{_libdir}/node/libraries
110%{_libdir}/node/libraries/*.js
111%{_mandir}/man1/node.1*
112
210abff9 113%files devel
114%defattr(644,root,root,755)
58494f0c 115%{_includedir}/node
c6be74cc 116%attr(755,root,root) %{_bindir}/node-waf
a8f57a3f 117%{_libdir}/libnode.so
e47cb1b9 118%{_plainlibdir}/waf/wafadmin/Tools/node_addon.py
a8f57a3f 119%{_libdir}/pkgconfig/nodejs.pc
This page took 0.098338 seconds and 4 git commands to generate.