diff options
author | Dimitri Pertin | 2020-04-04 17:27:16 +0200 |
---|---|---|
committer | Dimitri Pertin | 2020-04-04 18:04:48 +0200 |
commit | 32114dbbb712d6a197e1f4571394789b691307f6 (patch) | |
tree | 21aa54419f3c933e2e254f69d1390da94bd3bd0e | |
download | aur-32114dbbb712d6a197e1f4571394789b691307f6.tar.gz |
Initial commit
Add the required files to generate the gonic Archlinux package:
- `.SRCINFO`: contains information displayed on AUR;
- `PKGBUILD`: contains information required to generate the package;
- `gonic.service`: is a systemd unit definition for `gonic` in which are
defined several environment variables used as `gonic` settings;
- `gonic.sysusers`: contains instructions to create gonic group and user.
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | gonic.service | 22 | ||||
-rw-r--r-- | gonic.sysusers | 1 |
5 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f1e88a619c59 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = gonic + pkgdesc = A lightweight music streaming server which implements the Subsonic API + pkgver = 0.8.4 + pkgrel = 1 + url = https://github.com/sentriz/gonic + arch = x86_64 + license = GPL3 + makedepends = go + depends = gcc-libs + depends = sqlite + depends = taglib + optdepends = ffmpeg: on-the-fly audio transcoding and caching + backup = usr/lib/systemd/system/gonic.service + source = gonic-0.8.4.tar.gz::https://github.com/sentriz/gonic/archive/v0.8.4.tar.gz + source = gonic.service + source = gonic.sysusers + md5sums = 101f627184c59a01162ccd02a7628e90 + md5sums = 4b9fae63f961fe8dc230a1e415e50d67 + md5sums = 6ca6715be2cdd424846f7b37b98905f6 + +pkgname = gonic + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d0a9f5d37dd2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Dimitri Pertin <pertin (dot) dimitri (at) protonmail (dot) com> +pkgname=gonic +pkgver=0.8.4 +pkgrel=1 +pkgdesc='A lightweight music streaming server which implements the Subsonic API' +arch=('x86_64') +depends=('gcc-libs' 'sqlite' 'taglib') +makedepends=('go') +optdepends=('ffmpeg: on-the-fly audio transcoding and caching') +url='https://github.com/sentriz/gonic' +license=('GPL3') +backup=("usr/lib/systemd/system/$pkgname.service") +source=("$pkgname-$pkgver.tar.gz::https://github.com/sentriz/gonic/archive/v$pkgver.tar.gz" + "$pkgname.service" + "$pkgname.sysusers") +md5sums=('101f627184c59a01162ccd02a7628e90' + '4b9fae63f961fe8dc230a1e415e50d67' + '6ca6715be2cdd424846f7b37b98905f6') + + +build() { + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-trimpath" + cd "$srcdir/$pkgname-$pkgver" + ./_do_build_server + ./_do_build_scanner +} + +package() { + install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" + install -Dm644 "$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + + cd "$srcdir/$pkgname-$pkgver" + install -Dm755 ${pkgname} "$pkgdir/usr/bin/${pkgname}" + install -Dm755 ${pkgname}scan "$pkgdir/usr/bin/${pkgname}scan" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" +} + diff --git a/README.md b/README.md new file mode 100644 index 000000000000..8327f138e08d --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ + +# AUR Gonic PKGBUILD + +This repo contains the required files to generate an Archlinux package of +[gonic](https://github.com/sentriz/gonic), +a lightweight music streaming server written in Go, which implements the +[Subsonic API](http://www.subsonic.org/pages/api.jsp). + diff --git a/gonic.service b/gonic.service new file mode 100644 index 000000000000..7ff873ee5243 --- /dev/null +++ b/gonic.service @@ -0,0 +1,22 @@ +[Unit] +Description=Gonic: Subsonic server API implementation +Wants=network-online.target +After=network-online.target + +[Service] +User=gonic +Group=gonic + +Type=simple +ExecStart=/usr/bin/gonic + +Environment=GONIC_MUSIC_PATH=/home/ +Environment=GONIC_DB_PATH=/var/lib/gonic/gonic.db #optional +#Environment=GONIC_CACHE_PATH=/tmp/gonic_cache #optional +#Environment=GONIC_LISTEN_ADDR=0.0.0.0:4747 #optional +#Environment=GONIC_PROXY_PREFIX= #optional +#Environment=GONIC_SCAN_INTERVAL= #optional + +[Install] +WantedBy=multi-user.target + diff --git a/gonic.sysusers b/gonic.sysusers new file mode 100644 index 000000000000..9295237916c8 --- /dev/null +++ b/gonic.sysusers @@ -0,0 +1 @@ +u gonic - "gonic daemon user" / /usr/bin/nologin |