# Template file for 'cups-filters'
pkgname=cups-filters
version=1.0.59
revision=2
build_style=gnu-configure
configure_args="--disable-static --with-rcdir=no --enable-avahi
 --with-browseremoteprotocols=DNSSD,CUPS"
hostmakedepends="pkg-config ghostscript poppler-utils"
makedepends="lcms2-devel libpng-devel>=1.6 libqpdf-devel
 poppler-cpp-devel>=0.26 fontconfig-devel avahi-glib-libs-devel
 ghostscript-devel>=9.10 cups-devel"
depends="lib${sourcepkg}>=${version}_${revision} ghostscript poppler-utils"
conf_files="/etc/cups/cups-browsed.conf"
short_desc="The OpenPrinting CUPS Filters"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2, LGPL-2.1, MIT"
homepage="http://www.linuxfoundation.org/collaborate/workgroups/openprinting"
distfiles="http://www.openprinting.org/download/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=e8b24ed708a83018a068cf4838277543aaaa6bbb0a76485206d782d83bab0ad4

lib32disabled=yes
disable_parallel_build=yes

build_options="systemd"
if [ "$build_option_systemd" ]; then
	systemd_services="cups-browsed.service on"
fi

post_install() {
	if [ "$build_option_systemd" ]; then
		vinstall utils/cups-browsed.service 644 usr/lib/systemd/system
	fi
}

libcups-filters_package() {
	replaces="${sourcepkg}<1.0.58_2"
	short_desc+=" - shared library"
	pkg_install() {
		vmove usr/lib/*.so.*
	}
}
libcups-filters-devel_package() {
	replaces="${sourcepkg}<1.0.58_2"
	short_desc+=" - development files"
	depends="libcups-filters>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
	}
}
