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