3 %bcond_with tests # build with tests (require network access)
5 Summary: Platform layer for node.js
9 # the licensing breakdown is described in detail in the LICENSE file
10 License: MIT and BSD and ISC
11 Group: Development/Tools
12 URL: http://nodejs.org/
13 Source0: http://libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz
14 # Source0-md5: 45ff7b043bd0139fc3fd289991411dc5
15 Source2: %{name}.pc.in
16 BuildRequires: libstdc++-devel
17 BuildRequires: pkgconfig
18 BuildRequires: python-gyp
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 # we only need major.minor in the SONAME in the stable (even numbered) series
22 # this should be changed to %{version} in unstable (odd numbered) releases
26 libuv is a new platform layer for Node. Its purpose is to abstract
27 IOCP on Windows and libev on Unix systems. We intend to eventually
28 contain all platform differences in this library.
31 Summary: Development libraries for libuv
32 Group: Development/Tools
33 Requires: %{name} = %{version}-%{release}
36 Development libraries for libuv.
39 %setup -q -n %{name}-v%{version}
44 LDFLAGS="%{rpmldflags}" \
45 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
46 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
48 -Dcomponent=shared_library \
49 -Dlibrary=shared_library
51 %{__make} V=1 -C out \
57 LDFLAGS.host="%{rpmldflags}"
65 rm -rf $RPM_BUILD_ROOT
66 # Copy the shared lib into the libdir
67 install -d $RPM_BUILD_ROOT%{_libdir}
68 cp -p out/Release/obj.target/libuv.so $RPM_BUILD_ROOT%{_libdir}/libuv.so.%{version}
69 lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libuv.so.*.*.*)
70 ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libuv.so.%{sover}
71 ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libuv.so
73 # Copy the headers into the include path
74 install -d $RPM_BUILD_ROOT/%{_includedir}/uv-private
75 cp -p include/uv.h $RPM_BUILD_ROOT/%{_includedir}
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
83 # Create the pkgconfig file
84 install -d $RPM_BUILD_ROOT/%{_pkgconfigdir}
85 sed -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" \
89 -e "s#@version@#%{version}#g" \
90 %{SOURCE2} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libuv.pc
93 rm -rf $RPM_BUILD_ROOT
95 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
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}
105 %defattr(644,root,root,755)
107 %{_pkgconfigdir}/libuv.pc
109 %{_includedir}/uv-private