2012-05-16 10:58:32 +02:00
|
|
|
# Template file for 'cups'
|
|
|
|
pkgname=cups
|
|
|
|
version=1.5.3
|
2012-06-12 21:03:28 +02:00
|
|
|
revision=8
|
2012-05-16 10:58:32 +02:00
|
|
|
patch_args="-Np1"
|
|
|
|
homepage="http://www.cups.org/"
|
|
|
|
license="GPL-2"
|
|
|
|
distfiles="ftp://ftp.easysw.com/pub/cups/${version}/cups-${version}-source.tar.bz2"
|
2012-06-06 08:33:20 +02:00
|
|
|
depends="libcups>=${version}_${revision} cups-filters"
|
2012-06-12 21:03:28 +02: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
|
|
|
|
systemd-devel gnutls-devel"
|
2012-05-16 10:58:32 +02:00
|
|
|
short_desc="Common Unix Printing System"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
checksum=9d716a8ffcefdaff1c37f4a4b590f1d74ff9ff72383a18f3c883c9235907f93d
|
|
|
|
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="
|
|
|
|
/var/cache/cups/rss 0750 root root
|
|
|
|
/var/run/cups/certs 0750 root root
|
|
|
|
/var/log/cups 0750 root root
|
|
|
|
/var/spool/cups/tmp 0750 root root
|
|
|
|
/etc/cups/ssl 0700 root lp"
|
|
|
|
|
2012-05-28 20:46:17 +02:00
|
|
|
subpackages="libcups cups-devel"
|
2012-06-02 12:48:44 +02:00
|
|
|
systemd_services="cups.socket on"
|
2012-05-16 10:58:32 +02:00
|
|
|
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
|
|
|
|
|
|
|
conf_files="
|
2012-05-16 16:17:51 +02:00
|
|
|
/etc/cups/cupsd.conf
|
2012-05-16 10:58:32 +02:00
|
|
|
/etc/cups/snmp.conf
|
|
|
|
/etc/cups/printers.conf
|
|
|
|
/etc/cups/classes.conf
|
|
|
|
/etc/cups/client.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 10:07:33 +02:00
|
|
|
--enable-threads --with-logdir=/var/log/cups \
|
2012-05-16 10:58:32 +02:00
|
|
|
--with-docdir=/usr/share/cups/doc --with-cups-user=daemon \
|
|
|
|
--with-cups-group=lp --enable-pam=yes --disable-ldap \
|
|
|
|
--enable-avahi --enable-pam --enable-ssl \
|
2012-05-17 10:37:16 +02:00
|
|
|
--with-systemdsystemunitdir=/lib/systemd/system \
|
|
|
|
--with-menudir=/usr/share/applications
|
2012-05-16 10:58:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make BUILDROOT=${DESTDIR} install
|
|
|
|
# Remove sysvinit scripts.
|
|
|
|
rm -rf ${DESTDIR}/etc/rc.d
|
|
|
|
# Serial backend needs to run as root (Fedora bug #212577).
|
|
|
|
chmod 700 ${DESTDIR}/usr/lib/cups/backend/serial
|
|
|
|
# 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
|
|
|
|
done
|
|
|
|
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 20:46:17 +02:00
|
|
|
|
|
|
|
# Remove files provided by cups-filters (obsolete in 1.6 as well).
|
|
|
|
rm -f ${DESTDIR}/usr/lib/cups/backend/{parallel,serial}
|
2012-06-12 21:03:28 +02:00
|
|
|
for f in bannertops commandtoescpx commandtopclx imagetops \
|
|
|
|
imagetoraster pdftops rastertoescpx rastertopclx \
|
|
|
|
texttops; do
|
|
|
|
rm -f ${DESTDIR}/usr/lib/cups/filter/${f}
|
|
|
|
done
|
|
|
|
rm -f ${DESTDIR}/usr/share/cups/banners/*
|
|
|
|
rm -f ${DESTDIR}/usr/share/cups/data/{testprint,psglyphs}
|
|
|
|
rm -f ${DESTDIR}/usr/share/cups/fonts/*
|
|
|
|
# comment out all conversion rules which use any of the removed filters
|
|
|
|
perl -p -i -e 's:^(.*\s+(pdftops|texttops|imagetops|bannertops|imagetoraster)\s*)$:#\1:' \
|
|
|
|
${DESTDIR}/usr/share/cups/mime/mime.convs
|
2012-05-16 10:58:32 +02:00
|
|
|
}
|