public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-alternatives/tar/
Date: Mon, 28 Nov 2022 14:31:40 +0000 (UTC)	[thread overview]
Message-ID: <1669645895.e518a7f2b3bc5c35d89541eff4a2baffa8407b0c.mgorny@gentoo> (raw)

commit:     e518a7f2b3bc5c35d89541eff4a2baffa8407b0c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 21:04:27 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 14:31:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e518a7f2

app-alternatives/tar: Add an ebuild for /bin/tar symlink

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-alternatives/tar/metadata.xml | 20 ++++++++++++++++++++
 app-alternatives/tar/tar-0.ebuild | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/app-alternatives/tar/metadata.xml b/app-alternatives/tar/metadata.xml
new file mode 100644
index 000000000000..3bf8c905056c
--- /dev/null
+++ b/app-alternatives/tar/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>base-system@gentoo.org</email>
+		<name>Gentoo Base System</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>mgorny@gentoo.org</email>
+		<name>Michał Górny</name>
+	</maintainer>
+	<use>
+		<flag name="gnu">
+			Symlink to GNU tar (<pkg>app-arch/tar</pkg>)
+		</flag>
+		<flag name="libarchive">
+			Symlink to bsdtar from <pkg>app-arch/libarchive</pkg>
+		</flag>
+	</use>
+</pkgmetadata>

diff --git a/app-alternatives/tar/tar-0.ebuild b/app-alternatives/tar/tar-0.ebuild
new file mode 100644
index 000000000000..dc594b0f8933
--- /dev/null
+++ b/app-alternatives/tar/tar-0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Tar symlink"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="CC0-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+gnu libarchive split-usr"
+REQUIRED_USE="^^ ( gnu libarchive )"
+
+RDEPEND="
+	gnu? ( >=app-arch/tar-1.34-r2 )
+	libarchive? ( app-arch/libarchive )
+	!<app-arch/tar-1.34-r2
+"
+
+src_install() {
+	local usr_prefix=
+	use split-usr && usr_prefix=../usr/bin/
+
+	if use gnu; then
+		dosym gtar /bin/tar
+		newman - tar.1 <<<".so gtar.1"
+	elif use libarchive; then
+		dosym "${usr_prefix}bsdtar" /bin/tar
+		newman - tar.1 <<<".so bsdtar.1"
+	else
+		die "Invalid USE flag combination (broken REQUIRED_USE?)"
+	fi
+}


             reply	other threads:[~2022-11-28 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 14:31 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-06 14:47 [gentoo-commits] repo/gentoo:master commit in: app-alternatives/tar/ Michał Górny
2022-12-27 11:31 Sam James
2022-12-27 13:40 Sam James
2022-12-27 13:40 Sam James
2022-12-27 19:45 Sam James
2022-12-27 19:53 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1669645895.e518a7f2b3bc5c35d89541eff4a2baffa8407b0c.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox