2012-05-16 08:58:32 +00:00
|
|
|
# Template file for 'cups'
|
|
|
|
pkgname=cups
|
2012-07-28 07:52:10 +00:00
|
|
|
version=1.6.1
|
2012-09-21 13:47:02 +00:00
|
|
|
revision=2
|
2012-05-16 08:58:32 +00:00
|
|
|
patch_args="-Np1"
|
2012-07-27 07:34:25 +00:00
|
|
|
depends="libcups>=${version}_${revision} cups-filters bc"
|
2012-06-12 19:03:28 +00:00
|
|
|
makedepends="automake perl pkg-config acl-devel jpeg-devel libpng-devel>=1.5.10 tiff-devel
|
|
|
|
openssl-devel pam-devel mit-krb5-devel poppler-devel libusb-devel avahi-libs-devel
|
2012-06-12 19:56:11 +00:00
|
|
|
systemd-devel gnutls-devel poppler-utils"
|
2012-05-16 08:58:32 +00:00
|
|
|
short_desc="Common Unix Printing System"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2012-07-27 07:34:25 +00:00
|
|
|
homepage="http://www.cups.org/"
|
|
|
|
license="GPL-2"
|
|
|
|
distfiles="ftp://ftp.easysw.com/pub/cups/${version}/cups-${version}-source.tar.bz2"
|
2012-07-28 07:52:10 +00:00
|
|
|
checksum=5842ab1144e653160fe667ee78b932ee036b054c0c2d20533d19e309149a7790
|
2012-05-16 08:58:32 +00:00
|
|
|
long_desc="
|
|
|
|
The Common UNIX Printing System (or CUPS(tm)) is a printing system and general
|
|
|
|
replacement for lpd and the like. It supports the Internet Printing Protocol
|
|
|
|
(IPP), and has its own filtering driver model for handling various document types."
|
|
|
|
|
|
|
|
make_dirs="
|
2012-06-12 19:56:11 +00:00
|
|
|
/var/cache/cups/rss 0750 root lp
|
|
|
|
/var/run/cups/certs 0750 root lp
|
2012-05-16 08:58:32 +00:00
|
|
|
/var/log/cups 0750 root root
|
2012-06-12 19:56:11 +00:00
|
|
|
/var/spool/cups 0755 root lp
|
2012-05-16 08:58:32 +00:00
|
|
|
/etc/cups/ssl 0700 root lp"
|
|
|
|
|
2012-05-28 18:46:17 +00:00
|
|
|
subpackages="libcups cups-devel"
|
2012-06-02 10:48:44 +00:00
|
|
|
systemd_services="cups.socket on"
|
2012-10-05 16:29:09 +00:00
|
|
|
|
2012-05-16 08:58:32 +00:00
|
|
|
|
|
|
|
conf_files="
|
2012-05-16 14:17:51 +00:00
|
|
|
/etc/cups/cupsd.conf
|
2012-05-16 08:58:32 +00:00
|
|
|
/etc/cups/snmp.conf
|
|
|
|
/etc/cups/printers.conf
|
|
|
|
/etc/cups/classes.conf
|
|
|
|
/etc/cups/subscriptions.conf
|
|
|
|
/etc/dbus-1/system.d/cups.conf
|
|
|
|
/etc/logrotate.d/cups
|
|
|
|
/etc/pam.d/cups"
|
|
|
|
|
|
|
|
pre_configure() {
|
|
|
|
aclocal -I config-scripts
|
|
|
|
autoconf -I config-scripts
|
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
./configure ${CONFIGURE_SHARED_ARGS} --libdir=/usr/lib \
|
|
|
|
--enable-acl --enable-dbus --enable-raw-printing \
|
2012-05-22 08:07:33 +00:00
|
|
|
--enable-threads --with-logdir=/var/log/cups \
|
2012-07-27 07:34:25 +00:00
|
|
|
--with-docdir=/usr/share/cups/doc \
|
|
|
|
--with-cups-user=daemon --with-cups-group=lp \
|
2012-06-12 19:56:11 +00:00
|
|
|
--enable-avahi --enable-pam --enable-ssl=yes --enable-gnutls \
|
2012-07-09 21:18:16 +00:00
|
|
|
--with-systemdsystemunitdir=/usr/lib/systemd/system \
|
2012-06-12 19:56:11 +00:00
|
|
|
--with-menudir=/usr/share/applications \
|
2012-07-27 07:34:25 +00:00
|
|
|
--with-optim="${CFLAGS}"
|
2012-05-16 08:58:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make BUILDROOT=${DESTDIR} install
|
|
|
|
# Remove sysvinit scripts.
|
|
|
|
rm -rf ${DESTDIR}/etc/rc.d
|
2012-07-27 07:34:25 +00:00
|
|
|
rm -rf ${DESTDIR}/etc/init.d
|
|
|
|
|
2012-05-16 08:58:32 +00:00
|
|
|
# compress some driver files, adopted from Fedora
|
|
|
|
find ${DESTDIR}/usr/share/cups/model -name "*.ppd"|xargs gzip -n9f
|
|
|
|
# install some more configuration files that will get filled by cupsd
|
|
|
|
for f in printers classes client subscriptions; do
|
|
|
|
touch ${DESTDIR}/etc/cups/${f}.conf
|
2012-06-12 19:56:11 +00:00
|
|
|
chgrp lp ${DESTDIR}/etc/cups/${f}.conf
|
2012-05-16 08:58:32 +00:00
|
|
|
done
|
2012-06-12 19:56:11 +00:00
|
|
|
|
2012-05-16 08:58:32 +00:00
|
|
|
echo "# see 'man client.conf'" >> ${DESTDIR}/etc/cups/client.conf
|
|
|
|
echo "ServerName /var/run/cups/cups.sock" >> ${DESTDIR}/etc/cups/client.conf
|
|
|
|
echo "# alternative: ServerName hostname-or-ip-address[:port] of a remote server" >> \
|
|
|
|
${DESTDIR}/etc/cups/client.conf
|
|
|
|
# fix .desktop file
|
|
|
|
sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' \
|
|
|
|
${DESTDIR}/usr/share/applications/cups.desktop
|
|
|
|
# Install pam and logrotate files.
|
|
|
|
vinstall ${FILESDIR}/cups.pam 644 etc/pam.d cups
|
|
|
|
vinstall ${FILESDIR}/cups.logrotate 644 etc/logrotate.d cups
|
2012-05-28 18:46:17 +00:00
|
|
|
|
2012-07-27 07:34:25 +00:00
|
|
|
# Remove files provided by cups-filters.
|
2012-06-12 19:03:28 +00:00
|
|
|
rm -f ${DESTDIR}/usr/share/cups/banners/*
|
2012-07-27 07:34:25 +00:00
|
|
|
rm -f ${DESTDIR}/usr/share/cups/data/testprint
|
2012-06-12 19:03:28 +00:00
|
|
|
# comment out all conversion rules which use any of the removed filters
|
2012-07-27 07:34:25 +00:00
|
|
|
perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' \
|
2012-06-12 19:03:28 +00:00
|
|
|
${DESTDIR}/usr/share/cups/mime/mime.convs
|
2012-05-16 08:58:32 +00:00
|
|
|
}
|