Name: libexplain Version: 0.40.D001 Release: 1%{?dist} Summary: Library functions to explain system call errors URL: http://libexplain.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # Some tests fail because getmntent() fails in a mock chroot environment, # presumably due to the absence of /etc/mtab. Skip those tests. Patch0: libexplain-skiptest.patch License: LGPLv3+ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: bison libcap-devel libtool groff gettext %description The libexplain project provides a library which may be used to explain Unix and Linux system call errors. This will make your application's error messages much more informative to your users. The library is not quite a drop-in replacement for strerror, but it comes close. Each system call has a dedicated libexplain function. The coverage for system calls is being improved all the time. Coverage includes 159 system calls and 444 ioctl requests. %package -n explain Summary: Explains system call error reports License: GPLv3+ Group: Development/Tools %description -n explain The explain command is used to decode an error return read from an strace(1) listing, or similar. Because this is being deciphered in a different process than the original, the results will be less accurate than if the program itself were to use libexplain(3). %package devel Summary: Development files for libexplain License: LGPLv3+ and GPLv3+ Group: Development/Libraries Requires: libexplain = %{version}-%{release} Requires: pkgconfig %description devel Development files for the libexplain library. %prep %setup -q # Some tests fail because getmntent() fails in a mock chroot environment, # presumably due to the absence of /etc/mtab. Skip those tests. %patch -P 0 -p1 -b .skiptest %build ./configure --disable-static \ --prefix=%{_prefix} \ --libdir=%{_libdir} make CFLAGS="%{optflags}" \ %{?_smp_mflags} %check make check %install rm -rf %{buildroot} # The install target is not smp-safe, so don't use smp_mflags. make DESTDIR=%{buildroot} \ install # The shared library has to be executable! chmod 755 %{buildroot}%{_libdir}/%{name}.so.*.*.* # Get rid of the static library and libtool archives rm %{buildroot}%{_libdir}/%{name}.{a,la} %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %{_libdir}/%{name}.so.* %doc README LICENSE %files -n explain %defattr(-,root,root,-) %{_bindir}/explain %{_mandir}/man1/*.1.* %files devel %defattr(-,root,root,-) %{_mandir}/man3/*.3.* %{_includedir}/%{name}/ %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}.pc %changelog * Sun Jan 02 2011 Eric Smith - 0.40.D001-1 - updated to latest upstream - updated based on package review comments * Tue Sep 07 2010 Eric Smith - 0.38.D001-1 - updated to latest upstream * Mon May 10 2010 Eric Smith - 0.31.D001-1 - initial version