3 %bcond_with tests # build with tests (require network access)
5 Summary: Platform layer for node.js
7 # Version 0.10.x (Stable)
8 # Version 0.11.x (Unstable)
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)
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
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.
33 Summary: Development libraries for libuv
34 Group: Development/Tools
35 Requires: %{name} = %{version}-%{release}
38 Development libraries for libuv.
41 %setup -q -n %{name}-v%{version}
46 LDFLAGS="%{rpmldflags}" \
47 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
48 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
50 -Dcomponent=shared_library \
51 -Dlibrary=shared_library
53 %{__make} V=1 -C out \
59 LDFLAGS.host="%{rpmldflags}"
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
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}
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
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
95 rm -rf $RPM_BUILD_ROOT
97 %post -p /sbin/ldconfig
98 %postun -p /sbin/ldconfig
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}
107 %defattr(644,root,root,755)
109 %{_pkgconfigdir}/libuv.pc
111 %{_includedir}/uv-private