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