mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 23:07:10 -08:00
net-print/cups: Properly rename systemd unit files to Gentoo naming
It turns out that the old patch for 2.0* is not enough any more. Now, the renaming is directly done in the ebuild - patching the build system again for every version bump is just too much maintenance work. Package-Manager: portage-2.2.26
This commit is contained in:
@@ -97,7 +97,6 @@ PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch"
|
||||
"${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
|
||||
"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
|
||||
"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
|
||||
"${FILESDIR}/${P}-systemd-socket.patch"
|
||||
"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
|
||||
)
|
||||
@@ -151,7 +150,6 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
base_src_prepare
|
||||
epatch_user
|
||||
|
||||
# Remove ".SILENT" rule for verbose output (bug 524338).
|
||||
@@ -286,6 +284,20 @@ multilib_src_install_all() {
|
||||
rm -rf "${ED}"/etc/xinetd.d
|
||||
fi
|
||||
|
||||
# Rename systemd service files to gentoo's own names:
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cupsd.path \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.path || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cupsd.service \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.service || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cupsd.socket \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.socket || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cups-lpd@.service \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.path || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cups-lpd.socket \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.path || die
|
||||
sed -i -e 's/org\.cups\.cupsd/cups/g' \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.service || die
|
||||
|
||||
keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
|
||||
/var/log/cups /var/spool/cups/tmp
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
@@ -92,11 +92,11 @@ RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
# systemd-socket.patch from Fedora
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch"
|
||||
"${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch"
|
||||
"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
|
||||
"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
|
||||
"${FILESDIR}/${P}-systemd-socket.patch"
|
||||
"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
|
||||
)
|
||||
@@ -150,7 +150,7 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
base_src_prepare
|
||||
epatch_user
|
||||
|
||||
# Remove ".SILENT" rule for verbose output (bug 524338).
|
||||
sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed"
|
||||
@@ -284,6 +284,20 @@ multilib_src_install_all() {
|
||||
rm -rf "${ED}"/etc/xinetd.d
|
||||
fi
|
||||
|
||||
# Rename systemd service files to gentoo's own names:
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cupsd.path \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.path || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cupsd.service \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.service || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cupsd.socket \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.socket || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cups-lpd@.service \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.path || die
|
||||
mv "${ED}"/"$(systemd_get_systemunitdir)"/org.cups.cups-lpd.socket \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.path || die
|
||||
sed -i -e 's/org\.cups\.cupsd/cups/g' \
|
||||
"${ED}"/"$(systemd_get_systemunitdir)"/cups.service || die
|
||||
|
||||
keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
|
||||
/var/log/cups /var/spool/cups/tmp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user