wok-next view cups-pam/receipt @ rev 15055
lorcon-old: create .depend
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 12 21:48:15 2013 +0000 (2013-08-12) |
parents | a2bab5234954 |
children | 223b265f40fd |
line source
1 # SliTaz package receipt.
3 PACKAGE="cups-pam"
4 VERSION="1.6.2"
5 CATEGORY="system-tools"
6 SHORT_DESC="Common UNIX Printing System with pam support."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="libssl libgcrypt cups-doc slitaz-base-files gnutls dbus jpeg libpng tiff \
9 zlib pam libcomerr libkrb5 acl libcomerr3"
10 BUILD_DEPENDS="openssl-dev gnutls-dev dbus-dev jpeg-dev libpng-dev tiff-dev \
11 pam libcomerr-dev pam-dev acl-dev libgcrypt-dev"
12 SOURCE="cups"
13 TARBALL="$SOURCE-$VERSION-source.tar.bz2"
14 WEB_SITE="http://www.cups.org/"
15 WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL"
16 PROVIDE="cups:pam"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 patch -Np1 -i $WOK/$SOURCE/stuff/install-sh.u
23 ./configure \
24 --prefix=/usr \
25 --sysconfdir=/etc \
26 --localstatedir=/var \
27 --mandir=/usr/share/man \
28 --enable-static \
29 --enable-pam \
30 --disable-ldap \
31 --with-cups-user=nobody \
32 --with-cups-group=nogroup \
33 --with-languages="de es fr" \
34 $CONFIGURE_ARGS &&
35 make &&
36 make BUILDROOT=$DESTDIR install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share/pixmaps
44 cp -a $install/etc/cups $fs/etc
45 cp -a $install/etc/dbus* $fs/etc
46 cp -a $install/usr/bin $fs/usr
47 cp -a $install/usr/sbin $fs/usr
48 cp -a $install/usr/lib/*.so* $fs/usr/lib
49 cp -a $install/usr/lib/cups $fs/usr/lib
50 cp -a $install/usr/share/cups $fs/usr/share
51 cp -a $install/usr/share/icons/hicolor/32x32/apps/cups.png \
52 $fs/usr/share/pixmaps
53 cp -a $install/var $fs
55 # tazwok does not strip files other than .so in usr/lib
57 for dir in $fs/usr/lib/cups
58 do
59 if [ -d "$dir" ]; then
60 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
61 fi
62 done
64 # PAM conf
65 cp -a $stuff/* $fs
67 # Daemon script
68 cp -a $WOK/cups/stuff/etc $fs
69 }
71 # Start cups daemon and edit daemons.conf.
72 post_install()
73 {
74 local root
75 root=$1
76 if [ -z "$root" ]; then
77 /etc/init.d/cupsd start || continue
78 fi
79 if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then
80 echo '# Cups printing daemon options.' >> $root/etc/daemons.conf
81 echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf
82 echo '' >> $root/etc/daemons.conf
83 fi
84 }
86 # Stop cups daemon before rm.
87 pre_remove()
88 {
89 local root
90 root=$1
91 if [ -z "$root" ]; then
92 /etc/init.d/cupsd stop
93 fi
94 }
96 # Overlap busybox
97 pre_install()
98 {
99 rm -f $1/usr/bin/lpr
100 }
102 post_remove()
103 {
104 ln -s /bin/busybox $1/usr/bin/lpr
105 }