129 lines
3.7 KiB
RPMSpec
129 lines
3.7 KiB
RPMSpec
%global git_snapshot 09b0222
|
|
|
|
Name: libuv
|
|
Version: 0.9.3
|
|
Release: 0.3.git%{git_snapshot}%{?dist}
|
|
Summary: Platform layer for node.js
|
|
|
|
Group: Development/Tools
|
|
License: MIT
|
|
URL: http://nodejs.org/
|
|
|
|
# Generated by:
|
|
# libuv-snapshot.sh
|
|
Source0: libuv-%{version}git%{git_snapshot}.tar.gz
|
|
Source1: libuv-snapshot.sh
|
|
Source2: libuv.pc.in
|
|
|
|
BuildRequires: gyp
|
|
Requires(post): /sbin/ldconfig
|
|
Requires(postun): /sbin/ldconfig
|
|
|
|
# Bundling exception request:
|
|
# https://fedorahosted.org/fpc/ticket/231
|
|
Provides: bundled(libev) = 4.04
|
|
|
|
# Properly export missing function
|
|
Patch0001: 0001-Export-uv_inet_-functions.patch
|
|
|
|
%description
|
|
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
|
|
Windows and libev on Unix systems. We intend to eventually contain all platform
|
|
differences in this library.
|
|
|
|
%package devel
|
|
Summary: Development libraries for libuv
|
|
Group: Development/Tools
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: pkgconfig
|
|
Requires(post): /sbin/ldconfig
|
|
Requires(postun): /sbin/ldconfig
|
|
|
|
%description devel
|
|
Development libraries for libuv
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%patch0001 -p1
|
|
|
|
%build
|
|
./gyp_uv -Dcomponent=shared_library -Dlibrary=shared_library
|
|
|
|
# Modify the build so it produces a versioned shared library
|
|
pushd out
|
|
mv libuv.target.mk libuv.target.mk.orig
|
|
sed "s/libuv.so/libuv.so.%{version}/g" libuv.target.mk.orig > libuv.target.mk
|
|
mv run-benchmarks.target.mk run-benchmarks.target.mk.orig
|
|
sed "s/libuv.so/libuv.so.%{version}/g" run-benchmarks.target.mk.orig > run-benchmarks.target.mk
|
|
mv run-tests.target.mk run-tests.target.mk.orig
|
|
sed "s/libuv.so/libuv.so.%{version}/g" run-tests.target.mk.orig > run-tests.target.mk
|
|
popd
|
|
|
|
make %{?_smp_mflags} V=1 -C out BUILDTYPE=Release
|
|
|
|
%install
|
|
# Copy the shared lib into the libdir
|
|
mkdir -p %{buildroot}/%{_libdir}/
|
|
cp out/Release/obj.target/libuv.so.%{version} %{buildroot}/%{_libdir}/libuv.so.%{version}
|
|
pushd %{buildroot}/%{_libdir}/
|
|
ln -s libuv.so.%{version} libuv.so.0
|
|
ln -s libuv.so.%{version} libuv.so
|
|
popd
|
|
|
|
# Copy the headers into the include path
|
|
mkdir -p %{buildroot}/%{_includedir}/uv-private
|
|
|
|
cp %{_builddir}/%{name}-%{version}/include/uv.h \
|
|
%{buildroot}/%{_includedir}
|
|
|
|
cp %{_builddir}/%{name}-%{version}/include/uv-private/ev.h \
|
|
%{_builddir}/%{name}-%{version}/include/uv-private/ev-proto.h \
|
|
%{_builddir}/%{name}-%{version}/include/uv-private/ngx-queue.h \
|
|
%{_builddir}/%{name}-%{version}/include/uv-private/tree.h \
|
|
%{_builddir}/%{name}-%{version}/include/uv-private/uv-linux.h \
|
|
%{_builddir}/%{name}-%{version}/include/uv-private/uv-unix.h \
|
|
%{buildroot}/%{_includedir}/uv-private
|
|
|
|
# Create the pkgconfig file
|
|
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
|
|
|
|
sed -e "s#@prefix@#%{_prefix}#g" \
|
|
-e "s#@exec_prefix@#%{_exec_prefix}#g" \
|
|
-e "s#@libdir@#%{_libdir}#g" \
|
|
-e "s#@includedir@#%{_includedir}#g" \
|
|
-e "s#@version@#%{version}.git%{git_snapshot}#g" \
|
|
%SOURCE2 > %{buildroot}/%{_libdir}/pkgconfig/libuv.pc
|
|
|
|
%check
|
|
# Tests are currently disabled because some require network access
|
|
# Working with upstream to split these out
|
|
#./run-tests
|
|
#./run-benchmarks
|
|
|
|
%post -p /sbin/ldconfig
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files
|
|
%doc README.md AUTHORS LICENSE
|
|
%{_libdir}/libuv.so.*
|
|
|
|
%files devel
|
|
%doc README.md AUTHORS LICENSE
|
|
%{_libdir}/libuv.so
|
|
%{_libdir}/pkgconfig/libuv.pc
|
|
%{_includedir}/uv.h
|
|
%{_includedir}/uv-private
|
|
|
|
%changelog
|
|
* Thu Nov 15 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-0.3.git09b0222
|
|
- Add patch to export uv_inet_*
|
|
|
|
* Wed Nov 14 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-0.2.git09b0222
|
|
- Fixes from package review
|
|
- Removed doubly-listed include directory
|
|
- Update git tarball to the latest upstream code
|
|
|
|
* Thu Nov 08 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-0.1.gitd56434a
|
|
- Initial package
|