commit:     6a60579119666fe09b58f41fd9e778d330007eef
Author:     Mathieu Roberge <robergem2008 <AT> gmail <DOT> com>
AuthorDate: Thu Dec 25 04:45:55 2025 +0000
Commit:     Mathieu Roberge <contact.techoraye <AT> gmail <DOT> com>
CommitDate: Thu Dec 25 04:47:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6a605791

Fix ebuilds: follow Gentoo conventions

- Use GPL-2 license header (Gentoo standard)
- Add proper SRC_URI with distfile naming
- Remove non-existent cpp-base dependency
- Consolidate to single 'gui' USE flag
- Use proper systemd and bash-completion eclasses
- Fix desktop file installation with domenu
- Use newinitd for OpenRC service
- Support both init systems without USE flag
- Fix config path inconsistency
- Simplify pkg_postinst messages

Signed-off-by: Mathieu Roberge <robergem2008 <AT> gmail.com>

 app-misc/gentoo-update/Manifest                 |   1 -
 app-misc/gentoo-update/gentoo-update-0.1.ebuild |  98 ++++++++-------------
 app-misc/gentoo-update/gentoo-update-0.2.ebuild | 111 +++++++++---------------
 3 files changed, 77 insertions(+), 133 deletions(-)

diff --git a/app-misc/gentoo-update/Manifest b/app-misc/gentoo-update/Manifest
deleted file mode 100644
index 42aa6bb331..0000000000
--- a/app-misc/gentoo-update/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST gentoo-update-0.1.tar.gz 26624 SHA256 
d665fb460f8d9c3209a5224dd88d0dacca44f51c97f89395dbab2a886a6e3174

diff --git a/app-misc/gentoo-update/gentoo-update-0.1.ebuild 
b/app-misc/gentoo-update/gentoo-update-0.1.ebuild
index e94c07bb8b..a31234bab6 100644
--- a/app-misc/gentoo-update/gentoo-update-0.1.ebuild
+++ b/app-misc/gentoo-update/gentoo-update-0.1.ebuild
@@ -1,33 +1,28 @@
 # Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v3
+# Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit cmake
+inherit cmake systemd
 
-DESCRIPTION="An update notifier & applier for Gentoo Linux that assists with 
pre/post update tasks"
+DESCRIPTION="Update notifier and applier for Gentoo Linux"
 HOMEPAGE="https://github.com/Techoraye/gentoo-update";
-SRC_URI="https://github.com/Techoraye/gentoo-update/archive/v${PV}.tar.gz";
-
-S="${WORKDIR}/${PN}-${PV}"
+SRC_URI="https://github.com/Techoraye/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="notification python"
-
-DEPEND="
-       >=dev-cpp/cpp-base:0
-"
+IUSE="gui"
 
-RDEPEND="${DEPEND}
-       notification? ( x11-libs/libnotify )
-       python? ( 
-               dev-python/pyqt6[gui]
-       )
+RDEPEND="
        app-portage/gentoolkit
-       sys-apps/portage[python]
+       sys-apps/portage
+       gui? (
+               dev-python/PyQt6[gui]
+               x11-libs/libnotify
+       )
 "
+DEPEND="${RDEPEND}"
 
 src_configure() {
        local mycmakeargs=(
@@ -38,57 +33,36 @@ src_configure() {
 
 src_install() {
        cmake_src_install
-       
-       # 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 /etc/${PN}
+       newins res/config/${PN}.conf.example ${PN}.conf
+
+       newbashcomp res/completions/${PN}.bash ${PN}
        
        insinto /usr/share/zsh/site-functions
-       newins res/completions/gentoo-update.zsh _gentoo-update
+       newins res/completions/${PN}.zsh _${PN}
        
        insinto /usr/share/fish/vendor_completions.d
-       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
+       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}
 }
 
 pkg_postinst() {
-       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 ""
+       elog "Configuration file: /etc/${PN}/${PN}.conf"
+       elog "See 'man ${PN}' or ${PN} --help for usage information"
        
-       if use python; then
-               elog "Python support enabled. You can use the system tray 
applet:"
-               elog "  gentoo-update --tray"
+       if use gui; then
+               elog ""
+               elog "GUI support is enabled. Run '${PN} --tray' for the system 
tray applet."
        fi
-       
-       if use notification; then
-               elog "Desktop notifications enabled."
-       fi
-}
+}
\ No newline at end of file

diff --git a/app-misc/gentoo-update/gentoo-update-0.2.ebuild 
b/app-misc/gentoo-update/gentoo-update-0.2.ebuild
index 574fff5191..b2bc2db266 100644
--- a/app-misc/gentoo-update/gentoo-update-0.2.ebuild
+++ b/app-misc/gentoo-update/gentoo-update-0.2.ebuild
@@ -1,105 +1,76 @@
 # Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v3
+# Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit cmake
+inherit cmake systemd
 
-DESCRIPTION="An update notifier & applier for Gentoo Linux that assists with 
pre/post update tasks"
+DESCRIPTION="Update notifier and applier for Gentoo Linux"
 HOMEPAGE="https://github.com/Techoraye/gentoo-update";
-SRC_URI="https://github.com/Techoraye/gentoo-update/archive/v${PV}.tar.gz";
-
-S="${WORKDIR}/${PN}-${PV}"
+SRC_URI="https://github.com/Techoraye/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="notification python systemd"
-
-DEPEND="
-       >=dev-cpp/cpp-base:0
-"
+IUSE="gui"
 
-RDEPEND="${DEPEND}
-       notification? ( x11-libs/libnotify )
-       python? ( 
-               dev-python/pyqt6[gui,network]
-       )
+RDEPEND="
        app-portage/gentoolkit
-       sys-apps/portage[python]
-       systemd? ( sys-apps/systemd )
+       sys-apps/portage
+       gui? (
+               dev-python/PyQt6[gui,network]
+               x11-libs/libnotify
+       )
 "
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 src_configure() {
        local mycmakeargs=(
                -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
-               -DENABLE_SYSTEMD=$(usex systemd)
+               -DENABLE_GUI=$(usex gui)
        )
        cmake_src_configure
 }
 
 src_install() {
        cmake_src_install
-       
-       # 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 /etc/${PN}
+       newins res/config/${PN}.conf.example ${PN}.conf
+
+       newbashcomp res/completions/${PN}.bash ${PN}
        
        insinto /usr/share/zsh/site-functions
-       newins res/completions/gentoo-update.zsh _gentoo-update
+       newins res/completions/${PN}.zsh _${PN}
        
        insinto /usr/share/fish/vendor_completions.d
-       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
+       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}
 }
 
 pkg_postinst() {
-       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 ""
+       elog "Configuration: /etc/${PN}/${PN}.conf"
        
-       if use python; then
-               elog "Python support enabled. You can use the system tray 
applet:"
-               elog "  gentoo-update --tray"
+       if use gui; then
+               elog "Run '${PN} --tray' for the system tray applet"
        fi
-       
-       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"
+
+       if systemd_is_booted; then
+               elog "Enable automatic updates:"
+               elog "  systemctl enable --now ${PN}.timer"
        else
-               elog "For automatic updates with OpenRC, add gentoo-update to 
default runlevel:"
-               elog "  rc-update add gentoo-update default"
+               elog "Enable automatic updates:"
+               elog "  rc-update add ${PN} default"
        fi
-}
+}
\ No newline at end of file

Reply via email to