aboutsummaryrefslogtreecommitdiffstats
path: root/x11/cups
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-10-14 09:19:12 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-10-14 09:34:02 +0000
commitea12c0a24156e7a3452ddfddd20240269e5a9af3 (patch)
treefbca89fda405f5e91265cdd2f9f4488ca1d541b6 /x11/cups
parentbcf07ed9367276cc21d4db39144dd936c14ebb39 (diff)
downloadaports-ea12c0a24156e7a3452ddfddd20240269e5a9af3.tar.bz2
aports-ea12c0a24156e7a3452ddfddd20240269e5a9af3.tar.xz
x11/cups: new aport
The CUPS Printing System http://www.cups.org/
Diffstat (limited to 'x11/cups')
-rw-r--r--x11/cups/APKBUILD94
-rw-r--r--x11/cups/cups-1.4.0-backend-https.patch11
-rw-r--r--x11/cups/cups-1.4.1-usb-function-decl.patch25
-rw-r--r--x11/cups/cups.logrotate8
-rw-r--r--x11/cups/cupsd.initd20
5 files changed, 158 insertions, 0 deletions
diff --git a/x11/cups/APKBUILD b/x11/cups/APKBUILD
new file mode 100644
index 0000000000..23cdc9987f
--- /dev/null
+++ b/x11/cups/APKBUILD
@@ -0,0 +1,94 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=cups
+pkgver=1.4.1
+pkgrel=0
+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
+ cups-1.4.0-backend-https.patch
+ cups-1.4.1-usb-function-decl.patch
+ "
+
+build ()
+{
+ cd "$srcdir"/$pkgname-$pkgver
+ patch -p1 -i ../cups-1.4.0-backend-https.patch || return 1
+ patch -p1 -i ../cups-1.4.1-usb-function-decl.patch || return 1
+
+ ./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
+ 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="587a58039c112ecb3c932e048c8a7b01 cups-1.4.1-source.tar.bz2
+f861b18f4446c43918c8643dcbbd7f6d cups.logrotate
+a1fb32d0f7745bada3c45acbf883bd93 cupsd.initd
+8ed5e69e85abf6c5f1a2068c679392e2 cups-1.4.0-backend-https.patch
+53da7d8c4cb35986ac0ebacb92d072f8 cups-1.4.1-usb-function-decl.patch"
diff --git a/x11/cups/cups-1.4.0-backend-https.patch b/x11/cups/cups-1.4.0-backend-https.patch
new file mode 100644
index 0000000000..8a70a20e6c
--- /dev/null
+++ b/x11/cups/cups-1.4.0-backend-https.patch
@@ -0,0 +1,11 @@
+diff -Naur cups-1.4.0/backend/Makefile cups-1.4.0.new/backend/Makefile
+--- cups-1.4.0/backend/Makefile 2009-03-03 20:39:21.000000000 +0100
++++ cups-1.4.0.new/backend/Makefile 2009-09-01 14:00:05.592615359 +0200
+@@ -91,6 +91,7 @@
+ done
+ $(RM) $(SERVERBIN)/backend/http
+ $(LN) ipp $(SERVERBIN)/backend/http
++ $(LN) ipp $(SERVERBIN)/backend/https
+ if test "x$(DNSSD_BACKEND)" != x; then \
+ $(RM) $(SERVERBIN)/backend/mdns; \
+ $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
diff --git a/x11/cups/cups-1.4.1-usb-function-decl.patch b/x11/cups/cups-1.4.1-usb-function-decl.patch
new file mode 100644
index 0000000000..3953d92f86
--- /dev/null
+++ b/x11/cups/cups-1.4.1-usb-function-decl.patch
@@ -0,0 +1,25 @@
+From 484851e02cc5a9b702e0f226f20a0d33325d9dee Mon Sep 17 00:00:00 2001
+From: Tim Waugh <twaugh@redhat.com>
+Date: Mon, 14 Sep 2009 17:34:36 +0100
+Subject: [PATCH] Fixed side_cb function declaration in usb-unix.c.
+
+---
+ backend/usb-unix.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/backend/usb-unix.c b/backend/usb-unix.c
+index c47910d..a00f1ad 100644
+--- a/backend/usb-unix.c
++++ b/backend/usb-unix.c
+@@ -560,7 +560,7 @@ open_device(const char *uri, /* I - Device URI */
+ * 'side_cb()' - Handle side-channel requests...
+ */
+
+-static void
++static int
+ side_cb(int print_fd, /* I - Print file */
+ int device_fd, /* I - Device file */
+ int snmp_fd, /* I - SNMP socket (unused) */
+--
+1.6.4.2
+
diff --git a/x11/cups/cups.logrotate b/x11/cups/cups.logrotate
new file mode 100644
index 0000000000..9c49bbdaff
--- /dev/null
+++ b/x11/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/x11/cups/cupsd.initd b/x11/cups/cupsd.initd
new file mode 100644
index 0000000000..e5529eeccc
--- /dev/null
+++ b/x11/cups/cupsd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ use net
+ @neededservices@
+ 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 $?
+}