%define name xpp %define version 1.5 %define release %mkrel 13 Summary: X Printing Panel Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Publishing Source0: http://cups.sourceforge.net/xpp/%{name}-%{version}cvs.tar.bz2 Patch0: xpp-1.5-qualification.patch Patch1: xpp-bug27027.patch Patch2: xpp-new-fltk.patch Patch3: xpp_wformat.patch Patch4: xpp-1.5-constchar.patch Patch5: xpp-1.5-cups-ppd_h.patch Patch6: xpp-1.5-glibc-2.16.patch Url: http://cups.sourceforge.net/xpp/ BuildRoot: %_tmppath/%name-%version-%release-root BuildRequires: libcups-devel fltk-devel BuildRequires: cups libstdc++-devel BuildRequires: libpng-devel libjpeg-devel BuildRequires: libxext-devel %description The X Printing Panel (XPP) is a completely free tool for easy choosing of the desired printer out of a list of all available printers and for setting printer options by an easy-to-use graphical user interface. One simply calls the program (xpp) instead of the usual utilities (lpr or lp) at the command line or out of applications. %prep %setup -q %patch0 -p1 -b .qual %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 -b .constchar %patch5 -p1 -b .cups %patch6 -p1 -b .glibc-2_16 %build %configure2_5x make %install rm -rf $RPM_BUILD_ROOT %makeinstall_std mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop <<EOF [Desktop Entry] Name=X Printing Panel Comment=Frontend for easy printing with CUPS Exec=%{_bindir}/%{name} Icon=printing_section Terminal=false Type=Application StartupNotify=true Categories=Utility;Settings;Printing; EOF # Use update-alternatives to make printing with XPP also possible with # the "lpr" command ( cd $RPM_BUILD_ROOT%{_bindir} ln -s xpp lpr-xpp ) %post # Set up update-alternatives entry %{_sbindir}/update-alternatives --install %{_bindir}/lpr lpr %{_bindir}/lpr-xpp 8 %preun if [ "$1" = 0 ]; then # Remove update-alternatives entry %{_sbindir}/update-alternatives --remove lpr /usr/bin/lpr-xpp fi %clean rm -fr %buildroot %files %defattr(-,root,root) %doc README LICENSE ChangeLog %_bindir/* %{_datadir}/applications/mageia-%{name}.desktop %changelog * Mon Jan 14 2013 umeabot <umeabot> 1.5-13.mga3 + Revision: 387326 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Dec 21 2012 cjw <cjw> 1.5-12.mga3 + Revision: 333688 - patch 5 and 6: fix build with current cups and glibc header files * Wed Aug 03 2011 fwang <fwang> 1.5-11.mga2 + Revision: 131585 - build with fltk 1.3 - rebuild for new fltk + dmorgan <dmorgan> - Rebuild against new fltk * Mon Jan 17 2011 dmorgan <dmorgan> 1.5-9.mga1 + Revision: 21443 - Add missing %%post - Add libxext-devel as buildrequire - Remove mdv macros - imported package xpp