1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
2pkgname=midr
3pkgver=0.1.1
4pkgrel=0
5pkgdesc="yt-dlp simple frontend"
6url="https://git.sr.ht/~gabrielgio/midr"
7arch="x86_64"
8license="MIT"
9makedepends="
10 go
11"
12builddir="$srcdir/$pkgname-v$pkgver/"
13install="$pkgname.pre-install"
14subpackages="$pkgname-openrc"
15source="
16 ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/${pkgname}/${pkgname}-v${pkgver}.tar.gz
17 midr.initd
18 midr.confd
19"
20
21build() {
22 go mod vendor
23 go build \
24 -trimpath \
25 -mod=vendor \
26 -ldflags="-X 'main.Version=${pkgver}'" \
27 .
28}
29
30package() {
31
32 install -Dm755 "$pkgname" "$pkgdir"/usr/lib/"$pkgname"/"$pkgname"
33
34 mkdir -p "$pkgdir"/usr/bin
35 ln -s /usr/lib/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
36
37 install -m755 -D "$srcdir"/$pkgname.initd \
38 "$pkgdir"/etc/init.d/$pkgname
39 install -m644 -D "$srcdir"/$pkgname.confd \
40 "$pkgdir"/etc/conf.d/$pkgname
41}
42
43sha512sums="
44a114bfe718d95ad5157aa55870b6bceb61dfcea7e0cb5d76b2ecd3b29a266d1c1e8c1204a4020da798a8bd24210b3eccdf1779311b524897458be511652692ba midr-0.1.1.tar.gz
4528927837fb4183509054830bf93342c09123b8589ad1d66272c9e3decef3f83e1cb2d1f30a0a8147edf5628b8834447f87aa7001f76a71e826f16836f72a3436 midr.initd
466329a88c5d88fdc1f8c2b3f009d988dc03d6a3c2bb7e2e9eebaf0002625d74a13c824fd90ff67dcb9cba2fb15008b92e68d57d6f3a5a2c5331d13d5f5b11ff72 midr.confd
47"