Sonically/package/alpine/APKBUILD

40 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2023-03-19 03:20:36 +01:00
# Contributor: ITmodulo <hello@xmpp.itmodulo.eu>
# Maintainer: ITmodulo <hello@xmpp.itmodulo.eu>
pkgname="sonically"
reponame="Sonically"
organization="LinuxOnMobile"
githost="https://git.itmodulo.eu"
pkgver=0.4.1
pkgrel=0
pkgdesc="Subsonic API compatible streaming client made in GTK. It is suitable for desktop and mobile"
url="$githost/$organization/$reponame"
arch="x86_64 aarch64"
options="net !check" # for downloading Go modules, no checks available
license="GPL-3.0-or-later"
depends="portaudio opusfile libnotify glib gtk4.0 gobject-introspection"
makedepends="go portaudio-dev opusfile-dev libnotify-dev glib-dev gtk4.0-dev gobject-introspection-dev"
source="$reponame-$pkgver.tar.gz::$githost/$organization/$reponame/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
default_prepare()
mkdir -p "$builddir"
}
build() {
# GOARCH should be set automaticaly by OS
cd "$srcdir"/"$pkgname"
CGO_ENABLED="1" GOOS="linux" go build -tags netgo -o "$builddir"/"$pkgname"
}
package() {
# Place built executable in PATH
install -Dm755 "$builddir"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
# Copy .svg logo to system
install -Dm644 "$srcdir"/"$pkgname"/"$pkgname".svg "$pkgdir"/usr/share/pixmaps/"$pkgname".svg
# Copy .desktop file to to system
install -Dm755 "$srcdir"/"$pkgname"/"$pkgname".desktop "$pkgdir"/usr/share/applications/eu.itmodulo."$pkgname".desktop
}