From 603350e19846a5a710e1f976afb6038ff29dde11 Mon Sep 17 00:00:00 2001 From: Jared Allard Date: Mon, 21 Dec 2020 08:06:31 -0800 Subject: [PATCH] fix(chezmoi): add ebuild --- .../chezmoi-bin/chezmoi-bin-1.8.9.ebuild | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 app-admin/chezmoi-bin/chezmoi-bin-1.8.9.ebuild diff --git a/app-admin/chezmoi-bin/chezmoi-bin-1.8.9.ebuild b/app-admin/chezmoi-bin/chezmoi-bin-1.8.9.ebuild new file mode 100644 index 0000000..2f3fc71 --- /dev/null +++ b/app-admin/chezmoi-bin/chezmoi-bin-1.8.9.ebuild @@ -0,0 +1,50 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Manage your dotfiles across multiple machines, securely." +HOMEPAGE="https://github.com/twpayne/chezmoi" + +# Remove bin from the package name +BASE_PN="${PN/-bin}" +A_AMD64="${P}_amd64.tar.gz" +A_X86="${P}_x86.tar.gz" + +BASE_URI="${HOMEPAGE}/releases/download/v${PV}/${BASE_PN}_${PV}_linux" +SRC_URI="amd64? ( ${BASE_URI}_amd64.tar.gz -> ${A_AMD64} ) + x86? ( ${BASE_URI}_i386.tar.gz -> ${A_X86} )" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-vcs/git" +RDEPEND="${DEPEND}" +BDEPEND="" + +DOCS=( "docs" ) + +src_unpack() { + # Create the source directory + mkdir -p "${S}" || die + pushd "${S}" || die + + # Determine the correct source package + if use x86; then + ARCHIVE="${A_X86}" + elif use amd64; then + ARCHIVE="${A_AMD64}" + fi + + # Unpack the archive if a matching one was found + if [ "${ARCHIVE}" != "" ]; then + unpack ${ARCHIVE} + fi +} + +src_install() { + einstalldocs + dobin "${S}/${BASE_PN}" || die +} \ No newline at end of file