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