%define _x11fontdir %{_datadir}/X11/fonts
Name: libdockapp
Version: 0.6.1
Release: 2%{?dist}
Summary: DockApp Development Standard Library
Group: System Environment/Libraries
License: MIT
URL: http://solfertje.student.utwente.nl/~dalroi/libdockapp/
Source0: http://solfertje.student.utwente.nl/~dalroi/libdockapp/files/libdockapp-%{version}.tar.bz2
# add prototypes and includes
Patch0: libdockapp-0.6.1-stdinc_decl.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libXpm-devel libXext-devel libX11-devel
%description
LibDockApp is a library that provides a framework for developing dockapps.
It provides functions and structures to define and display command-line
options, create a dockable icon, handle events, etc.
The goal of the library is to provide a simple, yet clean interface and
standardize the ways in which dockapps are developed. A dockapp developed
using libDockApp will automatically behave well under most window
managers, and especially well under Window Maker.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libXpm-devel
Requires: libX11-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package fonts
Summary: Fonts provided with %{name}
Group: User Interface/X
Requires(post): chkfontpath
Requires(postun): chkfontpath
%description fonts
Bitmap X fonts provided with libdockapp.
%prep
%setup -q -n dockapp-%{version}
%patch0 -p1 -b .stdinc_decl
%build
%configure --disable-static --without-examples
# --disable-rpath doesn't work, doing as per the guidelines
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT XFONTDIR=$RPM_BUILD_ROOT%{_x11fontdir}
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
# fonts.alias is empty, so unusefull.
rm $RPM_BUILD_ROOT%{_x11fontdir}/dockapp/fonts.alias
rm -rf examples-devel
cp -a examples examples-devel
rm examples-devel/Makefile*
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%post fonts
/usr/sbin/chkfontpath -qa %{_datadir}/X11/fonts/dockapp
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache %{_datadir}/X11/fonts
fi
%postun -p /sbin/ldconfig
%postun fonts
if [ "$1" = "0" ]; then
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache %{_datadir}/X11/fonts
fi
/usr/sbin/chkfontpath -qr %{_datadir}/X11/fonts/dockapp
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS BUGS COPYING NEWS README
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%doc examples-devel/*
%{_includedir}/*
%{_libdir}/*.so
%files fonts
# there is no obvious package to depend on that owns %{_datadir}/X11/fonts/
%{_x11fontdir}/
#%{_x11fontdir}/dockapp/
%changelog
* Wed Jan 10 2007 Patrice Dumas <pertusus@free.fr> 0.6.1-2
- don't ship the empty fonts.alias
* Fri Jan 5 2007 Patrice Dumas <pertusus@free.fr> 0.6.1-1
- Initial release