%global libmajor 2
Summary: POSIX threads C++ access library
Name: clthreads
Version: 2.4.0
Release: 7%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://kokkinizita.linuxaudio.org/linuxaudio/
Source0: http://kokkinizita.linuxaudio.org/linuxaudio/downloads/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Clthreads is a C++ wrapper library around the POSIX threads API.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Clthreads is a C++ wrapper library around the POSIX threads API. This package
contains libraries and header files for developing applications that use
%{name}.
%prep
%setup -q
# No need to call ldconfig during packaging
sed -i '\|/sbin/ldconfig|d' Makefile
# Preserve timestamps
sed -i 's|/install|/install -p|' Makefile
# fix romlint warnings BZ#751466
sed -i -e 's|-lpthread|-lpthread -lrt|' -e 's! -shared ! -Wl,--as-needed\0!g' Makefile
%build
export CPPFLAGS="%{optflags}"
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}
make PREFIX=%{buildroot}%{_prefix} LIBDIR=%{_lib} install
# create .so.x link
ln -s lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so.%{libmajor}
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_libdir}/lib%{name}.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%changelog
* Fri Oct 11 2011 Brendan Jones <brendan.jones.it@gmail.com> - 2.4.0-7
- correct URL and download link
* Fri Oct 04 2011 Brendan Jones <brendan.jones.it@gmail.com> - 2.4.0-6
- Corrected rpmlint 'undefined-non-weak-symbol /usr/lib64/libclthreads.so.2.4.0
clock_gettime' and unused-direct-shlib-dependency for libm - BZ#751466
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon May 04 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 2.4.0-3
- Use %%{name} macro more often
- Preserve timestamps
* Mon May 04 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 2.4.0-2
- prepare package for Fedora submission (SPEC file from PlanetCCRMA)
* Tue Apr 15 2008 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 2.4.0-1
- updated to version 2.4.0
* Fri Nov 24 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 2.2.1-1
- updated to version 2.2.1
* Sun Nov 19 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 2.2.0-3
- add %%{?dist} to release tag, add %%{fedora} conditional for X build
requirement
* Mon May 29 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 2.2.0-2
- fix library link
* Sat May 13 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 2.2.0
- update to 2.2.0
* Fri Mar 31 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- proper build dependencies for fc5
* Tue Dec 28 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- spec file cleanups
* Fri Dec 3 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 1.0.2-1
- updated to 1.0.2
* Fri Jul 23 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 1.0.0-1
- updated to 1.0.0
* Wed Jun 16 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.0.3-2
- DOH!, obsolete the -devel package as well...
* Mon Jun 14 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.0.3-1
- obsoletes classlibs
- first build
* Tue May 11 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- moved so file to main package to keep aeolus happy
* Wed May 5 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.0.1-2
- force apps to link with the major release name of the libraries
(ie: ".so.0" instead of ".so")
* Tue May 4 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.0.1-1
- initial build, needed for releasing Aeolus