2012-05-16 08:58:32 +00:00
|
|
|
# Template file for 'cups'
|
|
|
|
pkgname=cups
|
2014-07-31 14:24:20 +00:00
|
|
|
version=1.7.5
|
2014-08-28 13:06:20 +00:00
|
|
|
revision=2
|
2012-05-16 08:58:32 +00:00
|
|
|
patch_args="-Np1"
|
|
|
|
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"
|
2013-07-13 04:49:46 +00:00
|
|
|
distfiles="http://www.cups.org/software/${version}/cups-${version}-source.tar.gz"
|
2014-07-31 14:24:20 +00:00
|
|
|
checksum=0bf2680ee191a6caf5a8ac5c231a75312e5c41a02dfbf48a32db4bf974d111c0
|
2012-05-16 08:58:32 +00:00
|
|
|
|
2013-05-06 14:16:48 +00:00
|
|
|
hostmakedepends="automake pkg-config poppler-utils"
|
2014-07-15 18:09:53 +00:00
|
|
|
makedepends="
|
2014-07-31 14:24:20 +00:00
|
|
|
acl-devel libjpeg-turbo-devel libpng-devel>=1.5.10 tiff-devel
|
2014-07-28 19:47:19 +00:00
|
|
|
libressl-devel pam-devel poppler-devel libusb-devel avahi-libs-devel"
|
2014-08-28 13:06:20 +00:00
|
|
|
depends="libcups>=${version}_${revision} cups-filters bc xdg-utils"
|
2014-01-01 15:10:11 +00:00
|
|
|
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"
|
2013-05-06 14:16:48 +00:00
|
|
|
|
2014-07-28 19:47:19 +00:00
|
|
|
|
|
|
|
# Package build options
|
|
|
|
build_options="systemd"
|
|
|
|
|
|
|
|
if [ "$build_option_systemd" ]; then
|
|
|
|
makedepends+=" systemd-devel"
|
|
|
|
configure_args+=" --with-systemdsystemunitdir=/usr/lib/systemd/system"
|
|
|
|
systemd_services="cups.socket on"
|
|
|
|
fi
|
|
|
|
|
2012-05-16 08:58:32 +00:00
|
|
|
pre_configure() {
|
|
|
|
aclocal -I config-scripts
|
|
|
|
autoconf -I config-scripts
|
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2013-05-26 08:41:55 +00:00
|
|
|
./configure ${configure_args} --libdir=/usr/lib \
|
2012-05-16 08:58:32 +00:00
|
|
|
--enable-acl --enable-dbus --enable-raw-printing \
|
2012-05-22 08:07:33 +00:00
|
|
|
--enable-threads --with-logdir=/var/log/cups \
|
2014-07-15 18:09:53 +00:00
|
|
|
--with-docdir=/usr/share/cups/doc --disable-gssapi \
|
|
|
|
--with-cups-user=daemon --with-cups-group=lp --enable-relro \
|
|
|
|
--enable-avahi --enable-pam --enable-openssl --disable-gnutls \
|
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() {
|
2013-05-06 14:16:48 +00:00
|
|
|
# Do not run genstrings binary in cross builds.
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
sed -e '/.\/genstrings.*/d' -i ppdc/Makefile
|
|
|
|
fi
|
2012-05-16 08:58:32 +00:00
|
|
|
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
|
|
|
|
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
|
2012-11-15 23:23:04 +00:00
|
|
|
# Install pam file
|
2012-05-16 08:58:32 +00:00
|
|
|
vinstall ${FILESDIR}/cups.pam 644 etc/pam.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
|
|
|
}
|
2013-04-12 06:55:23 +00:00
|
|
|
|
|
|
|
libcups_package() {
|
2013-05-06 14:31:25 +00:00
|
|
|
short_desc+=" - client runtime shared libraries"
|
2013-04-12 06:55:23 +00:00
|
|
|
conf_files="/etc/cups/client.conf"
|
|
|
|
replaces="cups<1.6.0_1"
|
|
|
|
pkg_install() {
|
2013-07-13 04:49:46 +00:00
|
|
|
vmove "usr/lib/*.so.*"
|
2013-04-12 06:55:23 +00:00
|
|
|
vmove etc/cups/client.conf
|
|
|
|
vmove usr/share/man/man5/client.conf.5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cups-devel_package() {
|
2014-07-15 18:12:11 +00:00
|
|
|
depends="zlib-devel libcups>=${version}_${revision}"
|
2013-05-06 14:31:25 +00:00
|
|
|
short_desc+=" - development files"
|
2013-04-12 06:55:23 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/bin/cups-config
|
2013-07-13 04:49:46 +00:00
|
|
|
vmove "usr/lib/*.so"
|
2013-04-12 06:55:23 +00:00
|
|
|
}
|
|
|
|
}
|