]> git.pld-linux.org Git - packages/libuv.git/blame - libuv.spec
up to 0.10.25 (2014.02.19)
[packages/libuv.git] / libuv.spec
CommitLineData
ed65a017
ER
1#
2# Conditional build:
3%bcond_with tests # build with tests (require network access)
4
35f93c77
ER
5Summary: Platform layer for node.js
6Name: libuv
079b5a81 7Version: 0.10.25
35f93c77 8Release: 1
9b353dfd
ER
9# the licensing breakdown is described in detail in the LICENSE file
10License: MIT and BSD and ISC
35f93c77 11Group: Development/Tools
35f93c77 12Source0: http://libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz
079b5a81 13# Source0-md5: 329a61fa3c30acf46efef1a9221b2054
35f93c77 14Source2: %{name}.pc.in
079b5a81 15URL: http://nodejs.org/
fcb1ba24
ER
16BuildRequires: libstdc++-devel
17BuildRequires: pkgconfig
2b5915b2 18BuildRequires: python-gyp
35f93c77
ER
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21# we only need major.minor in the SONAME in the stable (even numbered) series
45a84536 22# this should be changed to %{version} in unstable (odd numbered) releases
35f93c77
ER
23%define sover 0.10
24
25%description
26libuv is a new platform layer for Node. Its purpose is to abstract
27IOCP on Windows and libev on Unix systems. We intend to eventually
28contain all platform differences in this library.
29
30%package devel
31Summary: Development libraries for libuv
32Group: Development/Tools
33Requires: %{name} = %{version}-%{release}
34
35%description devel
9b353dfd 36Development libraries for libuv.
35f93c77
ER
37
38%prep
39%setup -q -n %{name}-v%{version}
35f93c77
ER
40
41%build
42CC="%{__cc}" \
43CXX="%{__cxx}" \
44LDFLAGS="%{rpmldflags}" \
45CFLAGS="%{rpmcflags} %{rpmcppflags}" \
46CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
079b5a81 47./gyp_uv.py \
35f93c77
ER
48 -Dcomponent=shared_library \
49 -Dlibrary=shared_library
50
35f93c77
ER
51%{__make} V=1 -C out \
52 CC="%{__cc}" \
53 CXX="%{__cxx}" \
54 BUILDTYPE=Release \
55 CC.host="%{__cc}" \
56 CXX.host="%{__cxx}" \
57 LDFLAGS.host="%{rpmldflags}"
58
59%if %{with tests}
ed65a017
ER
60./run-tests
61./run-benchmarks
35f93c77
ER
62%endif
63
64%install
65rm -rf $RPM_BUILD_ROOT
66# Copy the shared lib into the libdir
67install -d $RPM_BUILD_ROOT%{_libdir}
9b353dfd 68cp -p out/Release/obj.target/libuv.so $RPM_BUILD_ROOT%{_libdir}/libuv.so.%{version}
35f93c77
ER
69lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libuv.so.*.*.*)
70ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libuv.so.%{sover}
71ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libuv.so
72
73# Copy the headers into the include path
74install -d $RPM_BUILD_ROOT/%{_includedir}/uv-private
75cp -p include/uv.h $RPM_BUILD_ROOT/%{_includedir}
76cp -p \
77 include/uv-private/ngx-queue.h \
78 include/uv-private/tree.h \
79 include/uv-private/uv-linux.h \
80 include/uv-private/uv-unix.h \
81 $RPM_BUILD_ROOT/%{_includedir}/uv-private
82
83# Create the pkgconfig file
84install -d $RPM_BUILD_ROOT/%{_pkgconfigdir}
85sed -e "s#@prefix@#%{_prefix}#g" \
86 -e "s#@exec_prefix@#%{_exec_prefix}#g" \
87 -e "s#@libdir@#%{_libdir}#g" \
88 -e "s#@includedir@#%{_includedir}#g" \
9b353dfd 89 -e "s#@version@#%{version}#g" \
35f93c77
ER
90 %{SOURCE2} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libuv.pc
91
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%post -p /sbin/ldconfig
96%postun -p /sbin/ldconfig
97
98%files
99%defattr(644,root,root,755)
100%doc README.md AUTHORS LICENSE
101%attr(755,root,root) %{_libdir}/libuv.so.*.*.*
102%ghost %{_libdir}/libuv.so.%{sover}
103
104%files devel
105%defattr(644,root,root,755)
35f93c77
ER
106%{_libdir}/libuv.so
107%{_pkgconfigdir}/libuv.pc
108%{_includedir}/uv.h
109%{_includedir}/uv-private
This page took 0.087715 seconds and 4 git commands to generate.