hplip: ensure CUPS PPD directory cannot be deleted by XBPS
Fixes #20689. Until XBPS can track make_dirs and prevent their removal when other packages are removed, this is accomplished by creating an empty hidden file in the /usr/share/cups/model.
This commit is contained in:
parent
5dfa21e303
commit
c77494f104
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'hplip'
|
||||
pkgname=hplip
|
||||
version=3.20.6
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-configure
|
||||
pycompile_dirs="usr/share/hplip"
|
||||
configure_args="
|
||||
|
@ -19,8 +19,7 @@ configure_args="
|
|||
--enable-pp-build
|
||||
--with-mimedir=/usr/share/cups/mime"
|
||||
conf_files="/etc/hp/hplip.conf"
|
||||
make_dirs="/var/lib/hp 0755 root root
|
||||
/usr/share/cups/model 0755 root root"
|
||||
make_dirs="/var/lib/hp 0755 root root"
|
||||
hostmakedepends="pkg-config automake libtool python3"
|
||||
makedepends="libressl-devel python3-devel libxml2-python3 cups-devel sane-devel
|
||||
ghostscript-devel net-snmp-devel libusb-devel libjpeg-turbo-devel dbus-devel"
|
||||
|
@ -47,9 +46,15 @@ do_install() {
|
|||
sed -i Makefile -e "s;ppd/hpcups/\\*.ppd.gz;;g"
|
||||
make locatedriverdir=/usr/libexec/hplip dat2drvdir=/usr/libexec/hplip \
|
||||
rulesdir=/usr/lib/udev/rules.d DESTDIR=${DESTDIR} install
|
||||
|
||||
# Move sane config to dll.d to avoid conflicts
|
||||
vmkdir etc/sane.d/dll.d
|
||||
mv ${DESTDIR}/etc/sane.d/dll.conf ${DESTDIR}/etc/sane.d/dll.d/hplip
|
||||
|
||||
# This directory is a hard requirement, prevent its removal
|
||||
vmkdir usr/share/cups/model
|
||||
touch ${DESTDIR}/usr/share/cups/model/.hplip
|
||||
|
||||
# remove autostart of hp-daemon
|
||||
rm -rf ${DESTDIR}/etc/xdg
|
||||
# remove unwanted files
|
||||
|
@ -75,7 +80,8 @@ hplip-gui_package() {
|
|||
depends="python3-gobject python3-dbus desktop-file-utils
|
||||
foomatic-db foomatic-db-engine python3-distro python3-PyQt5-dbus"
|
||||
short_desc+=" (with GUI)"
|
||||
conflicts="hplip"
|
||||
conflicts="${sourcepkg}"
|
||||
provides="${sourcepkg}-${version}_${revision}"
|
||||
pkg_install() {
|
||||
vmove usr/bin/hp-toolbox
|
||||
vmove usr/share/applications
|
||||
|
|
Loading…
Reference in New Issue