mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
74 lines
2.3 KiB
Bash
74 lines
2.3 KiB
Bash
# Support packages for Desktop
|
|
#
|
|
# Maintainer: Manuel Tortosa <manutortosa@chakra-project.org>
|
|
|
|
pkgname="system-config-printer"
|
|
pkgver=1.3.9
|
|
pkgrel=1
|
|
pkgdesc="A CUPS printer configuration tool and status applet"
|
|
url="http://cyberelk.net/tim/software/system-config-printer/"
|
|
arch=('any')
|
|
license=('GPL')
|
|
depends=('pycups' 'dbus-python' 'pysmbc' 'libusb-compat' 'python-pycurl')
|
|
makedepends=('intltool' 'python2' 'xmlto' 'docbook-xsl' 'desktop-file-utils' 'libcups' 'libxml2')
|
|
optdepends=('kdeadmin-system-config-printer-kde: for the administration tool in KDE System Settings')
|
|
provides=('system-config-printer-common')
|
|
source=("http://cyberelk.net/tim/data/${pkgname}/1.3/${pkgname}-${pkgver}.tar.xz")
|
|
md5sums=('df424f127eede63965608e5ec5e27519')
|
|
|
|
build() {
|
|
cd "${srcdir}"/${pkgbase}-${pkgver}
|
|
|
|
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
|
|
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
|
|
$(find . -name '*.py')
|
|
sed -i "s|#!/usr/bin/python|#!/usr/bin/python2|" udev/udev-add-printer
|
|
|
|
# Fix build with udev 183
|
|
sed -i 's:udev_get_sys_path (udev):"/sys":' udev/udev-configure-printer.c
|
|
|
|
./configure --prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--sysconfdir=/etc \
|
|
--with-udev-rules
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}/${pkgname}-${pkgver}
|
|
install -d ${pkgdir}/usr/share/${pkgname}
|
|
install -m644 config.py \
|
|
debug.py \
|
|
installpackage.py \
|
|
monitor.py \
|
|
PhysicalDevice.py \
|
|
ppdippstr.py \
|
|
probe_printer.py \
|
|
SearchCriterion.py \
|
|
smburi.py \
|
|
statereason.py \
|
|
${pkgdir}/usr/share/${pkgname}/
|
|
|
|
install -m755 pysmb.py \
|
|
${pkgdir}/usr/share/${pkgname}/
|
|
|
|
install -d ${pkgdir}/etc/dbus-1/system.d/
|
|
install -m644 dbus/com.redhat.NewPrinterNotification.conf \
|
|
dbus/com.redhat.PrinterDriversInstaller.conf \
|
|
${pkgdir}/etc/dbus-1/system.d/
|
|
install -d ${pkgdir}/etc/cupshelpers/
|
|
install -m644 xml/preferreddrivers.xml ${pkgdir}/etc/cupshelpers/
|
|
|
|
install -d ${pkgdir}/usr/lib/udev/rules.d
|
|
install -m755 udev/{udev-add-printer,udev-configure-printer} \
|
|
${pkgdir}/usr/lib/udev/
|
|
install -m644 udev/70-printers.rules \
|
|
${pkgdir}/usr/lib/udev/rules.d
|
|
|
|
for file in build/lib/cupshelpers/*.py; do
|
|
install -Dm644 $file \
|
|
${pkgdir}/usr/lib/python2.7/site-packages/cupshelpers/$(basename $file)
|
|
done
|
|
}
|