]> git.pld-linux.org Git - packages/nodejs.git/blame - nodejs.spec
drop ac support; py25 required
[packages/nodejs.git] / nodejs.spec
CommitLineData
210abff9 1Summary: Asynchronous JavaScript Engine
2Name: nodejs
9dc0bdad 3Version: 0.10.3
7c7c1bb0 4Release: 1
e85103e0
ER
5License: BSD and MIT and ASL 2.0 and GPLv3
6Group: Development/Languages
cb51f00f 7Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
9dc0bdad 8# Source0-md5: 4daca92618515708a4631e98a8e8c779
4174c079 9Patch1: %{name}-shared.patch
a6070ceb
ER
10# force node to use /usr/lib/node as the systemwide module directory
11Patch2: %{name}-libpath.patch
12# use /usr/lib64/node as an arch-specific module dir when appropriate
13Patch3: %{name}-lib64path.patch
1385a038 14Patch5: uv-fpic.patch
4174c079 15URL: http://www.nodejs.org/
12a49d35 16BuildRequires: gcc >= 5:4.0
210abff9 17BuildRequires: libstdc++-devel
a6070ceb
ER
18BuildRequires: python >= 1:2.5.2
19BuildRequires: python-jsmin
12a49d35 20BuildRequires: rpm >= 4.4.9-56
d44c8857 21BuildRequires: rpmbuild(macros) >= 1.219
1ed21df5 22BuildRequires: v8-devel >= 3.15.11.10
5ef76b51 23Obsoletes: nodejs-waf
210abff9 24ExclusiveArch: %{ix86} %{x8664} arm
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
c3b531ba
ER
28Node.js is a platform built on Chrome's JavaScript runtime for easily
29building fast, scalable network applications. Node.js uses an
30event-driven, non-blocking I/O model that makes it lightweight and
31efficient, perfect for data-intensive real-time applications that run
32across distributed devices.
210abff9 33
210abff9 34%package devel
12a49d35 35Summary: Development headers for nodejs
210abff9 36Group: Development/Libraries
a8f57a3f 37Requires: %{name} = %{version}-%{release}
d44c8857
ER
38Requires: gcc
39Requires: libstdc++-devel
fae304aa 40Requires: v8-devel
210abff9 41
42%description devel
12a49d35 43Development headers for nodejs.
210abff9 44
a6070ceb
ER
45%package doc
46Summary: Evented I/O for V8 JavaScript - documentation
47Group: Documentation
48
49%description doc
50Node.js is a server-side JavaScript environment that uses an
51asynchronous event-driven model. Node's goal is to provide an easy way
52to build scalable network programs.
53
54This package contains the documentation for nodejs.
55
210abff9 56%prep
57%setup -q -n node-v%{version}
a600c300 58%patch1 -p1
a6070ceb
ER
59%if %{_lib} == "lib64"
60%patch3 -p1
61%else
62%patch2 -p1
63%endif
1385a038 64%patch5 -p1
c4aa3bb0 65
210abff9 66%build
cb51f00f
ER
67# Error: V8 doesn't like ccache. Please set your CC env var to 'gcc'
68CC=${CC#ccache }
a600c300
ŁC
69
70# NOT autoconf so dont use macro
71export PYTHONPATH=tools
a6070ceb 72./configure \
a6070ceb
ER
73 --shared-v8 \
74 --shared-zlib \
be06d6d0 75 --shared-openssl \
7223b5ac 76 --without-npm \
210abff9 77 --prefix=%{_prefix}
78
5ef76b51
AS
79%{__make} -C out \
80 BUILDTYPE=Release \
81 V=1 \
82 CFLAGS.host="%{rpmcflags} -fPIC" \
83 CXXFLAGS.host="%{rpmcppflags} -fPIC" \
84 LDFLAGS.host="%{rpmcflags}" \
85 CFLAGS.target="%{rpmcflags} -fPIC" \
86 CXXFLAGS.target="%{rpmcppflags} -fPIC" \
87 LDFLAGS.target="%{rpmcflags}" \
5ef76b51
AS
88 CC.host="%{__cc}" \
89 CXX.host="%{__cxx}" \
90 CC.target="%{__cc}" \
91 CXX.target="%{__cxx}"
210abff9 92
93%install
94rm -rf $RPM_BUILD_ROOT
be06d6d0
AS
95%{__make} justinstall \
96 DESTDIR=$RPM_BUILD_ROOT \
4174c079
ER
97 LIBDIR=%{_lib}
98
99# no dtrace on linux
100%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/lib/dtrace/node.d
be06d6d0 101
4174c079
ER
102lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libnode.so.*.*)
103ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libnode.so.10
104ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libnode.so
a6070ceb 105
c7898157
ER
106echo '.so man1/node.1' > $RPM_BUILD_ROOT%{_mandir}/man1/nodejs.1
107
1ed21df5 108install -d $RPM_BUILD_ROOT%{_includedir}/node
4174c079 109cp -p src/*.h $RPM_BUILD_ROOT%{_includedir}/node
1ed21df5 110
e85103e0 111# for compat of fedora derivered scripts (shebangs)
c3b531ba
ER
112ln -s node $RPM_BUILD_ROOT%{_bindir}/nodejs
113
e85103e0
ER
114# globally installed node modules (noarch)
115install -d $RPM_BUILD_ROOT%{_prefix}/lib/node_modules
116
117# default searchpaths
118install -d $RPM_BUILD_ROOT{%{_libdir},%{_prefix}/lib}/node
119
a6070ceb
ER
120# create pkgconfig
121install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
122cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
123version=%{version}
c3b531ba 124prefix=%{_prefix}
87c4fdf2 125libdir=${prefix}/%{_lib}
a6070ceb
ER
126includedir=${prefix}/include/node
127
128Name: nodejs
129Description: Evented I/O for V8 JavaScript.
130Version: ${version}
131Cflags: -I${includedir}
132EOF
a752c1c0 133
a6070ceb 134# install documentation
6f7eebb5
ER
135install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
136cp -a doc/api/* $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
137rm $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/*.markdown
138rm $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/*.json
a6070ceb 139
210abff9 140%clean
141rm -rf $RPM_BUILD_ROOT
142
4174c079 143%post -p /sbin/ldconfig
7372d27d 144%postun -p /sbin/ldconfig
145
210abff9 146%files
147%defattr(644,root,root,755)
a6070ceb 148%doc README.md AUTHORS ChangeLog LICENSE
210abff9 149%attr(755,root,root) %{_bindir}/node
c3b531ba 150%attr(755,root,root) %{_bindir}/nodejs
a600c300 151%attr(755,root,root) %{_libdir}/libnode.so.*.*.*
2492de83 152%ghost %{_libdir}/libnode.so.10
a600c300 153%if "%{_lib}" != "lib"
8791ea86 154%dir %{_libdir}/node
a600c300
ŁC
155%endif
156%dir %{_prefix}/lib/node
e85103e0 157%dir %{_prefix}/lib/node_modules
210abff9 158%{_mandir}/man1/node.1*
c7898157 159%{_mandir}/man1/nodejs.1
210abff9 160
210abff9 161%files devel
162%defattr(644,root,root,755)
a600c300 163%{_libdir}/libnode.so
58494f0c 164%{_includedir}/node
a6070ceb
ER
165%{_pkgconfigdir}/nodejs.pc
166
167%files doc
168%defattr(644,root,root,755)
169%doc %{_docdir}/%{name}-doc-%{version}
This page took 0.08104 seconds and 4 git commands to generate.