wok annotate cups-pam/receipt @ rev 18362

Up lrzip (0.621)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 16 13:41:34 2015 +0200 (2015-09-16)
parents e9b024efaa14
children 77dc6129b023
rev   line source
pascal@2219 1 # SliTaz package receipt.
pascal@2219 2
pascal@2219 3 PACKAGE="cups-pam"
mojo@17886 4 VERSION="2.0.2"
pascal@2219 5 CATEGORY="system-tools"
pascal@2219 6 SHORT_DESC="Common UNIX Printing System with pam support."
pascal@2219 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15202 8 LICENSE="GPL2 LGPL2"
pascal@2219 9 SOURCE="cups"
pascal@2219 10 TARBALL="$SOURCE-$VERSION-source.tar.bz2"
pascal@2219 11 WEB_SITE="http://www.cups.org/"
slaxemulator@14626 12 WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL"
pascal@2219 13 PROVIDE="cups:pam"
pascal@2219 14
pascal@15202 15 DEPENDS="libssl libgcrypt cups-doc slitaz-base-files gnutls dbus jpeg libpng tiff \
mojo@17887 16 zlib pam libcomerr libkrb5 acl libcomerr3 cups-filters"
pascal@15202 17 BUILD_DEPENDS="openssl-dev gnutls-dev dbus-dev jpeg-dev libpng-dev tiff-dev \
pascal@15202 18 pam libcomerr-dev pam-dev acl-dev libgcrypt-dev"
pascal@15202 19
pascal@2219 20 # Rules to configure and make the package.
pascal@2219 21 compile_rules()
pascal@2219 22 {
pascal@2219 23 cd $src
pankso@15937 24 patch -Np1 -i ${WOK}/cups/stuff/install-sh.u
pascal@2219 25 ./configure \
pascal@2219 26 --prefix=/usr \
pascal@2219 27 --sysconfdir=/etc \
pascal@2219 28 --localstatedir=/var \
pascal@2219 29 --mandir=/usr/share/man \
pascal@2219 30 --enable-static \
pascal@2219 31 --enable-pam \
pascal@2219 32 --disable-ldap \
pascal@2219 33 --with-cups-user=nobody \
pascal@2219 34 --with-cups-group=nogroup \
pankso@15928 35 --with-languages="de es fr pt_BR ru" \
pascal@2219 36 $CONFIGURE_ARGS &&
pascal@2219 37 make &&
slaxemulator@14622 38 make BUILDROOT=$DESTDIR install
pascal@2219 39 }
pascal@2219 40
pascal@2219 41 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2219 42 genpkg_rules()
pascal@2219 43 {
pascal@2619 44 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
pascal@2219 45
slaxemulator@14622 46 cp -a $install/etc/cups $fs/etc
slaxemulator@14622 47 cp -a $install/etc/dbus* $fs/etc
slaxemulator@14622 48 cp -a $install/usr/bin $fs/usr
slaxemulator@14622 49 cp -a $install/usr/sbin $fs/usr
slaxemulator@14622 50 cp -a $install/usr/lib/*.so* $fs/usr/lib
slaxemulator@14622 51 cp -a $install/usr/lib/cups $fs/usr/lib
slaxemulator@14622 52 cp -a $install/usr/share/cups $fs/usr/share
slaxemulator@14622 53 cp -a $install/usr/share/icons/hicolor/32x32/apps/cups.png \
pascal@2619 54 $fs/usr/share/pixmaps
slaxemulator@14622 55 cp -a $install/var $fs
pascal@2774 56
mojo@17887 57 # Remove files provided by cups-filters
mojo@17887 58 rm -f $fs/usr/share/cups/banners/*
mojo@17887 59 rm -f $fs/usr/share/cups/data/testprint
mojo@17887 60
pascal@2238 61 # PAM conf
pankso@15928 62 cp -a $stuff/etc $fs
pascal@2238 63
pascal@2219 64 # Daemon script
pankso@15937 65 cp -a ${WOK}/cups/stuff/etc $fs
pascal@2219 66 }
pascal@2219 67
pascal@2219 68 # Start cups daemon and edit daemons.conf.
pascal@2219 69 post_install()
pascal@2219 70 {
pascal@2219 71 local root
pascal@2219 72 root=$1
pascal@2219 73 if [ -z "$root" ]; then
pascal@2219 74 /etc/init.d/cupsd start || continue
pascal@2219 75 fi
pascal@2219 76 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
pascal@2219 77 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
pascal@2219 78 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
pascal@2219 79 echo '' >> $root/etc/daemons.conf
pascal@2219 80 fi
pascal@2219 81 }
pascal@2219 82
pascal@2219 83 # Stop cups daemon before rm.
pascal@2219 84 pre_remove()
pascal@2219 85 {
slaxemulator@14622 86 local root
slaxemulator@14622 87 root=$1
pascal@15222 88 if [ -z "$root" -a -x /etc/init.d/cupsd ]; then
slaxemulator@14622 89 /etc/init.d/cupsd stop
slaxemulator@14622 90 fi
pascal@2219 91 }
pascal@8875 92
pascal@8875 93 # Overlap busybox
pascal@8875 94 pre_install()
pascal@8875 95 {
pascal@8875 96 rm -f $1/usr/bin/lpr
pascal@8875 97 }
pascal@8875 98
pascal@8875 99 post_remove()
pascal@8875 100 {
pascal@13937 101 ln -s /bin/busybox $1/usr/bin/lpr
pascal@8875 102 }