diff options
author | root <root@rshg047.dnsready.net> | 2011-06-18 23:03:19 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-06-18 23:03:19 +0000 |
commit | c80552b41838a5668458ebb1eb9b0f44ea6fe879 (patch) | |
tree | d8404bc10128ad69e29c762d116434876e5885a7 /extra/cups | |
parent | e96f6ac6e912185a495a99af2b0d51b73bd1d044 (diff) |
Sat Jun 18 23:03:19 UTC 2011
Diffstat (limited to 'extra/cups')
-rw-r--r-- | extra/cups/PKGBUILD | 49 | ||||
-rwxr-xr-x | extra/cups/cups | 58 | ||||
-rw-r--r-- | extra/cups/cups.install | 12 |
3 files changed, 90 insertions, 29 deletions
diff --git a/extra/cups/PKGBUILD b/extra/cups/PKGBUILD index 2ddf74e03..c717425a3 100644 --- a/extra/cups/PKGBUILD +++ b/extra/cups/PKGBUILD @@ -1,14 +1,14 @@ -# $Id: PKGBUILD 126330 2011-06-04 22:35:21Z andyrtr $ +# $Id: PKGBUILD 127716 2011-06-17 19:45:36Z andyrtr $ # Maintainer: Andreas Radke <andyrtr@archlinux.org> pkgbase="cups" pkgname=('libcups' 'cups') pkgver=1.4.6 -pkgrel=3 +pkgrel=4 arch=('i686' 'x86_64') license=('GPL') url="http://www.cups.org/" -makedepends=('libtiff>=3.9.2-2' 'libpng>=1.4.0' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'poppler>=0.12.3' +makedepends=('libtiff>=3.9.2-2' 'libpng>=1.4.0' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'poppler>=0.12.3' 'xinetd' 'gzip' 'autoconf' 'php' 'libusb-compat' 'dbus-core' 'avahi' 'hicolor-icon-theme') source=(ftp://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2 cups-avahi.patch @@ -16,7 +16,7 @@ source=(ftp://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2 #options=('!emptydirs') md5sums=('de8fb5a29c36554925c0c6a6e2c0dae1' '8ebd390197501ffd709f0ee546937fd5' - '5c85b7d8d2ddd02c2c64955cebbf55ea' + '9657daa21760bb0b5fa3d8b51d5e01a1' 'f861b18f4446c43918c8643dcbbd7f6d' '96f82c38f3f540b53f3e5144900acf17') @@ -32,14 +32,36 @@ build() { autoconf -I config-scripts ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --with-logdir=/var/log/cups -with-docdir=/usr/share/cups/doc \ - --with-cups-user=daemon --with-cups-group=lp --enable-pam=yes \ - --disable-ldap --libdir=/usr/lib --enable-raw-printing \ - --enable-dbus --with-dbusdir=/etc/dbus-1 --enable-ssl=yes --enable-gnutls --disable-threads --enable-avahi\ - --with-php=/usr/bin/php-cgi --with-pdftops=pdftops --with-optim="$CFLAGS" + --libdir=/usr/lib \ + --with-logdir=/var/log/cups \ + --with-docdir=/usr/share/cups/doc \ + --with-cups-user=daemon \ + --with-cups-group=lp \ + --enable-pam=yes \ + --disable-ldap \ + --enable-raw-printing \ + --enable-dbus --with-dbusdir=/etc/dbus-1 \ + --enable-ssl=yes --enable-gnutls \ + --disable-threads \ + --enable-avahi\ + --with-php=/usr/bin/php-cgi \ + --with-pdftops=pdftops \ + --with-optim="$CFLAGS" + + #reminder + #Restored support for GNU TLS and OpenSSL with threading enabled (STR #3605) in cups 1.5b1 + make } +check() { + cd "$srcdir/$pkgbase-$pkgver" + #httpAddrGetList(workstation64): FAIL + #1 TESTS FAILED! + #make[1]: *** [testhttp] Error 1 + make -k check || /bin/true +} + package_libcups() { pkgdesc="The CUPS Printing System - client libraries and headers" depends=('gnutls>=2.8.3' 'libtiff>=3.9.2-2' 'libpng>=1.4.0' 'krb5' 'avahi') @@ -66,12 +88,13 @@ backup=(etc/cups/cupsd.conf etc/logrotate.d/cups etc/pam.d/cups etc/xinetd.d/cups-lpd) -depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'xdg-utils' 'poppler>=0.12.3' 'libusb-compat' 'dbus-core' 'hicolor-icon-theme') +depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'poppler>=0.12.3' 'libusb-compat' 'dbus-core' 'hicolor-icon-theme') optdepends=('php: for included phpcups.so module' 'ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images' 'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly' 'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly' - 'foomatic-db-nonfree: drivers use Ghostscript to convert PostScript to a printable form directly') + 'foomatic-db-nonfree: drivers use Ghostscript to convert PostScript to a printable form directly' + 'xdg-utils: xdg .desktop file support') cd ${srcdir}/${pkgbase}-${pkgver} make BUILDROOT=${pkgdir} install-data install-exec @@ -95,7 +118,9 @@ optdepends=('php: for included phpcups.so module' # install ssl directory where to store the certs, solves some samba issues install -dm700 -g lp ${pkgdir}/etc/cups/ssl - install -dm511 -g lp ${pkgdir}/var/run/cups/certs + # remove directory from package, we create it in cups rc.d file + rm -rf ${pkgdir}/var/run +# install -dm511 -g lp ${pkgdir}/var/run/cups/certs # install some more configuration files that will get filled by cupsd touch ${pkgdir}/etc/cups/printers.conf diff --git a/extra/cups/cups b/extra/cups/cups index 4afaf5a7c..744c8e663 100755 --- a/extra/cups/cups +++ b/extra/cups/cups @@ -1,38 +1,68 @@ #!/bin/bash +daemon_name=cupsd + . /etc/rc.conf . /etc/rc.d/functions +#. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} -PID=`pidof -o %PPID /usr/sbin/cupsd` case "$1" in start) - stat_busy "Starting CUPS Daemon" - [ -z "$PID" ] && /usr/sbin/cupsd - if [ $? -gt 0 ]; then - stat_fail + stat_busy "Starting $daemon_name daemon" + + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid + # RUN + $daemon_name + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi else - echo $(pidof -o %PPID -x /usr/sbin/cupsd) > /var/run/cups.pid - add_daemon cups - stat_done + stat_fail + exit 1 fi ;; + stop) - stat_busy "Stopping CUPS Daemon" - [ ! -z "$PID" ] && kill $PID &> /dev/null + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + # KILL + [ ! -z "$PID" ] && kill $PID &> /dev/null + # if [ $? -gt 0 ]; then stat_fail + exit 1 else - rm /var/run/cups.pid - rm_daemon cups + rm -f /var/run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name stat_done fi ;; + restart) $0 stop - sleep 1 + sleep 3 $0 start ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + *) - echo "usage: $0 {start|stop|restart}" + echo "usage: $0 {start|stop|restart|status}" esac + exit 0 diff --git a/extra/cups/cups.install b/extra/cups/cups.install index e92e17ed3..c4307912b 100644 --- a/extra/cups/cups.install +++ b/extra/cups/cups.install @@ -1,5 +1,7 @@ post_install() { - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + fi echo ">> If you use an HTTPS connection to CUPS, the first time you access" echo ">> the interface it may take a very long time before the site comes up." echo ">> This is because the first request triggers the generation of the CUPS" @@ -7,9 +9,13 @@ post_install() { } post_upgrade() { - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + fi } post_remove() { - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + fi } |