wok diff cups/receipt @ rev 18716

cups, cups-pam: remove duplicate files with libcups; misc. edits.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Dec 17 05:25:15 2015 +0200 (2015-12-17)
parents feb2e0c63d21
children ce8561c19cb9
line diff
     1.1 --- a/cups/receipt	Thu Jul 16 01:48:33 2015 +0200
     1.2 +++ b/cups/receipt	Thu Dec 17 05:25:15 2015 +0200
     1.3 @@ -11,9 +11,7 @@
     1.4  WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL"
     1.5  TAGS="printer printing"
     1.6  
     1.7 -DEPENDS="libssl slitaz-base-files libgcrypt gnutls dbus jpeg libpng tiff zlib \
     1.8 -libcomerr cups-doc libkrb5 libcomerr3 gcc-lib-base libusb-compat libtasn1 acl \
     1.9 -poppler-apps cups-filters"
    1.10 +DEPENDS="cups-filters libcups"
    1.11  BUILD_DEPENDS="libgcrypt-dev gnutls-dev dbus-dev jpeg-dev libpng-dev \
    1.12  tiff-dev zlib-dev libtasn1-dev openssl-dev libusb-compat-dev php-dev \
    1.13  acl-dev poppler-apps"
    1.14 @@ -21,7 +19,6 @@
    1.15  # Rules to configure and make the package.
    1.16  compile_rules()
    1.17  {
    1.18 -	cd $src
    1.19  	patch -Np1 -i $stuff/install-sh.u
    1.20  	./configure \
    1.21  		--prefix=/usr \
    1.22 @@ -43,13 +40,13 @@
    1.23  		$CONFIGURE_ARGS &&
    1.24  	make &&
    1.25  	make BUILDROOT=$DESTDIR install
    1.26 -
    1.27 +	cp -f $stuff/cups.desktop $install/usr/share/applications/cups.desktop
    1.28  }
    1.29  
    1.30  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.31  genpkg_rules()
    1.32  {
    1.33 -	mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
    1.34 +	mkdir -p $fs/etc $fs/usr/lib $fs/usr/share
    1.35  
    1.36  	cp -a $install/etc/cups $fs/etc
    1.37  	cp -a $install/etc/dbus* $fs/etc
    1.38 @@ -58,53 +55,46 @@
    1.39  	cp -a $install/usr/lib/*.so* $fs/usr/lib
    1.40  	cp -a $install/usr/lib/cups $fs/usr/lib
    1.41  	cp -a $install/usr/share/cups $fs/usr/share
    1.42 -	cp -a $install/usr/share/icons/hicolor/32x32/apps/cups.png $fs/usr/share/pixmaps
    1.43 +	cp -a $install/usr/share/icons $fs/usr/share
    1.44  	cp -a $install/var $fs
    1.45  
    1.46 -        # Remove files provided by cups-filters
    1.47 -        rm -f $fs/usr/share/cups/banners/*
    1.48 -        rm -f $fs/usr/share/cups/data/testprint	
    1.49 -	
    1.50 +	# Remove files provided by cups-filters
    1.51 +	rm -f $fs/usr/share/cups/banners/*
    1.52 +	rm -f $fs/usr/share/cups/data/testprint
    1.53 +
    1.54 +	# Remove files provided by libcups
    1.55 +	rm -f $fs/usr/lib/libcups.so*
    1.56 +
    1.57  	# Daemon script
    1.58  	cp -a $stuff/etc $fs
    1.59  
    1.60 -	# Tazpanel link
    1.61 +	# TazPanel link
    1.62  	cp -a $stuff/var $fs
    1.63  }
    1.64  
    1.65 -# Start cups daemon and edit daemons.conf.
    1.66  post_install()
    1.67  {
    1.68 -	local root
    1.69 -	root=$1
    1.70 -	if [ -z "$root" -a ! -s /aufs-umount.sh ]; then
    1.71 +	# Start CUPS daemon and edit daemons.conf
    1.72 +	if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
    1.73  		/etc/init.d/cupsd start || continue
    1.74  	fi
    1.75 -	if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
    1.76 -		echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
    1.77 -		echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
    1.78 -		echo '' >> $root/etc/daemons.conf
    1.79 +	if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
    1.80 +		cat >> "$1/etc/daemons.conf" <<EOT
    1.81 +# CUPS printing daemon options.
    1.82 +CUPSD_OPTIONS=""
    1.83 +
    1.84 +EOT
    1.85  	fi
    1.86  }
    1.87  
    1.88 -# Stop cups daemon before rm.
    1.89  pre_remove()
    1.90  {
    1.91 -	local root
    1.92 -	root=$1
    1.93 -	if [ -z "$root" ]; then
    1.94 -		/etc/init.d/cupsd stop
    1.95 -	fi
    1.96 -}
    1.97 -
    1.98 -# Overlap busybox
    1.99 -pre_install()
   1.100 -{
   1.101 -	rm -f $1/usr/bin/lpr
   1.102 +	# Stop CUPS daemon before rm.
   1.103 +	[ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
   1.104 +	:
   1.105  }
   1.106  
   1.107  post_remove()
   1.108  {
   1.109 -	ln -s /bin/busybox $1/usr/bin/lpr
   1.110 +	ln -s /bin/busybox "$1/usr/bin/lpr"
   1.111  }
   1.112 -