aur/leech/PKGBUILD
2024-04-27 13:40:41 +02:00

42 lines
1.1 KiB
Bash

# Maintainer: Louis Dalibard <ontake@ontake.dev>
_pkgbase="leech"
pkgname="$_pkgbase-git"
pkgver=r4.gcc19a48
pkgrel=1
pkgdesc="A simple HTTP(S) file hosting server."
arch=("x86_64" "armv7h" "aarch64")
url="https://git.ontake.dev/go/leech"
license=('GPL3')
groups=()
depends=()
makedepends=('go>=1.18')
optdepends=()
provides=("$_pkgbase")
conflicts=("$_pkgbase")
replaces=()
backup=()
options=()
install=
changelog=
source=("git+https://git.ontake.dev/go/leech")
noextract=()
md5sums=("SKIP") #autofill using updpkgsums
pkgver() {
cd ${srcdir}/${_pkgbase}
echo "r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}
build() {
cd "${srcdir}/${_pkgbase}"
go mod tidy
go build
}
package() {
install -Dm755 "${srcdir}/${_pkgbase}/${_pkgbase}" "${pkgdir}"/usr/bin/${_pkgbase}
install -Dm644 "${srcdir}/${_pkgbase}/pkg/config.json" "${pkgdir}"/etc/leech/config.json
install -Dm644 "${srcdir}/${_pkgbase}/pkg/leech.service" "${pkgdir}"/usr/lib/systemd/system/leech.service
install -Dm644 "${srcdir}/${_pkgbase}/pkg/sysusers.conf" "${pkgdir}"/usr/lib/sysusers.d/${_pkgbase}.conf
}