wok annotate cups/receipt @ rev 9697
a*, b*, c*: starte with a tiny sed in the wok for stuff/ --> $/stuff
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 07 23:47:19 2011 +0200 (2011-05-07) |
parents | 7ba9895e1216 |
children | c4004328943b |
rev | line source |
---|---|
pankso@632 | 1 # SliTaz package receipt. |
pankso@632 | 2 |
pankso@632 | 3 PACKAGE="cups" |
slaxemulator@7887 | 4 VERSION="1.4.6" |
pankso@632 | 5 CATEGORY="system-tools" |
pankso@632 | 6 SHORT_DESC="Common UNIX Printing System." |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
erjo@7980 | 8 DEPENDS="libssl slitaz-base-files gnutls dbus jpeg libpng tiff zlib \ |
gokhlayeh@9395 | 9 libcomerr libkrb5 gcc-lib-base libusb-compat libtasn1" |
gokhlayeh@9395 | 10 BUILD_DEPENDS="openssl-dev php-dev" |
pankso@632 | 11 TARBALL="$PACKAGE-$VERSION-source.tar.bz2" |
pankso@632 | 12 WEB_SITE="http://www.cups.org/" |
slaxemulator@6891 | 13 WGET_URL="ftp://ftp.easysw.com/pub/cups/$VERSION/$TARBALL" |
jozee@4933 | 14 TAGS="printer printing" |
pankso@632 | 15 |
pankso@632 | 16 # Rules to configure and make the package. |
pankso@632 | 17 compile_rules() |
pankso@632 | 18 { |
pankso@632 | 19 cd $src |
pankso@632 | 20 ./configure \ |
pankso@664 | 21 --prefix=/usr \ |
pankso@664 | 22 --sysconfdir=/etc \ |
pankso@664 | 23 --localstatedir=/var \ |
pankso@664 | 24 --mandir=/usr/share/man \ |
pankso@2207 | 25 --enable-static \ |
pankso@2206 | 26 --disable-ldap \ |
pascal@2282 | 27 --disable-pam \ |
jozee@2761 | 28 --disable-gssapi \ |
jozee@4518 | 29 --disable-acl \ |
slaxemulator@6891 | 30 --disable-slp \ |
slaxemulator@6891 | 31 --enable-dbus \ |
slaxemulator@6891 | 32 --with-dbusdir=/etc/dbus-1 \ |
pankso@2206 | 33 --with-cups-user=nobody \ |
pankso@2206 | 34 --with-cups-group=nogroup \ |
pankso@2206 | 35 --with-languages="de es fr" \ |
pascal@1660 | 36 $CONFIGURE_ARGS && |
pascal@1660 | 37 make && |
pankso@664 | 38 make BUILDROOT=$PWD/_pkg install |
pankso@3601 | 39 |
pankso@632 | 40 } |
pankso@632 | 41 |
pankso@632 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@632 | 43 genpkg_rules() |
pankso@632 | 44 { |
pascal@2565 | 45 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps |
pankso@3601 | 46 |
pankso@632 | 47 cp -a $_pkg/etc/cups $fs/etc |
pankso@2206 | 48 cp -a $_pkg/etc/dbus* $fs/etc |
pankso@632 | 49 cp -a $_pkg/usr/bin $fs/usr |
pankso@632 | 50 cp -a $_pkg/usr/sbin $fs/usr |
pankso@632 | 51 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
pankso@632 | 52 cp -a $_pkg/usr/lib/cups $fs/usr/lib |
pankso@632 | 53 cp -a $_pkg/usr/share/cups $fs/usr/share |
jozee@2761 | 54 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/cups.png $fs/usr/share/pixmaps |
pankso@3601 | 55 cp -a $_pkg/var $fs |
pankso@3601 | 56 |
pankso@2206 | 57 # We need the doc for CSS, images and help in the web interface. |
pankso@2206 | 58 cp -a $_pkg/usr/share/doc $fs/usr/share |
pankso@3601 | 59 |
jozee@2761 | 60 # tazwok does not strip files other than .so in usr/lib |
pankso@3601 | 61 |
jozee@2761 | 62 for dir in $fs/usr/lib/cups |
jozee@2761 | 63 do |
jozee@2761 | 64 if [ -d "$dir" ]; then |
jozee@2761 | 65 find $dir -type f -exec strip -s '{}' 2>/dev/null \; |
jozee@2761 | 66 fi |
jozee@2761 | 67 done |
pankso@3601 | 68 |
pankso@632 | 69 # Daemon script |
pankso@9697 | 70 cp -a $stuff/etc $fs |
pankso@632 | 71 } |
pankso@632 | 72 |
pankso@632 | 73 # Start cups daemon and edit daemons.conf. |
pankso@632 | 74 post_install() |
pankso@632 | 75 { |
pankso@632 | 76 local root |
pankso@632 | 77 root=$1 |
pascal@2219 | 78 if [ -z "$root" ]; then |
pascal@2219 | 79 /etc/init.d/cupsd start || continue |
pascal@2219 | 80 fi |
pankso@632 | 81 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then |
pankso@632 | 82 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf |
pankso@632 | 83 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf |
pankso@632 | 84 echo '' >> $root/etc/daemons.conf |
pankso@632 | 85 fi |
pankso@632 | 86 } |
pankso@632 | 87 |
pankso@632 | 88 # Stop cups daemon before rm. |
pankso@632 | 89 pre_remove() |
pankso@632 | 90 { |
pankso@632 | 91 /etc/init.d/cupsd stop |
pankso@632 | 92 } |
pascal@8875 | 93 |
pascal@8875 | 94 # Overlap busybox |
pascal@8875 | 95 pre_install() |
pascal@8875 | 96 { |
pascal@8875 | 97 rm -f $1/usr/bin/lpr |
pascal@8875 | 98 } |
pascal@8875 | 99 |
pascal@8875 | 100 post_remove() |
pascal@8875 | 101 { |
pascal@8875 | 102 ln -s /bin/busybox /usr/bin/lpr |
pascal@8875 | 103 } |