void-packages/srcpkgs/cups/template

116 lines
3.5 KiB
Plaintext
Raw Normal View History

2012-05-16 10:58:32 +02:00
# Template file for 'cups'
pkgname=cups
2013-05-18 21:42:14 +02:00
version=1.6.2
revision=1
2012-05-16 10:58:32 +02:00
patch_args="-Np1"
short_desc="Common Unix Printing System"
maintainer="Juan RP <xtraeme@gmail.com>"
2012-07-27 09:34:25 +02:00
homepage="http://www.cups.org/"
license="GPL-2"
distfiles="ftp://ftp.easysw.com/pub/cups/${version}/cups-${version}-source.tar.bz2"
2013-05-18 21:42:14 +02:00
checksum=37a3ebd305e76cfd4c9c53013e89c0f7a4dcb04b2e9da61029a29faa57e0f10d
2012-05-16 10:58:32 +02:00
2013-05-06 16:16:48 +02:00
hostmakedepends="automake pkg-config poppler-utils"
makedepends="acl-devel libjpeg-turbo-devel libpng-devel>=1.5.10 tiff-devel
openssl-devel pam-devel mit-krb5-devel poppler-devel libusb-devel avahi-libs-devel
2013-05-18 21:42:14 +02:00
systemd-devel gnutls-devel>=3.1.5 bc"
2013-05-06 16:16:48 +02:00
2012-05-16 10:58:32 +02:00
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 \
--enable-threads --with-logdir=/var/log/cups \
2012-07-27 09:34:25 +02:00
--with-docdir=/usr/share/cups/doc \
--with-cups-user=daemon --with-cups-group=lp \
--enable-avahi --enable-pam --enable-ssl=yes --enable-gnutls \
2012-07-09 23:18:16 +02:00
--with-systemdsystemunitdir=/usr/lib/systemd/system \
--with-menudir=/usr/share/applications \
2012-07-27 09:34:25 +02:00
--with-optim="${CFLAGS}"
2012-05-16 10:58:32 +02:00
}
do_build() {
2013-05-06 16:16:48 +02:00
# Do not run genstrings binary in cross builds.
if [ "$CROSS_BUILD" ]; then
sed -e '/.\/genstrings.*/d' -i ppdc/Makefile
fi
2012-05-16 10:58:32 +02:00
make ${makejobs}
}
do_install() {
make BUILDROOT=${DESTDIR} install
# Remove sysvinit scripts.
rm -rf ${DESTDIR}/etc/rc.d
2012-07-27 09:34:25 +02:00
rm -rf ${DESTDIR}/etc/init.d
2012-05-16 10:58:32 +02: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
chgrp lp ${DESTDIR}/etc/cups/${f}.conf
2012-05-16 10:58:32 +02:00
done
2012-05-16 10:58:32 +02: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
2012-11-16 00:23:04 +01:00
# Install pam file
2012-05-16 10:58:32 +02:00
vinstall ${FILESDIR}/cups.pam 644 etc/pam.d cups
2012-07-27 09:34:25 +02:00
# Remove files provided by cups-filters.
rm -f ${DESTDIR}/usr/share/cups/banners/*
2012-07-27 09:34:25 +02:00
rm -f ${DESTDIR}/usr/share/cups/data/testprint
# comment out all conversion rules which use any of the removed filters
2012-07-27 09:34:25 +02:00
perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' \
${DESTDIR}/usr/share/cups/mime/mime.convs
2012-05-16 10:58:32 +02:00
}
libcups_package() {
short_desc+=" - client runtime shared libraries"
conf_files="/etc/cups/client.conf"
replaces="cups<1.6.0_1"
pkg_install() {
vmove "usr/lib/*.so*"
vmove etc/cups/client.conf
vmove usr/share/man/man5/client.conf.5
}
}
cups-devel_package() {
depends="gnutls-devel mit-krb5-devel libcups>=$version"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/bin/cups-config
}
}
cups_package() {
systemd_services="cups.socket on"
conf_files="
/etc/cups/cupsd.conf
/etc/cups/snmp.conf
/etc/cups/printers.conf
/etc/cups/classes.conf
/etc/cups/subscriptions.conf
/etc/dbus-1/system.d/cups.conf
/etc/pam.d/cups"
make_dirs="
/var/cache/cups/rss 0750 root lp
/var/run/cups/certs 0750 root lp
/var/log/cups 0750 root root
/var/spool/cups 0755 root lp
/etc/cups/ssl 0700 root lp"
depends="libcups>=${version}_${revision} cups-filters bc"
pkg_install() {
2013-05-06 16:16:48 +02:00
vmove all
}
}