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