2012-05-16 10:58:32 +02:00
|
|
|
# Template file for 'cups'
|
|
|
|
pkgname=cups
|
2015-02-10 17:36:28 +01:00
|
|
|
version=2.0.2
|
2015-06-02 08:20:12 +02:00
|
|
|
revision=7
|
2012-05-16 10:58:32 +02:00
|
|
|
patch_args="-Np1"
|
|
|
|
short_desc="Common Unix Printing System"
|
2015-04-10 09:16:30 +02:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2012-07-27 09:34:25 +02:00
|
|
|
homepage="http://www.cups.org/"
|
|
|
|
license="GPL-2"
|
2013-07-13 06:49:46 +02:00
|
|
|
distfiles="http://www.cups.org/software/${version}/cups-${version}-source.tar.gz"
|
2015-02-10 17:36:28 +01:00
|
|
|
checksum=5c54b0012a7b76cb76147f5476008026392272eb2322ccd38c02df96ec72aea7
|
2012-05-16 10:58:32 +02:00
|
|
|
|
2014-11-24 12:28:21 +01:00
|
|
|
hostmakedepends="automake pkg-config poppler-utils gnutls-devel avahi-libs-devel"
|
2015-03-27 10:50:40 +01:00
|
|
|
makedepends="acl-devel libjpeg-turbo-devel libpng-devel tiff-devel
|
2014-11-24 12:28:21 +01:00
|
|
|
gnutls-devel pam-devel poppler-devel libusb-devel avahi-libs-devel
|
2015-04-08 16:27:28 +02:00
|
|
|
libpaper-devel $(vopt_if systemd systemd-devel)"
|
2015-03-13 08:01:04 +01:00
|
|
|
depends="xdg-utils"
|
2014-01-01 16:10:11 +01:00
|
|
|
conf_files="
|
|
|
|
/etc/cups/cupsd.conf
|
|
|
|
/etc/cups/snmp.conf
|
|
|
|
/etc/cups/printers.conf
|
|
|
|
/etc/cups/classes.conf
|
2015-04-08 20:02:02 +02:00
|
|
|
/etc/cups/cups-files.conf
|
2014-01-01 16:10:11 +01:00
|
|
|
/etc/cups/subscriptions.conf
|
|
|
|
/etc/pam.d/cups"
|
|
|
|
make_dirs="
|
2015-04-08 15:46:37 +02:00
|
|
|
/usr/lib/cups/driver 0755 root root
|
2014-01-01 16:10:11 +01:00
|
|
|
/var/log/cups 0750 root root
|
2015-04-08 15:46:37 +02:00
|
|
|
/var/cache/cups/rss 0750 cups lp
|
2015-04-08 14:41:56 +02:00
|
|
|
/var/spool/cups 0755 cups lp
|
|
|
|
/etc/cups/ssl 0700 cups lp"
|
2014-07-28 21:47:19 +02:00
|
|
|
|
|
|
|
# Package build options
|
|
|
|
build_options="systemd"
|
2015-04-08 14:41:56 +02:00
|
|
|
system_accounts="cups"
|
|
|
|
cups_pgroup="lp"
|
|
|
|
cups_homedir="/var/spool/cups"
|
2014-07-28 21:47:19 +02:00
|
|
|
|
2012-05-16 10:58:32 +02:00
|
|
|
pre_configure() {
|
|
|
|
aclocal -I config-scripts
|
|
|
|
autoconf -I config-scripts
|
|
|
|
}
|
|
|
|
do_configure() {
|
2014-11-24 12:28:21 +01:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
CC=cc AR= RANLIB= CFLAGS=-Os LDFLAGS= ./configure
|
|
|
|
make -C cups libcups.a
|
|
|
|
make -C man mantohtml
|
|
|
|
mkdir cross-tools
|
|
|
|
cp man/mantohtml cross-tools
|
|
|
|
make clean
|
|
|
|
fi
|
2015-06-02 08:20:12 +02:00
|
|
|
./configure ${configure_args} --sbindir=/usr/bin --libdir=/usr/lib \
|
2012-05-16 10:58:32 +02:00
|
|
|
--enable-acl --enable-dbus --enable-raw-printing \
|
2012-05-22 10:07:33 +02:00
|
|
|
--enable-threads --with-logdir=/var/log/cups \
|
2014-07-15 20:09:53 +02:00
|
|
|
--with-docdir=/usr/share/cups/doc --disable-gssapi \
|
2015-04-08 14:41:56 +02:00
|
|
|
--with-cups-user=cups --with-cups-group=lp --enable-relro \
|
2015-04-08 16:27:28 +02:00
|
|
|
--enable-libpaper --enable-avahi --enable-pam --enable-ssl \
|
2014-11-24 12:28:21 +01:00
|
|
|
--with-menudir=/usr/share/applications --with-xinetd=/etc/xinetd.d \
|
|
|
|
--with-optim="${CFLAGS}" $(vopt_with systemd) \
|
|
|
|
--without-perl --without-php --without-python
|
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
|
2014-11-24 12:28:21 +01:00
|
|
|
sed -e "s,./mantohtml,${wrksrc}/cross-tools/mantohtml,g" -i man/Makefile
|
2013-05-06 16:16:48 +02:00
|
|
|
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
|
|
|
|
done
|
2012-06-12 21:56:11 +02:00
|
|
|
|
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-05-28 20:46:17 +02:00
|
|
|
|
2012-07-27 09:34:25 +02:00
|
|
|
# Remove files provided by cups-filters.
|
2012-06-12 21:03:28 +02:00
|
|
|
rm -f ${DESTDIR}/usr/share/cups/banners/*
|
2012-07-27 09:34:25 +02:00
|
|
|
rm -f ${DESTDIR}/usr/share/cups/data/testprint
|
2012-06-12 21:03:28 +02:00
|
|
|
# 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:' \
|
2012-06-12 21:03:28 +02:00
|
|
|
${DESTDIR}/usr/share/cups/mime/mime.convs
|
2014-11-24 12:28:21 +01:00
|
|
|
# comment out unnecessary PageLogFormat entry
|
|
|
|
sed -i -e 's:PageLogFormat:#PageLogFormat:' ${DESTDIR}/etc/cups/cupsd.conf*
|
2014-10-13 13:21:47 +02:00
|
|
|
|
2014-11-24 12:28:21 +01:00
|
|
|
# runit service
|
2014-10-13 13:21:47 +02:00
|
|
|
vsv cupsd
|
2012-05-16 10:58:32 +02:00
|
|
|
}
|
2013-04-12 08:55:23 +02:00
|
|
|
|
|
|
|
libcups_package() {
|
2013-05-06 16:31:25 +02:00
|
|
|
short_desc+=" - client runtime shared libraries"
|
2013-04-12 08:55:23 +02:00
|
|
|
conf_files="/etc/cups/client.conf"
|
|
|
|
pkg_install() {
|
2013-07-13 06:49:46 +02:00
|
|
|
vmove "usr/lib/*.so.*"
|
2013-04-12 08:55:23 +02:00
|
|
|
vmove etc/cups/client.conf
|
|
|
|
vmove usr/share/man/man5/client.conf.5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cups-devel_package() {
|
2014-07-15 20:12:11 +02:00
|
|
|
depends="zlib-devel libcups>=${version}_${revision}"
|
2013-05-06 16:31:25 +02:00
|
|
|
short_desc+=" - development files"
|
2013-04-12 08:55:23 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/bin/cups-config
|
2013-07-13 06:49:46 +02:00
|
|
|
vmove "usr/lib/*.so"
|
2013-04-12 08:55:23 +02:00
|
|
|
}
|
|
|
|
}
|