mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 19:13:13 -04:00
dev-util/shfmt: add shfmt v3.5.0 and v9999
This commits adds ebuilds for shfmt v3.5.0 and v9999 Signed-off-by: Randall T. Vasquez <ran.dall@icloud.com>
This commit is contained in:
2
dev-util/shfmt/Manifest
Normal file
2
dev-util/shfmt/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST shfmt-3.5.0-deps.tar.xz 3121980 BLAKE2B 411e7df230864d1692899b89c4b5e25f54582752a10bde30a8a5e1ae03da3b325353d9bab71b46795f3d285747fbbcc63dd367ecddc8055d5df45013c5f491ae SHA512 562fc2a58c0c115d132c9107c569f5139d7e1f817c91077b80151d0043601c328b083ce8261301689ce72deecabe3957bc11e4dc4388024234a2791c9f118743
|
||||
DIST shfmt-3.5.0.tar.gz 222314 BLAKE2B 733785dbeb4af946f316aae1c9bf917c0d70598e3b19b993f592d35bbce53ef8ab613935ebc5ecbfb11677b722e4ca12175b85e30be2467abed381d30b6c3159 SHA512 8a3225a39a415d4926e44f214e8de6d25fedf5a0fe6b09743cc43e1c849094a3d8a34f327d00bffaaf93e4552f7ea03b681d3bb97f59727ab36ac66bafb6d4e7
|
||||
14
dev-util/shfmt/metadata.xml
Normal file
14
dev-util/shfmt/metadata.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ran.dall@icloud.com</email>
|
||||
<name>Randall Vasquez</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
A shell parser, formatter, and interpreter with bash support; includes shfmt. Supports POSIX Shell, Bash, and mksh.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">mvdan/sh</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
56
dev-util/shfmt/shfmt-3.5.0.ebuild
Normal file
56
dev-util/shfmt/shfmt-3.5.0.ebuild
Normal file
@@ -0,0 +1,56 @@
|
||||
# Copyright 2020-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Shell script formatter"
|
||||
HOMEPAGE="https://github.com/mvdan/sh"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/mvdan/sh.git"
|
||||
RESTRICT="fetch mirror test"
|
||||
else
|
||||
inherit go-module
|
||||
SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://github.com/ran-dall/portage-deps/raw/master/${P}-deps.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
RESTRICT="mirror test"
|
||||
S="${WORKDIR}/${PN/fmt}-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="+man"
|
||||
|
||||
BDEPENDS="
|
||||
dev-lang/go
|
||||
man? ( app-text/scdoc )
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
pushd ${P}/cmd/shfmt || die "location change for module building failed"
|
||||
ego get
|
||||
popd || die "location reset from module building failed"
|
||||
else
|
||||
mv mvdan-sh-* || die "correct placement of directory failed"
|
||||
go-module_src_unpack
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
ego build -v -ldflags "-s -w" -o "${PN}" "./cmd/shfmt"
|
||||
if use man; then
|
||||
scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1 || die "conversation of man page failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
if use man; then
|
||||
doman shfmt.1
|
||||
fi
|
||||
}
|
||||
57
dev-util/shfmt/shfmt-9999.ebuild
Normal file
57
dev-util/shfmt/shfmt-9999.ebuild
Normal file
@@ -0,0 +1,57 @@
|
||||
# Copyright 2020-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module
|
||||
|
||||
DESCRIPTION="Shell script formatter"
|
||||
HOMEPAGE="https://github.com/mvdan/sh"
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/mvdan/sh.git"
|
||||
RESTRICT="fetch mirror test"
|
||||
else
|
||||
SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" ${P}-deps.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
RESTRICT="mirror test"
|
||||
S="${WORKDIR}/${PN/fmt}-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="+man"
|
||||
|
||||
BDEPENDS="
|
||||
dev-lang/go
|
||||
man? ( app-text/scdoc )
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
pushd ${P}/cmd/shfmt || die "location change for module building failed"
|
||||
ego get
|
||||
popd || die "location reset from module building failed"
|
||||
else
|
||||
mv mvdan-sh-* || die "correct placement of directory failed"
|
||||
go-module_src_unpack
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
ego build -v -ldflags "-s -w" -o "${PN}" "./cmd/shfmt"
|
||||
if use man; then
|
||||
scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1 || die "conversation of man page failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
if use man; then
|
||||
doman shfmt.1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user