%define major 0 %define libname %mklibname bsd %{major} %define libnamedev %mklibname bsd -d Name: libbsd Summary: Library providing BSD-compatible functions for portability Group: System/Libraries Version: 0.3.0 Release: %mkrel 1 License: BSD and ISC and Copyright only and Public Domain URL: http://libbsd.freedesktop.org/ Source0: http://libbsd.freedesktop.org/releases/%{name}-%{version}.tar.gz %description libbsd provides useful functions commonly found on BSD systems, and lacking on others like GNU systems, thus making it easier to port projects with strong BSD origins, without needing to embed the same code over and over again on each project. %package -n %{libname} Summary: libbsdb libary Group: System/Libraries %description -n %{libname} libbsd libary. %files -n %{libname} %{_libdir}/libbsd.so.%{major}* #-------------------------------------------------------------------- %package -n %{libnamedev} Summary: Development files for libbsd Group: Development/C Requires: %{libname} >= %{version} Provides: %{name}-devel = %{version}-%{release} %description -n %{libnamedev} Development files for the libbsd library. #-------------------------------------------------------------------- %files -n %{libnamedev} %doc COPYING README TODO ChangeLog %{_mandir}/man3/* %{_includedir}/*.h %{_includedir}/bsd/ %{_libdir}/libbsd.so %{_libdir}/pkgconfig/libbsd*.pc #-------------------------------------------------------------------- %prep %setup -q # fix encoding of flopen.3 man page for f in src/flopen.3; do iconv -f iso8859-1 -t utf-8 $f >$f.conv touch -r $f $f.conv mv $f.conv $f done %build %make %install make install DESTDIR=%{buildroot} \ libdir=%{_libdir} \ usrlibdir=%{_libdir} \ exec_prefix=%{_prefix} # clean static library rm %{buildroot}%{_libdir}/libbsd.a # Move nlist.h into bsd directory to avoid conflict with elfutils-libelf. mv %{buildroot}%{_includedir}/nlist.h %{buildroot}%{_includedir}/bsd/ %changelog * Mon Mar 19 2012 Simple 0.3.0-1 - first package