wok-6.x view cups/receipt @ rev 15660

gpm, cups, c_icap: do not start daemon while cooking (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 12 08:15:03 2013 +0000 (2013-12-12)
parents 8a5d0d5c5453
children 6fe50f4887f2
line source
1 # SliTaz package receipt.
3 PACKAGE="cups"
4 VERSION="1.6.2"
5 CATEGORY="system-tools"
6 SHORT_DESC="Common UNIX Printing System."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2 LGPL2"
9 TARBALL="$PACKAGE-$VERSION-source.tar.bz2"
10 WEB_SITE="http://www.cups.org/"
11 WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL"
12 TAGS="printer printing"
14 DEPENDS="libssl slitaz-base-files libgcrypt gnutls dbus jpeg libpng tiff zlib \
15 libcomerr cups-doc libkrb5 libcomerr3 gcc-lib-base libusb-compat libtasn1 acl poppler-apps"
16 BUILD_DEPENDS="libgcrypt-dev gnutls-dev dbus-dev jpeg-dev libpng-dev \
17 tiff-dev zlib-dev libtasn1-dev openssl-dev libusb-compat-dev php-dev \
18 acl-dev poppler-apps"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src
24 patch -Np1 -i $stuff/install-sh.u
25 ./configure \
26 --prefix=/usr \
27 --sysconfdir=/etc \
28 --localstatedir=/var \
29 --mandir=/usr/share/man \
30 --enable-static \
31 --disable-ldap \
32 --disable-pam \
33 --disable-gssapi \
34 --disable-acl \
35 --disable-slp \
36 --enable-dbus \
37 --with-dbusdir=/etc/dbus-1 \
38 --with-cups-user=nobody \
39 --with-cups-group=nogroup \
40 --with-languages="de es fr" \
41 --with-pdftops=pdftops \
42 $CONFIGURE_ARGS &&
43 make &&
44 make BUILDROOT=$DESTDIR install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
53 cp -a $install/etc/cups $fs/etc
54 cp -a $install/etc/dbus* $fs/etc
55 cp -a $install/usr/bin $fs/usr
56 cp -a $install/usr/sbin $fs/usr
57 cp -a $install/usr/lib/*.so* $fs/usr/lib
58 cp -a $install/usr/lib/cups $fs/usr/lib
59 cp -a $install/usr/share/cups $fs/usr/share
60 cp -a $install/usr/share/icons/hicolor/32x32/apps/cups.png $fs/usr/share/pixmaps
61 cp -a $install/var $fs
63 # tazwok does not strip files other than .so in usr/lib
65 for dir in $fs/usr/lib/cups
66 do
67 if [ -d "$dir" ]; then
68 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
69 fi
70 done
72 # Daemon script
73 cp -a $stuff/etc $fs
75 # Tazpanel link
76 cp -a $stuff/var $fs
77 }
79 # Start cups daemon and edit daemons.conf.
80 post_install()
81 {
82 local root
83 root=$1
84 if [ -z "$root" -a ! -s /aufs-umount.sh ]; then
85 /etc/init.d/cupsd start || continue
86 fi
87 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
88 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
89 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
90 echo '' >> $root/etc/daemons.conf
91 fi
92 }
94 # Stop cups daemon before rm.
95 pre_remove()
96 {
97 local root
98 root=$1
99 if [ -z "$root" ]; then
100 /etc/init.d/cupsd stop
101 fi
102 }
104 # Overlap busybox
105 pre_install()
106 {
107 rm -f $1/usr/bin/lpr
108 }
110 post_remove()
111 {
112 ln -s /bin/busybox $1/usr/bin/lpr
113 }