Revert "Fix ebuilds: follow Gentoo conventions"

This reverts commit 6a60579119.

Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
David Roman
2025-12-25 19:28:03 +01:00
parent 924e7d954f
commit 5221b2e34a
3 changed files with 135 additions and 79 deletions

View File

@@ -0,0 +1 @@
DIST gentoo-update-0.1.tar.gz 26624 SHA256 d665fb460f8d9c3209a5224dd88d0dacca44f51c97f89395dbab2a886a6e3174

View File

@@ -1,28 +1,33 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Distributed under the terms of the GNU General Public License v3
EAPI=8
inherit cmake systemd
inherit cmake
DESCRIPTION="Update notifier and applier for Gentoo Linux"
DESCRIPTION="An update notifier & applier for Gentoo Linux that assists with pre/post update tasks"
HOMEPAGE="https://github.com/Techoraye/gentoo-update"
SRC_URI="https://github.com/Techoraye/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/Techoraye/gentoo-update/archive/v${PV}.tar.gz"
S="${WORKDIR}/${PN}-${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="gui"
IUSE="notification python"
RDEPEND="
app-portage/gentoolkit
sys-apps/portage
gui? (
dev-python/PyQt6[gui]
x11-libs/libnotify
)
DEPEND="
>=dev-cpp/cpp-base:0
"
RDEPEND="${DEPEND}
notification? ( x11-libs/libnotify )
python? (
dev-python/pyqt6[gui]
)
app-portage/gentoolkit
sys-apps/portage[python]
"
DEPEND="${RDEPEND}"
src_configure() {
local mycmakeargs=(
@@ -33,36 +38,57 @@ src_configure() {
src_install() {
cmake_src_install
insinto /etc/${PN}
newins res/config/${PN}.conf.example ${PN}.conf
newbashcomp res/completions/${PN}.bash ${PN}
# Install documentation
einstalldocs
# Install configuration example
insinto /etc/gentoo-update
newins res/config/gentoo-update.conf.example gentoo-update.conf
# Install shell completions
insinto /usr/share/bash-completion/completions
doins res/completions/gentoo-update.bash
insinto /usr/share/zsh/site-functions
newins res/completions/${PN}.zsh _${PN}
newins res/completions/gentoo-update.zsh _gentoo-update
insinto /usr/share/fish/vendor_completions.d
doins res/completions/${PN}.fish
if use gui; then
domenu res/desktop/${PN}.desktop
domenu res/desktop/${PN}-tray.desktop
fi
systemd_dounit res/systemd/${PN}.service
systemd_dounit res/systemd/${PN}.timer
use gui && systemd_dounit res/systemd/${PN}-tray.service
newinitd res/openrc/${PN} ${PN}
doins res/completions/gentoo-update.fish
# Install desktop entry files
insinto /usr/share/applications
doins res/desktop/gentoo-update.desktop
doins res/desktop/gentoo-update-tray.desktop
# Install systemd units
insinto /etc/systemd/system
doins res/systemd/gentoo-update.service
doins res/systemd/gentoo-update.timer
doins res/systemd/gentoo-update-tray.service
# Install OpenRC service
insinto /etc/init.d
newins res/openrc/gentoo-update gentoo-update
}
pkg_postinst() {
elog "Configuration file: /etc/${PN}/${PN}.conf"
elog "See 'man ${PN}' or ${PN} --help for usage information"
elog "Gentoo-Update has been installed successfully!"
elog ""
elog "Usage: gentoo-update [OPTIONS]"
elog ""
elog "For help: gentoo-update --help"
elog ""
elog "Configuration file: ~/.config/gentoo-update/gentoo-update.conf"
elog "Generate default config: gentoo-update --gen-config"
elog ""
if use gui; then
elog ""
elog "GUI support is enabled. Run '${PN} --tray' for the system tray applet."
if use python; then
elog "Python support enabled. You can use the system tray applet:"
elog " gentoo-update --tray"
fi
}
if use notification; then
elog "Desktop notifications enabled."
fi
}

View File

@@ -1,76 +1,105 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Distributed under the terms of the GNU General Public License v3
EAPI=8
inherit cmake systemd
inherit cmake
DESCRIPTION="Update notifier and applier for Gentoo Linux"
DESCRIPTION="An update notifier & applier for Gentoo Linux that assists with pre/post update tasks"
HOMEPAGE="https://github.com/Techoraye/gentoo-update"
SRC_URI="https://github.com/Techoraye/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/Techoraye/gentoo-update/archive/v${PV}.tar.gz"
S="${WORKDIR}/${PN}-${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="gui"
IUSE="notification python systemd"
RDEPEND="
app-portage/gentoolkit
sys-apps/portage
gui? (
dev-python/PyQt6[gui,network]
x11-libs/libnotify
)
DEPEND="
>=dev-cpp/cpp-base:0
"
RDEPEND="${DEPEND}
notification? ( x11-libs/libnotify )
python? (
dev-python/pyqt6[gui,network]
)
app-portage/gentoolkit
sys-apps/portage[python]
systemd? ( sys-apps/systemd )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
-DENABLE_GUI=$(usex gui)
-DENABLE_SYSTEMD=$(usex systemd)
)
cmake_src_configure
}
src_install() {
cmake_src_install
insinto /etc/${PN}
newins res/config/${PN}.conf.example ${PN}.conf
newbashcomp res/completions/${PN}.bash ${PN}
# Install documentation
einstalldocs
# Install configuration example
insinto /etc/gentoo-update
newins res/config/gentoo-update.conf.example gentoo-update.conf
# Install shell completions
insinto /usr/share/bash-completion/completions
doins res/completions/gentoo-update.bash
insinto /usr/share/zsh/site-functions
newins res/completions/${PN}.zsh _${PN}
newins res/completions/gentoo-update.zsh _gentoo-update
insinto /usr/share/fish/vendor_completions.d
doins res/completions/${PN}.fish
if use gui; then
domenu res/desktop/${PN}.desktop
domenu res/desktop/${PN}-tray.desktop
doins res/completions/gentoo-update.fish
# Install desktop entry files
insinto /usr/share/applications
doins res/desktop/gentoo-update.desktop
doins res/desktop/gentoo-update-tray.desktop
# Install service files
if use systemd; then
insinto /etc/systemd/system
doins res/systemd/gentoo-update.service
doins res/systemd/gentoo-update.timer
doins res/systemd/gentoo-update-tray.service
else
insinto /etc/init.d
newins res/openrc/gentoo-update gentoo-update
fi
systemd_dounit res/systemd/${PN}.service
systemd_dounit res/systemd/${PN}.timer
use gui && systemd_dounit res/systemd/${PN}-tray.service
newinitd res/openrc/${PN} ${PN}
}
pkg_postinst() {
elog "Configuration: /etc/${PN}/${PN}.conf"
elog "Gentoo-Update has been installed successfully!"
elog ""
elog "Usage: gentoo-update [OPTIONS]"
elog ""
elog "For help: gentoo-update --help"
elog ""
elog "Configuration file: ~/.config/gentoo-update/gentoo-update.conf"
elog "Generate default config: gentoo-update --gen-config"
elog ""
if use gui; then
elog "Run '${PN} --tray' for the system tray applet"
if use python; then
elog "Python support enabled. You can use the system tray applet:"
elog " gentoo-update --tray"
fi
if systemd_is_booted; then
elog "Enable automatic updates:"
elog " systemctl enable --now ${PN}.timer"
if use notification; then
elog "Desktop notifications enabled."
fi
if use systemd; then
elog "Systemd support enabled. Enable auto-updates with:"
elog " systemctl enable --now gentoo-update.timer"
else
elog "Enable automatic updates:"
elog " rc-update add ${PN} default"
elog "For automatic updates with OpenRC, add gentoo-update to default runlevel:"
elog " rc-update add gentoo-update default"
fi
}
}