Name: compface
Version: 1.5.2
Release: 3%{?dist}
Summary: Utilities for handling X-Faces
Group: Applications/Multimedia
License: MIT
URL: http://www.ibiblio.org/pub/Linux/apps/graphics/convert/
Source0: http://ftp.xemacs.org/pub/xemacs/aux/%{name}-%{version}.tar.gz
Source1: compface-test.xbm
Source2: compface-README.copyright
Patch0: http://ftp.debian.org/debian/pool/main/libc/libcompface/libcompface_1.5.2-3.diff.gz
Patch1: compface-1.5.2-stack-smashing.patch
Patch2: %{name}-1.5.2-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: diffutils
%description
%{summary}.
%package devel
Summary: Library for handling X-Faces
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
%{summary}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1 -b .stack-smashing
%patch2 -p0
%build
CFLAGS="$RPM_OPT_FLAGS -fPIC" %configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT STRIP=/bin/true
mkdir -p _extdoc && install -p -m 0644 %{SOURCE2} _extdoc/README.copyright
%check || :
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARY_PATH
./compface %{SOURCE1} | ./uncompface -X > __test.xbm
cmp %{SOURCE1} __test.xbm
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc ChangeLog README xbm2xface.pl
%doc _extdoc/README.copyright
%{_bindir}/compface
%{_bindir}/uncompface
%{_libdir}/libcompface.so.*
%{_mandir}/man1/compface.1*
%{_mandir}/man1/uncompface.1*
%files devel
%defattr(-,root,root,-)
%{_includedir}/compface.h
%{_libdir}/libcompface.so
%{_mandir}/man3/compface.3*
%{_mandir}/man3/uncompface.3*
%changelog
* Sat Aug 5 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.5.2-3
- Add licence terms clarification from Debian's patch.
* Fri Aug 4 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.5.2-2
- Add patch to prevent sscanf stack smashing through Debian's patch.
- Fix two GCC warnings in the same patch.
- Add one test to the %%check section and BR diffutils.
* Wed Aug 2 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.5.2-1
- Update to 1.5.2, apply Debian's 1.5.2-3 patchset.
- Crudely patch to build a shared lib (inspired by Debian), drop static one.
- Split -devel subpackage.
* Mon Jul 31 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4-7
- Ensure proper doc file permissions.
* Mon Feb 13 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.4-6
- Rebuild.
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.4-5
- rebuilt
* Fri Dec 17 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.4-4
- Let rpmbuild take care of stripping binaries.
* Fri May 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.4-0.fdr.3
- Add URL, other minor specfile tweaks (#63).
* Sat May 3 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.4-0.fdr.2
- Fix build on RH9 (#63).
- Save .spec in UTF-8.
- Provide -devel to ease possible future 'shared lib'ification.
* Sat Mar 22 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.4-0.fdr.1
- Update to current Fedora guidelines.
* Fri Feb 7 2003 Ville Skyttä <ville.skytta at iki.fi> - 1.4-1.fedora.1
- First Fedora release.