]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
9fd0b44116909533b0edf1a4480416ed17c2c0e5
[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.31
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:  a9e0ba08539edbdc8e5611e7550f1c47
20 Source1:        http://www.crockford.com/javascript/jsmin.py.txt
21 # Source1-md5:  0521ddcf3e52457223c6e0d602486a89
22 Patch0:         %{name}-system-libs.patch
23 BuildRequires:  gcc >= 5:4.0
24 BuildRequires:  libeio-devel
25 BuildRequires:  libev-devel >= 3.90
26 BuildRequires:  libstdc++-devel
27 BuildRequires:  python
28 BuildRequires:  rpm >= 4.4.9-56
29 BuildRequires:  udns-devel
30 BuildRequires:  v8-devel
31 ExclusiveArch:  %{ix86} %{x8664} arm
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Node's goal is to provide an easy way to build scalable network
36 programs. In the above example, the two second delay does not prevent
37 the server from handling new requests. Node tells the operating system
38 (through epoll, kqueue, /dev/poll, or select) that it should be
39 notified when the 2 seconds are up or if a new connection is made --
40 then it goes to sleep. If someone new connects, then it executes the
41 callback, if the timeout expires, it executes the inner callback. Each
42 connection is only a small heap allocation.
43
44 %package devel
45 Summary:        Development headers for nodejs
46 Group:          Development/Libraries
47
48 %description devel
49 Development headers for nodejs.
50
51 %prep
52 %setup -q -n node-v%{version}
53 %patch0 -p1
54 rm tools/jsmin.py
55 mv deps/v8/tools/jsmin.py tools/
56 rm -r deps/v8
57 rm -r deps/udns
58 rm -r deps/libev
59 rm -r deps/libeio
60
61 %build
62 # build library
63
64 CFLAGS="%{rpmcflags}"
65 CXXFLAGS="%{rpmcxxflags}"
66 LDFLAGS="%{rpmcflags}"
67 %if "%{pld_release}" == "ac"
68 CC=%{__cc}4
69 CXX=%{__cxx}4
70 %else
71 CC=%{__cc}
72 CXX=%{__cxx}
73 %endif
74 export CFLAGS LDFLAGS CXXFLAGS CC CXX
75
76 tools/waf-light configure \
77         --prefix=%{_prefix}
78
79 tools/waf-light build
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
84
85 tools/waf-light install \
86         --destdir=$RPM_BUILD_ROOT
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
92 %defattr(644,root,root,755)
93 %doc AUTHORS ChangeLog LICENSE
94 %attr(755,root,root) %{_bindir}/node
95 %attr(755,root,root) %{_bindir}/node-repl
96 %dir %{_libdir}/node
97 %dir %{_libdir}/node/libraries
98 %{_libdir}/node/libraries/*.js
99 %{_mandir}/man1/node.1*
100
101 %files devel
102 %defattr(644,root,root,755)
103 %dir %{_includedir}/node
104 %{_includedir}/node/config.h
105 %{_includedir}/node/evcom.h
106 %{_includedir}/node/node.h
107 %{_includedir}/node/node_events.h
108 %{_includedir}/node/node_net.h
109 %{_includedir}/node/node_object_wrap.h
110 %{_includedir}/node/node_version.h
This page took 0.086536 seconds and 3 git commands to generate.