]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
2156f81e17ed216c9dea5e60754adde81b746195
[packages/nodejs.git] / nodejs.spec
1 # TODO:
2 # - use system waf
3
4 # For the 1.2 branch, we use 0s here
5 # For 1.3+, we use the three digit versions
6 %define         somajor 2
7 %define         sominor 1
8 %define         sobuild 2
9 %define         sover %{somajor}.%{sominor}.%{sobuild}
10
11 Summary:        Asynchronous JavaScript Engine
12 Name:           nodejs
13 Version:        0.1.33
14 Release:        0
15 License:        BSD
16 Group:          Libraries
17 URL:            http://nodejs.org/
18 Source0:        http://nodejs.org/dist/node-v%{version}.tar.gz
19 # Source0-md5:  d34173ead6119b9a593176a9c7522cea
20 Source1:        http://www.crockford.com/javascript/jsmin.py.txt
21 # Source1-md5:  0521ddcf3e52457223c6e0d602486a89
22 BuildRequires:  gcc >= 5:4.0
23 BuildRequires:  libeio-devel
24 BuildRequires:  libev-devel >= 3.90
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  python
27 BuildRequires:  rpm >= 4.4.9-56
28 BuildRequires:  udns-devel
29 BuildRequires:  v8-devel >= 2.1.5
30 ExclusiveArch:  %{ix86} %{x8664} arm
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Node's goal is to provide an easy way to build scalable network
35 programs. In the above example, the two second delay does not prevent
36 the server from handling new requests. Node tells the operating system
37 (through epoll, kqueue, /dev/poll, or select) that it should be
38 notified when the 2 seconds are up or if a new connection is made --
39 then it goes to sleep. If someone new connects, then it executes the
40 callback, if the timeout expires, it executes the inner callback. Each
41 connection is only a small heap allocation.
42
43 %package devel
44 Summary:        Development headers for nodejs
45 Group:          Development/Libraries
46
47 %description devel
48 Development headers for nodejs.
49
50 %prep
51 %setup -q -n node-v%{version}
52
53 %build
54 # build library
55
56 CFLAGS="%{rpmcflags}"
57 CXXFLAGS="%{rpmcxxflags}"
58 LDFLAGS="%{rpmcflags}"
59 %if "%{pld_release}" == "ac"
60 CC=%{__cc}4
61 CXX=%{__cxx}4
62 %else
63 CC=%{__cc}
64 CXX=%{__cxx}
65 %endif
66 export CFLAGS LDFLAGS CXXFLAGS CC CXX
67
68 tools/waf-light configure \
69         --system \
70         --prefix=%{_prefix}
71
72 tools/waf-light build
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries}
77
78 tools/waf-light install \
79         --destdir=$RPM_BUILD_ROOT
80
81 install lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries/
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88 %doc AUTHORS ChangeLog LICENSE
89 %attr(755,root,root) %{_bindir}/node
90 %attr(755,root,root) %{_bindir}/node-repl
91 %dir %{_libdir}/node
92 %dir %{_libdir}/node/libraries
93 %{_libdir}/node/libraries/*.js
94 %{_mandir}/man1/node.1*
95
96 %files devel
97 %defattr(644,root,root,755)
98 %dir %{_includedir}/node
99 %{_includedir}/node/*.h
100 %attr(755,root,root) %{_bindir}/node-waf
101 %{_libdir}/node/wafadmin/
This page took 0.088164 seconds and 3 git commands to generate.