wok view cups-pam/receipt @ rev 14500
Add python-asterisk
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat May 11 17:27:32 2013 +0200 (2013-05-11) |
parents | 21cd28c4630a |
children | a2bab5234954 |
line source
1 # SliTaz package receipt.
3 PACKAGE="cups-pam"
4 VERSION="1.5.3"
5 CATEGORY="system-tools"
6 SHORT_DESC="Common UNIX Printing System with pam support."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="openssl slitaz-base-files gnutls ghostscript dbus jpeg libpng tiff \
9 zlib pam libcomerr libkrb5 acl libcomerr3"
10 BUILD_DEPENDS="openssl-dev gnutls-dev ghostscript dbus-dev pam pam-dev acl-dev"
11 SOURCE="cups"
12 TARBALL="$SOURCE-$VERSION-source.tar.bz2"
13 WEB_SITE="http://www.cups.org/"
14 WGET_URL="ftp://ftp.easysw.com/pub/cups/$VERSION/$TARBALL"
15 PROVIDE="cups:pam"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 patch -p1 < $stuff/install-sh.u
22 ./configure \
23 --prefix=/usr \
24 --sysconfdir=/etc \
25 --localstatedir=/var \
26 --mandir=/usr/share/man \
27 --enable-static \
28 --enable-pam \
29 --disable-ldap \
30 --with-cups-user=nobody \
31 --with-cups-group=nogroup \
32 --with-languages="de es fr" \
33 $CONFIGURE_ARGS &&
34 make &&
35 make BUILDROOT=$PWD/_pkg install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
43 cp -a $_pkg/etc/cups $fs/etc
44 cp -a $_pkg/etc/dbus* $fs/etc
45 cp -a $_pkg/usr/bin $fs/usr
46 cp -a $_pkg/usr/sbin $fs/usr
47 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
48 cp -a $_pkg/usr/lib/cups $fs/usr/lib
49 cp -a $_pkg/usr/share/cups $fs/usr/share
50 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/cups.png \
51 $fs/usr/share/pixmaps
52 cp -a $_pkg/var $fs
54 # We need the doc for CSS, images and help in the web interface.
55 cp -a $_pkg/usr/share/doc $fs/usr/share
57 # tazwok does not strip files other than .so in usr/lib
59 for dir in $fs/usr/lib/cups
60 do
61 if [ -d "$dir" ]; then
62 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
63 fi
64 done
66 # PAM conf
67 cp -a $stuff/* $fs
69 # Daemon script
70 cp -a $WOK/cups/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 [ -z "$1" ] && [ -x /etc/init.d/cupsd ] && /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 $1/usr/bin/lpr
103 }