cppmm-overlay/www-apps/inpxer/inpxer-0.2.5.ebuild

57 lines
1.1 KiB
Bash
Raw Normal View History

2024-09-16 03:02:03 +03:00
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="OPDS and web server for .inpx libraries with full-text search"
HOMEPAGE="https://github.com/shemanaev/inpxer"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/shemanaev/inpxer.git"
else
SRC_URI="
https://github.com/shemanaev/inpxer/archive/v${PV}.tar.gz -> ${P}.tar.gz
"
KEYWORDS="~amd64"
fi
# main pkg
LICENSE="MIT"
SLOT="0"
PATCHES=(
"${FILESDIR}"/01-config-placement-0.2.5.patch
)
src_unpack() {
2024-09-16 03:22:08 +03:00
git-r3_src_unpack
go-module_live_vendor
2024-09-16 03:02:03 +03:00
}
src_prepare() {
[[ ${PV} != 9999* ]] && { ln -sv ../vendor ./ || die ; }
default
}
src_compile() {
2024-09-16 03:09:00 +03:00
go build . || die
2024-09-16 03:02:03 +03:00
./"${PN}" --help > "${PN}".1 || die
}
src_test() {
emake test-flags= test
}
src_install() {
dosbin "${PN}"
cp "${FILESDIR}"/inpxer-example.toml "${ED}"/etc/inpxer/inpxer.toml || die
doman "${PN}".1
newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
insinto /etc/logrotate.d
newins "${FILESDIR}"/${PN}.logrotate "${PN}"
keepdir /var/log/${PN}
}