wok rev 632
Add: cups (Common UNIX Printing System)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 21 15:45:27 2008 +0200 (2008-04-21) |
parents | 7f751ebb914e |
children | 93ddc3aa7689 |
files | cups/receipt cups/stuff/cups.desktop cups/stuff/cups.png cups/stuff/etc/init.d/cupsd |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/cups/receipt Mon Apr 21 15:45:27 2008 +0200 1.3 @@ -0,0 +1,63 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="cups" 1.7 +VERSION="1.3.7" 1.8 +CATEGORY="system-tools" 1.9 +SHORT_DESC="Common UNIX Printing System." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +DEPENDS="openssl" 1.12 +BUILD_DEPENDS="openssl-dev" 1.13 +TARBALL="$PACKAGE-$VERSION-source.tar.bz2" 1.14 +WEB_SITE="http://www.cups.org/" 1.15 +WGET_URL="http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$VERSION/$TARBALL" 1.16 + 1.17 +# Rules to configure and make the package. 1.18 +compile_rules() 1.19 +{ 1.20 + cd $src 1.21 + ./configure \ 1.22 + --prefix=$PWD/_pkg/usr \ 1.23 + --sysconfdir=$PWD/_pkg/etc \ 1.24 + --localstatedir=$PWD/_pkg/var \ 1.25 + --mandir=$PWD/_pkg/usr/share/man \ 1.26 + $CONFIGURE_ARGS 1.27 + make 1.28 + make install 1.29 +} 1.30 + 1.31 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.32 +genpkg_rules() 1.33 +{ 1.34 + mkdir -p $fs/etc $fs/usr/lib $fs/usr/share 1.35 + 1.36 + cp -a $_pkg/etc/cups $fs/etc 1.37 + cp -a $_pkg/usr/bin $fs/usr 1.38 + cp -a $_pkg/usr/sbin $fs/usr 1.39 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 1.40 + cp -a $_pkg/usr/lib/cups $fs/usr/lib 1.41 + cp -a $_pkg/usr/share/cups $fs/usr/share 1.42 + cp -a $_pkg/var $fs 1.43 + 1.44 + # Daemon script 1.45 + cp -a stuff/etc $fs 1.46 +} 1.47 + 1.48 +# Start cups daemon and edit daemons.conf. 1.49 +post_install() 1.50 +{ 1.51 + /etc/init.d/cupsd start || continue 1.52 + 1.53 + local root 1.54 + root=$1 1.55 + if ! grep -q ^CUPSD_OPTIONS $root/etc/daemons.conf; then 1.56 + echo '# Cups printing daemon options.' >> $root/etc/daemons.conf 1.57 + echo 'CUPSD_OPTIONS=""' >> $root/etc/daemons.conf 1.58 + echo '' >> $root/etc/daemons.conf 1.59 + fi 1.60 +} 1.61 + 1.62 +# Stop cups daemon before rm. 1.63 +pre_remove() 1.64 +{ 1.65 + /etc/init.d/cupsd stop 1.66 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/cups/stuff/cups.desktop Mon Apr 21 15:45:27 2008 +0200 2.3 @@ -0,0 +1,18 @@ 2.4 +[Desktop Entry] 2.5 +Encoding=UTF-8 2.6 +Exec=firefox http://localhost:631/ 2.7 +Icon=cups.png 2.8 +Name=Manage Printing 2.9 +Name[de]=Druckerverwaltung 2.10 +Name[es]=Administrar impresión 2.11 +Name[fr]=Gestionnaire d'impression 2.12 +Name[it]=Gestione stampa 2.13 +Name[zh_TW]=印表管理 2.14 +Comment=CUPS Web Interface 2.15 +Comment[es]=Interfaz Web de CUPS 2.16 +Comment[fr]=Interface Web de CUPS 2.17 +Comment[it]=Interfaccia web di CUPS 2.18 +StartupNotify=false 2.19 +Terminal=false 2.20 +Type=Application 2.21 +Categories=Application;System;
3.1 Binary file cups/stuff/cups.png has changed
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/cups/stuff/etc/init.d/cupsd Mon Apr 21 15:45:27 2008 +0200 4.3 @@ -0,0 +1,40 @@ 4.4 +#!/bin/sh 4.5 +# /etc/init.d/cups: Start, stop and restart Cups deamon on SliTaz, at boot 4.6 +# time or with the command line. 4.7 +# 4.8 +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS 4.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. 4.10 +# 4.11 +. /etc/init.d/rc.functions 4.12 +. /etc/daemons.conf 4.13 + 4.14 +NAME=Cupsd 4.15 +DESC="cups deamon" 4.16 +DAEMON=/usr/sbin/cupsd 4.17 +OPTIONS=$CUPSD_OPTIONS 4.18 +PIDFILE=/var/run/cups/cups.sock 4.19 + 4.20 +case "$1" in 4.21 + stop) 4.22 + echo -n "Stopping $DESC: $NAME... " 4.23 + killall $DAEMON 2>/dev/null 4.24 + rm -f $PIDFILE 4.25 + status 4.26 + ;; 4.27 + start|restart) 4.28 + echo -n "Restarting $DESC: $NAME... " 4.29 + killall $DAEMON 2>/dev/null 4.30 + rm -f $PIDFILE 4.31 + sleep 2 4.32 + $DAEMON $OPTIONS 4.33 + status 4.34 + ;; 4.35 + *) 4.36 + echo "" 4.37 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 4.38 + echo "" 4.39 + exit 1 4.40 + ;; 4.41 +esac 4.42 + 4.43 +exit 0