Clean up mangal package

This commit is contained in:
Sravan Balaji
2024-07-09 17:59:25 -04:00
parent 65b048c1f1
commit f842d94add

View File

@@ -4,56 +4,53 @@
# Adapted from https://github.com/leycec/raiagent/blob/master/app-misc/mangal/mangal-9999.ebuild # Adapted from https://github.com/leycec/raiagent/blob/master/app-misc/mangal/mangal-9999.ebuild
EAPI=8 EAPI=8
inherit git-r3 go-module
inherit go-module
DESCRIPTION="The most advanced (yet simple) CLI manga downloader" DESCRIPTION="The most advanced (yet simple) CLI manga downloader"
HOMEPAGE="https://github.com/metafates/mangal" HOMEPAGE="https://github.com/metafates/mangal"
EGIT_REPO_URI="${HOMEPAGE}.git"
EGIT_BRANCH="main"
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}"
S="${WORKDIR}/${P}"
LICENSE="MIT" LICENSE="MIT"
SLOT="0" SLOT="0"
KEYWORDS="~amd64" KEYWORDS="~amd64"
IUSE="bash fish zsh"
IUSE="bash fish zsh"
RDEPEND=" RDEPEND="
bash? ( app-shells/bash ) bash? ( app-shells/bash )
fish? ( app-shells/fish ) fish? ( app-shells/fish )
zsh? ( app-shells/zsh ) zsh? ( app-shells/zsh )
" "
if [[ ${PV} == 9999 ]]; then src_unpack() {
inherit git-r3 git-r3_src_unpack
go-module_src_unpack
EGIT_REPO_URI="https://github.com/metafates/mangal.git" }
EGIT_BRANCH="main"
SRC_URI=""
KEYWORDS=""
else
SRC_URI="https://github.com/metafates/mangal/archive/refs/tags/v${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
fi
src_compile() { src_compile() {
ego build -mod=vendor . ego build
# emake BUILD_FLAGS="-mod=vendor" build
} }
src_install() { src_install() {
if use zsh; then if use zsh; then
insinto "/usr/share/zsh/vendor-completions" insinto "/usr/share/zsh/vendor-completions"
cp zsh/mangal.zsh zsh/_mangal cp completions/mangal.zsh completions/_mangal
doins zsh/_mangal doins completions/_mangal
fi fi
if use fish; then if use fish; then
insinto "/usr/share/fish/completions" insinto "/usr/share/fish/completions"
doins fish/mangal.fish doins completions/mangal.fish
fi fi
if use bash; then if use bash; then
insinto "/usr/share/bash-completion/completions" insinto "/usr/share/bash-completion/completions"
cp bash/mangal.bash bash/mangal cp completions/mangal.bash completions/mangal
doins bash/mangal doins completions/mangal
fi fi
dobin ${PN} dobin ${PN}