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

Up:ocsinventory (2.0.4)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Mon Apr 09 12:01:34 2012 +0200 (2012-04-09)
parents a1644dbcf632
children 703b805efd82
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 poppler-apps"
10 BUILD_DEPENDS="openssl-dev php-dev poppler-apps"
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 --with-pdftops=pdftops \
37 $CONFIGURE_ARGS &&
38 make &&
39 make BUILDROOT=$PWD/_pkg install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
48 cp -a $_pkg/etc/cups $fs/etc
49 cp -a $_pkg/etc/dbus* $fs/etc
50 cp -a $_pkg/usr/bin $fs/usr
51 cp -a $_pkg/usr/sbin $fs/usr
52 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
53 cp -a $_pkg/usr/lib/cups $fs/usr/lib
54 cp -a $_pkg/usr/share/cups $fs/usr/share
55 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/cups.png $fs/usr/share/pixmaps
56 cp -a $_pkg/var $fs
58 # We need the doc for CSS, images and help in the web interface.
59 cp -a $_pkg/usr/share/doc $fs/usr/share
61 # tazwok does not strip files other than .so in usr/lib
63 for dir in $fs/usr/lib/cups
64 do
65 if [ -d "$dir" ]; then
66 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
67 fi
68 done
70 # Daemon script
71 cp -a $stuff/etc $fs
72 }
74 # Start cups daemon and edit daemons.conf.
75 post_install()
76 {
77 local root
78 root=$1
79 if [ -z "$root" ]; then
80 /etc/init.d/cupsd start || continue
81 fi
82 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
83 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
84 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
85 echo '' >> $root/etc/daemons.conf
86 fi
87 }
89 # Stop cups daemon before rm.
90 pre_remove()
91 {
92 /etc/init.d/cupsd stop
93 }
95 # Overlap busybox
96 pre_install()
97 {
98 rm -f $1/usr/bin/lpr
99 }
101 post_remove()
102 {
103 ln -s /bin/busybox /usr/bin/lpr
104 }