dev-util/kup: EAPI update & tweaks

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson
2026-03-03 07:56:48 -08:00
parent 9d9d416815
commit 9494e92bd0
2 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# see kup-server.cfg & man kup-server
d /run/kup 0755 root root -
f /run/kup/lock 0644 root root -
# Upload tempdir; needs to be on the same filesystem as /var/lib/kup for atomic
# move.
d /var/lib/kup/tmp 1777 root root -

View File

@@ -0,0 +1,63 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit tmpfiles
DESCRIPTION="kernel.org uploader tool"
HOMEPAGE="https://www.kernel.org/pub/software/network/kup"
SRC_URI="https://www.kernel.org/pub/software/network/kup/${P}.tar.xz"
# Debian has sometimes carried useful patches
#DEB_PR=6
#DEB_P=${PN}_${PV}-${DEB_PR}
#SRC_URI+=" mirror://debian/pool/main/${PN::1}/${PN}/${DEB_P}.debian.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
app-arch/pigz
app-arch/xz-utils
dev-lang/perl
virtual/perl-Encode
virtual/perl-File-Spec
dev-perl/BSD-Resource
dev-perl/Config-Simple"
IUSE='gitolite'
DOCS=( README )
src_prepare() {
if use gitolite; then
cp -f "${S}/${PN}-server" "${S}/${PN}-server-gitolite"
patch "${S}/${PN}-server-gitolite" <"${FILESDIR}"/${PN}-server-gitolite-subcmd.patch || die
fi
default
}
src_install() {
dobin "${PN}" "${PN}-server" gpg-sign-all genrings
doman "${PN}.1" "${PN}-server.1"
insinto /etc/kup
doins kup-server.cfg
einstalldocs
# Gitolite expects "kup-server" inside the commands directory.
if use gitolite; then
exeinto /usr/libexec/gitolite/commands/
newexe kup-server-gitolite kup-server
# Gentoo's gitolite fork has a slightly different path:
exeinfo /usr/libexec/gitolite-gentoo/commands/
dosym -r /usr/libexec/gitolite/commands/kup-server /usr/libexec/gitolite-gentoo/commands/kup-server
fi
# Important data kept here
keepdir /var/lib/kup/pub
keepdir /var/lib/kup/pgp
# Will create other directories
newtmpfiles "${FILESDIR}"/kup.tmpfilesd kup.conf
}
pkg_postinst() {
tmpfiles_process ${PN}.conf
}