summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 918041cc4db13f3ede3c7271212b417f3c4c8fea (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
# Maintainer: Roshless <pkg@roshless.com>

pkgname=mumbledj
pkgrel=3
pkgver=3.2.0
pkgdesc='Mumble bot for playing audio'
url='https://git.roshless.me/~roshless/mumbledj'
arch=('x86_64' 'i686')
license=('MIT')
install=mumbledj.install
source=("https://git.roshless.me/roshless/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
	"mumbledj.service"
	"mumbledj.sysusers"
	"mumbledj.tmpfiles")

depends=('ffmpeg' 'youtube-dl')
optdepends=('aria2')
makedepends=('git' 'go')

build() {
	cd $pkgname-$pkgver
	export CGO_CPPFLAGS="${CPPFLAGS}"
	export CGO_CFLAGS="${CFLAGS}"
	export CGO_CXXFLAGS="${CXXFLAGS}"
	export CGO_LDFLAGS="${LDFLAGS}"
	export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
	go build -o $pkgname .
}

package() {
	install -Dm644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
	install -Dm644 $pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
	install -Dm644 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"

	cd $pkgname-$pkgver
	install -Dm755 $pkgname -t "$pkgdir/usr/bin/"
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

md5sums=('373fd5294e954fa855dd38b98b7c2b4c'
         '6584a036d03644704867a5b79b35e491'
         'f2f85bec016b1431be94af553fd57173'
         '60e800293a47a562623cb91166950984')