aboutsummaryrefslogtreecommitdiff
path: root/midr/APKBUILD
blob: a9b1b94bb4a8b6f0784f636ac0a18e641b44800c (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
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=midr
pkgver=0.1.0
pkgrel=0
pkgdesc="yt-dlp simple frontend"
url="https://git.sr.ht/~gabrielgio/midr"
arch="x86_64"
license="MIT"
makedepends="
    go
"
builddir="$srcdir/$pkgname-v$pkgver/"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-openrc"
source="
    ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/${pkgname}/${pkgname}-v${pkgver}.tar.gz
	midr.initd
	midr.confd
"

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

check() {
	# Replace with proper check command(s)
	:
}

package() {

	install -Dm755 "$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="
4b170b6466bdc4da60cf6582ab43ffb55ea09ccef58490453377d07fe38996c0d1a4408c5c68d2f3ab75f607afce443fb86ae5d6c04f7a9be844bf870064c075  midr-0.1.0.tar.gz
512331fd6b4c5621c14b8bf07a94b2318dc33fea245de1e66d6385e1dc4cbfde7cb0d53507b46c85a11defe65a936cca40ace80df76130c7af2ef5999899892c  midr.initd
f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7  midr.confd
"