pkgname=system-config-printer pkgver=1.5.9 pkgrel=1 pkgdesc="A CUPS printer configuration tool and status applet" url="http://cyberelk.net/tim/software/system-config-printer/" arch=('x86_64') license=('GPL') depends=('python3-pycups' 'python3-dbus' 'python3-pycurl' 'python3-requests' 'python3-gobject' 'gtk3' 'python3-cairo' 'libnotify') makedepends=('intltool' 'xmlto' 'docbook-xsl' 'desktop-file-utils') optdepends=('python3-pysmbc: SMB browser support') source=(https://github.com/zdohnal/${pkgname}/archive/v${pkgver}.tar.gz pass_libgnome_keyring_missing.diff) md5sums=('cdadf9343398f3dc8fa4d4f83ac5d8b8' '1c219bf9e55e39b125daaa9f5eed5b84') prepare() { cd ${pkgname}-${pkgver} # make it actually work without libgnome-keyring # https://bugs.archlinux.org/task/52607, https://github.com/zdohnal/system-config-printer/issues/51 patch -Np1 -i ../pass_libgnome_keyring_missing.diff touch README ChangeLog autoreconf -fi } build() { cd $pkgname-$pkgver ./configure --prefix=/usr \ --sbindir=/usr/bin \ --sysconfdir=/etc \ --with-udevdir=/usr/lib/udev --with-udev-rules make } package() { cd $pkgname-$pkgver make DESTDIR=$pkgdir install # Compile *.pyc find "${pkgdir}" -name '*.py' -exec python3 -mpy_compile {} + # Compile *.pyo find "${pkgdir}" -name '*.py' -exec python3 -O -mpy_compile {} + # new cups 2.0.0 service naming sed -i "s|cups.socket|org.cups.cupsd.socket|g" ${pkgdir}/usr/lib/systemd/system/configure-printer@.service }