aboutsummaryrefslogtreecommitdiff
path: root/apks/midr/APKBUILD
blob: 0a9b29edbb315748b9d94e5c7e746c9e586b7b92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=midr
pkgver=0.1.1
pkgrel=3
pkgdesc="yt-dlp simple frontend"
url="https://git.sr.ht/~gabrielgio/midr"
arch="x86_64"
license="MIT"
depends="
    yt-dlp
    ffmpeg
"
makedepends="
    go
"
builddir="$srcdir/$pkgname-v$pkgver/"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="
    ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/archive/${pkgname}/${pkgname}-v${pkgver}.tar.gz
	midr.initd
	midr.confd
"

build() {
    go mod vendor
    go build \
        -trimpath \
        -mod=vendor \
        -ldflags="-X 'main.Version=${pkgver}'" \
        .
}

package() {
	install -Dm755 "$pkgname" "$pkgdir"/usr/lib/"$pkgname"/"$pkgname"

    mkdir -p "$pkgdir"/usr/bin
    ln -s /usr/lib/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"

    install -m755 -D "$srcdir"/$pkgname.initd \
        "$pkgdir"/etc/init.d/$pkgname
    install -m644 -D "$srcdir"/$pkgname.confd \
         "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="
87ac5501af123b9250c0ca8a7cea60a7c0e62a3dc2e38863118649562a106e6d849872f8a7f2c03014458f99981bc6325f54cb6761d9ec23f9d78451c7c6dc62  midr-0.1.1.tar.gz
b540b2a8210ef525226ca798f39866bebcd60e2c17296e4d256dc6e8e887f37f493835c4e9f25c5ef7e6cee3e903f91afdbf2abf8bcb903c1a485c89b1e85411  midr.initd
eaa355698e89b978c2158360802fa7ced7ead961187a0145af862fac09704b73d4e22e906a280c87e2280d2567dde0644382c5b226cb18d4165750a0a029d79f  midr.confd
"