diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-25 16:43:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-25 16:43:57 +0000 |
commit | 9526ee659401dee7160f35cb62ded2779bcbbc99 (patch) | |
tree | 812ad73bde9c84dcc02a3acbc5db576369ca314a /main/cups | |
parent | 05e09c1126a898b6d0af491fef0401bf53e297f8 (diff) | |
download | aports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.bz2 aports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.xz |
merged x11 repository into main
ref #255
Diffstat (limited to 'main/cups')
-rw-r--r-- | main/cups/APKBUILD | 92 | ||||
-rw-r--r-- | main/cups/cups.logrotate | 8 | ||||
-rw-r--r-- | main/cups/cupsd.initd | 20 |
3 files changed, 120 insertions, 0 deletions
diff --git a/main/cups/APKBUILD b/main/cups/APKBUILD new file mode 100644 index 0000000000..26fd2ad2fc --- /dev/null +++ b/main/cups/APKBUILD @@ -0,0 +1,92 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=cups +pkgver=1.4.2 +pkgrel=1 +pkgdesc="The CUPS Printing System" +url="http://www.cups.org/" +license="GPL" +subpackages="$pkgname-dev $pkgname-doc libcups $pkgname-client" +makedepends="openssl-dev libpaper-dev dbus-dev" +depends="cups-client poppler-utils" +install= +pkggroups="lp lpadmin" +pkgusers="lp" +source="ftp://ftp.easysw.com/pub/$pkgname/$pkgver/$pkgname-$pkgver-source.tar.bz2 + $pkgname.logrotate + cupsd.initd + " + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-logdir=/var/log/cups \ + --with-docdir=/usr/share/cups/doc \ + --with-cups-user=lp \ + --with-cups-group=lp \ + --with-system-groups=lpadmin \ + --without-php \ + --disable-pam \ + --disable-ldap \ + --libdir=/usr/lib \ + --enable-raw-printing \ + --enable-dbus \ + --with-dbusdir=/etc/dbus-1 \ + --enable-libpaper \ + --enable-ssl=yes \ + --enable-gnutls \ + --enable-pdftops \ + --with-pdftops=pdftops \ + --with-optim="$CFLAGS" + make || return 1 +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + make BUILDROOT="$pkgdir" install + rm -rf "$pkgdir"/etc/init.d "$pkgdir"/etc/rc* + + install -D -m644 ../cups.logrotate "$pkgdir"/etc/logrotate.d/cups + install -D -m755 ../cupsd.initd "$pkgdir"/etc/init.d/cupsd + + sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' "$pkgdir"/usr/share/applications/cups.desktop + find "$pkgdir"/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f +} + +_mv() { + for i in "$@"; do + mkdir -p "$subpkgdir"/${i%/*} + mv "$pkgdir"/$i "$subpkgdir"/${i%/*}/ || return 1 + done +} + +libcups() { + pkgdesc="CUPS libraries" + _mv usr/lib/*.so* + install -d "$pkgdir"/etc/cups +} + +client() { + pkgdesc="CUPS client" + _mv usr/bin \ + usr/share/cups/charsets \ + usr/share/cups/charmaps \ + usr/sbin/accept \ + usr/sbin/cupsaddsmb \ + usr/sbin/cupsctl \ + usr/sbin/cupsdisable \ + usr/sbin/cupsenable \ + usr/sbin/lpadmin \ + usr/sbin/lpc \ + usr/sbin/lpinfo \ + usr/sbin/lpmove \ + usr/sbin/reject + touch "$subpkgdir"/usr/share/cups/charmaps/us-ascii.txt +} + +md5sums="d95e2d588e3d36e563027a963b117b1b cups-1.4.2-source.tar.bz2 +f861b18f4446c43918c8643dcbbd7f6d cups.logrotate +1154ed66fdcfa0523f929a369079f43c cupsd.initd" diff --git a/main/cups/cups.logrotate b/main/cups/cups.logrotate new file mode 100644 index 0000000000..9c49bbdaff --- /dev/null +++ b/main/cups/cups.logrotate @@ -0,0 +1,8 @@ +/var/log/cups/*log { + missingok + notifempty + delaycompress + postrotate + /bin/kill -HUP `cat /var/run/cups.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/main/cups/cupsd.initd b/main/cups/cupsd.initd new file mode 100644 index 0000000000..f59e27b4c4 --- /dev/null +++ b/main/cups/cupsd.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript + +depend() { + use net + need dbus + before nfs + after logger +} + +start() { + ebegin "Starting cupsd" + start-stop-daemon --start --quiet --exec /usr/sbin/cupsd + eend $? +} + +stop() { + ebegin "Stopping cupsd" + start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd + eend $? +} |