1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
2pkgname=midr
3pkgver=0.1.0
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 $pkgname.post-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
30check() {
31 # Replace with proper check command(s)
32 :
33}
34
35package() {
36
37 install -Dm755 "$pkgname" "$pkgdir"/usr/bin/"$pkgname"
38
39 install -m755 -D "$srcdir"/$pkgname.initd \
40 "$pkgdir"/etc/init.d/$pkgname
41 install -m644 -D "$srcdir"/$pkgname.confd \
42 "$pkgdir"/etc/conf.d/$pkgname
43}
44
45sha512sums="
464b170b6466bdc4da60cf6582ab43ffb55ea09ccef58490453377d07fe38996c0d1a4408c5c68d2f3ab75f607afce443fb86ae5d6c04f7a9be844bf870064c075 midr-0.1.0.tar.gz
47512331fd6b4c5621c14b8bf07a94b2318dc33fea245de1e66d6385e1dc4cbfde7cb0d53507b46c85a11defe65a936cca40ace80df76130c7af2ef5999899892c midr.initd
48f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7 midr.confd
49"