libpthread-stubs0/libpthread-stubs0.spec

142 lines
6.1 KiB
RPMSpec
Raw Normal View History

Name: libpthread-stubs0
Version: 0.2
Release: 4mamba
Summary: This library provides weak aliases for pthread functions not provided in libc
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://xcb.freedesktop.org
Source: http://xcb.freedesktop.org/dist/libpthread-stubs-%{version}.tar.bz2
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
%ifarch x86_64_disabled
BuildRequires: gcc-multilib
BuildRequires: glibc-multilib-devel
%endif
Obsoletes: lib32-libpthread-stubs0
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This library provides weak aliases for pthread functions not provided in libc or otherwise available by default.
Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs.
On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior.
%package devel
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: lib32-libpthread-stubs0-devel
%description devel
This library provides weak aliases for pthread functions not provided in libc or otherwise available by default.
Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs.
On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior.
This package contains static libraries and header files needed for development.
%package -n lib32-%{name}
Summary: This library provides weak aliases for pthread functions not provided in libc
Group: System/Libraries
%description -n lib32-%{name}
This library provides weak aliases for pthread functions not provided in libc or otherwise available by default.
Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs.
On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior.
%package -n lib32-%{name}-devel
Summary: Devel package for lib32-%{name}
Group: Development/Libraries
Requires: lib32-%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib32-%{name}-devel
This library provides weak aliases for pthread functions not provided in libc or otherwise available by default.
Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs.
On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior.
This package contains static libraries and header files needed for development.
%prep
%setup -q -n libpthread-stubs-%{version}
%build
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%ifarch x86_64_disabled
# x86_64 lib64 support
make clean
CC=%{_target_platform}-gcc \
CFLAGS="%{optflags} -m32" \
CXXLAGS="%{optflags} -m32" \
./configure --prefix=%{_prefix} --libdir=%{_prefix}/lib
make
make install DESTDIR=`pwd`/lib32
cp -a lib32/%{_prefix}/lib %{buildroot}%{_prefix}/
%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n lib32-%{name} -p /sbin/ldconfig
%postun -n lib32-%{name} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libpthread-stubs.so.*
%doc COPYING
%files devel
%defattr(-,root,root)
%{_libdir}/libpthread-stubs.a
%{_libdir}/libpthread-stubs.la
%{_libdir}/libpthread-stubs.so
%{_libdir}/pkgconfig/*.pc
%doc README
%ifarch x86_64_disabled
%files -n lib32-%{name}
%defattr(-,root,root)
%{_prefix}/lib/libpthread-stubs.so.*
%doc COPYING
%files -n lib32-%{name}-devel
%defattr(-,root,root)
%{_prefix}/lib/libpthread-stubs.a
%{_prefix}/lib/libpthread-stubs.la
%{_prefix}/lib/libpthread-stubs.so
%{_prefix}/lib/pkgconfig/*.pc
%endif
%changelog
* Thu Oct 03 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2-4mamba
- x86_64: obsolete lib32-libpthread-stubs0[-devel]
* Wed Jan 15 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2-3mamba
- rebuilt as legacy package
* Sat Oct 10 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2-2mamba
- devel package: don't obsolete main package
* Tue Sep 29 2009 Automatic Build System <autodist@mambasoft.it> 0.2-1mamba
- automatic update by autodist
* Sat Jun 21 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1-3mamba
- correct obsolete for libpthread-stubs
* Fri Jun 20 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1-2mamba
- specfile updated
- removed libpthread-stubs package and obsoleted by libpthread-stubs-devel
* Wed Feb 07 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1-1qilnx
- package created by autospec