commit:     e7872dae713ce46eb53019b5994294c00ef60f91
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  6 10:46:04 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 28 05:50:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7872dae

app-alternatives/gpg: New package, v0

An initial version of the package that controls "gpg" and "gpgv"
executable symlinks.  I have also moved the "gpg2" and "gpgv2"
compatibility symlinks here for consistency.  Manpages aren't altered
at the time, since only app-crypt/gnupg and app-crypt/freepg provide
them, and both block each other.

Closes: https://bugs.gentoo.org/963829
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/44224
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-alternatives/gpg/gpg-0.ebuild | 27 +++++++++++++++++++++++++++
 app-alternatives/gpg/metadata.xml | 17 +++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/app-alternatives/gpg/gpg-0.ebuild 
b/app-alternatives/gpg/gpg-0.ebuild
new file mode 100644
index 000000000000..8715c060be65
--- /dev/null
+++ b/app-alternatives/gpg/gpg-0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ALTERNATIVES=(
+       "reference:app-crypt/gnupg[alternatives(-)]"
+)
+
+inherit app-alternatives
+
+DESCRIPTION="gpg symlink"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv 
~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos 
~x64-solaris"
+
+RDEPEND="
+       !app-crypt/gnupg[-alternatives(-)]
+"
+
+src_install() {
+       local alt=$(get_alternative)
+
+       dodir /usr/bin
+       dosym "gpg-${alt}" /usr/bin/gpg
+       dosym "gpgv-${alt}" /usr/bin/gpgv
+       dosym gpg /usr/bin/gpg2
+       dosym gpgv /usr/bin/gpgv2
+}

diff --git a/app-alternatives/gpg/metadata.xml 
b/app-alternatives/gpg/metadata.xml
new file mode 100644
index 000000000000..eab5ebd80563
--- /dev/null
+++ b/app-alternatives/gpg/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Base System</name>
+       </maintainer>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Michał Górny</name>
+       </maintainer>
+       <use>
+               <flag name="reference">
+                       Symlink to <pkg>app-crypt/gnupg</pkg>.
+               </flag>
+       </use>
+</pkgmetadata>

Reply via email to