Skip to content

Gentoo .ebuild

Hi there. As i use Gentoo and like things clean, i wrote a .ebuild for easier installation (That's the Gentoo version of a .pkgbuild).
You may add it to your project (or not) to make the installation cleaner for Gentoo users.

journalctlDesktopNotification-1.4.2.ebuild

# Copyright 2025 cozyGalago
# Distributed under the terms of the GNU General Public License v3

EAPI=8
DESCRIPTION="Journalctl desktop notifications"

S="${WORKDIR}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64"
RDEPEND="sys-apps/coreutils
	x11-libs/libnotify
	sys-apps/systemd"

inherit  git-r3 systemd desktop

EGIT_REPO_URI="https://gitlab.com/Zesko/journalctl-desktop-notification.git"
EGIT_TAG="v${PV}"

src_unpack() {
	git-r3_fetch ${EGIT_REPO_URI} ${REFS}
	git-r3_checkout ${EGIT_REPO_URI} "${WORKDIR}"/${P} || die
}

src_compile() {
	not
}

src_install() {
	cd "${WORKDIR}"/${P}

	dodoc -r screenshots/{1.png,2.png} "README.md" "CHANGELOG.md" || die "Installing documentation failed"

	insinto "/etc"
	newins "etc/journalctl-desktop-notification.conf" "journalctl-desktop-notification.conf" || die "Installing configuration failed"

	exeinto "/usr/bin"
	newexe "usr/bin/journalctl-desktop-notification" "journalctl-desktop-notification" || die "Installing executable failed"

	domenu "usr/share/applications/journalctl-desktop-notification.desktop"  || die "Installing .desktop failed"

	systemd_douserunit "${PN}.service" || die "Installing service failed"
}

Explanation

PN = ProgramName = journalctlDesktopNotification
PV = ProgramVersion = 1.4.2
EGIT: Checks out tag v${PV} from https://gitlab.com/Zesko/journalctl-desktop-notification.git

It assumes you are using my .service file. If not, remove the last line systemd_douserunit....

Usage

Installation

ROOT # eselect repository create zesko
ROOT # mkdir --parents /var/db/repos/zesko/app-admin/journalctlDesktopNotification
ROOT # cd /var/db/repos/zesko/app-admin/journalctlDesktopNotification
ROOT # wget https://gitlab.com/Zesko/journalctl-desktop-notification/-/raw/master/journalctlDesktopNotification-1.4.2.ebuild?ref_type=heads
ROOT # emerge -av app-admin/journalctlDesktopNotification::zesko

Updating

ROOT # cd /var/db/repos/zesko/app-admin/journalctlDesktopNotification
ROOT # wget -N https://gitlab.com/Zesko/journalctl-desktop-notification/-/raw/master/journalctlDesktopNotification-1.4.2.ebuild?ref_type=heads
ROOT # emerge -av app-admin/journalctlDesktopNotification::zesko

Removal

ROOT # emerge --deselect app-admin/journalctlDesktopNotification::zesko

Maintenance:

Whenever you release a new version, you need to rename this file to the new version number.
This uses git to clone your repo, so you need to continue to tag your releases with the version number (EGIT).