aboutsummaryrefslogblamecommitdiffstats
path: root/community/gonic/APKBUILD
blob: 4694beba1a42bf1af48d4d051840f7debb95b24b (plain) (tree)
1
2
3
4
5
6
7
8


                                        
             


                                                    
          


                             
                                                               

































                                                                                                                                                         

                                                                                                                                                      
# Contributor: Alex McGrath <amk@amk.ie>
# Maintainer: Alex McGrath <amk@amk.ie>
pkgname=gonic
pkgver=0.12.3
pkgrel=0
pkgdesc="Subsonic compatible music streaming server"
url="https://github.com/sentriz/gonic"
arch="all"
license="GPL-3.0-or-later"
subpackages="$pkgname-openrc"
depends="ffmpeg sqlite"
makedepends="binutils-gold go alsa-lib-dev taglib-dev zlib-dev"
install="$pkgname.pre-install"
source="
	gonic.initd
	gonic.confd
	gonic-$pkgver.tar.gz::https://github.com/sentriz/gonic/archive/v$pkgver.tar.gz
	"
export GOPATH="$srcdir"
export GO111MODULES=on

build() {
	./_do_build_server
}

check() {
	go test ./...
}

package() {
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
	install -Dm755 "$builddir"/"$pkgname" \
		"$pkgdir"/usr/bin/"$pkgname"

}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}


sha512sums="9d571f9980b30c665e051cc0d43e71e7029c473049d0e078d84ff2c001a953b9eebc95b7d45f651d4180a37f29976cc775fa756da1661296d58eb46501901f33  gonic.initd
bce2f839f98e2b66010f14e52265a061644867109e43062672bdf3850de51ab8d7b61ea38d7f223de25cf91105ef441b0c1969afc812763702397ed60c0fba4f  gonic.confd
e12553f532be68c1a343503df0ab8e6923c316f8669afcb7e41aa600a706fbd13f89346e5fffe816c5dd878a07239fbb3c030008aa63055060d28f91dbe78211  gonic-0.12.3.tar.gz"