summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Gysin2015-02-19 08:52:52 +0200
committerChristoph Gysin2015-06-14 12:19:14 +0300
commit540086d007e785dc3c0ce389c9877056cdebc644 (patch)
treebfc95aaccc52dc8716313005bd8d9afbf8002654
downloadaur-540086d007e785dc3c0ce389c9877056cdebc644.tar.gz
initial commit
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD64
-rw-r--r--groovebasin3
-rw-r--r--groovebasin-1.5.0-nodejs-0.12.patch11
-rw-r--r--groovebasin.install11
-rw-r--r--groovebasin.json16
-rw-r--r--groovebasin.service11
8 files changed, 144 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f534a9a798c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = nodejs-groovebasin
+ pkgdesc = Music player server with a web-based user interface inspired by Amarok 1.4
+ pkgver = 1.5.1
+ pkgrel = 1
+ url = http://groovebasin.com/
+ install = groovebasin.install
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = python2
+ makedepends = npm
+ depends = nodejs
+ depends = libgroove
+ backup = etc/groovebasin.json
+ source = https://github.com/andrewrk/groovebasin/archive/1.5.1.tar.gz
+ source = groovebasin
+ source = groovebasin.json
+ source = groovebasin.service
+ sha256sums = 6414302c6c6109ccec5626780c6187511325d85c5ccf95e93adc52fa72769905
+ sha256sums = 5169f64bbe305959d6c2c76f73b10c3a604586cb884c78e9b620e476f45132df
+ sha256sums = d4e6f06b601b16304199f61bce662ccc8e34842ddb0f8f688eae6e0be150e8df
+ sha256sums = fca2b5d94cef9e5b70936bdb47c4a69724050d657fe72f471f989dce933a1caa
+
+pkgname = nodejs-groovebasin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..d725ba4cf0d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.tar.*
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..18aa7938334
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Christoph Gysin <christoph.gysin@gmail.com>
+# Contributor: Jeremy "Ichimonji10" Audet <ichimonji10 at gmail dot com>
+# Contributor: Andrew Kelley <superjoe30@gmail.com>
+# Contributor: superjoe <superjoe30@gmail.com>
+#
+# makepkg warns "Package contains reference to $pkgdir". This is OK. See:
+# https://github.com/andrewrk/groovebasin/issues/214
+
+pkgname=nodejs-groovebasin
+_pkgname="${pkgname#nodejs-}"
+pkgver=1.5.1
+pkgrel=1
+pkgdesc='Music player server with a web-based user interface inspired by Amarok 1.4'
+arch=('i686' 'x86_64')
+url='http://groovebasin.com/'
+license=(MIT)
+depends=(nodejs libgroove)
+makedepends=(python2 npm)
+backup='etc/groovebasin.json'
+install=groovebasin.install
+source=("https://github.com/andrewrk/groovebasin/archive/${pkgver}.tar.gz"
+ groovebasin
+ groovebasin.json
+ groovebasin.service)
+sha256sums=('6414302c6c6109ccec5626780c6187511325d85c5ccf95e93adc52fa72769905'
+ '5169f64bbe305959d6c2c76f73b10c3a604586cb884c78e9b620e476f45132df'
+ 'd4e6f06b601b16304199f61bce662ccc8e34842ddb0f8f688eae6e0be150e8df'
+ 'fca2b5d94cef9e5b70936bdb47c4a69724050d657fe72f471f989dce933a1caa')
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ npm \
+ --python=python2 \
+ run build
+}
+
+package() {
+ npm \
+ --python=python2 \
+ install \
+ --user root \
+ --global \
+ --prefix "${pkgdir}/usr" \
+ "${srcdir}/${_pkgname}-${pkgver}"
+
+ install -Dm755 "${srcdir}/groovebasin" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}-${pkgver}/LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -d -g 49 -o 49 "${pkgdir}/var/lib/${_pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}.json" "${pkgdir}/etc/${_pkgname}.json"
+ ln -sf "/etc/${_pkgname}.json" "${pkgdir}/var/lib/${_pkgname}/config.json"
+
+ install -d -g 49 -o 49 "${pkgdir}"/var/lib/groovebasin/certs
+ ln -sf /usr/lib/node_modules/groovebasin/certs/self-signed-key.pem \
+ "${pkgdir}"/var/lib/groovebasin/certs
+ ln -sf /usr/lib/node_modules/groovebasin/certs/self-signed-cert.pem \
+ "${pkgdir}"/var/lib/groovebasin/certs
+
+ install -Dm644 "${srcdir}"/groovebasin.service \
+ "${pkgdir}"/usr/lib/systemd/system/groovebasin.service
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/groovebasin b/groovebasin
new file mode 100644
index 00000000000..e2f424b64c7
--- /dev/null
+++ b/groovebasin
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+exec /usr/bin/node /usr/lib/node_modules/groovebasin/lib/server.js "$@"
diff --git a/groovebasin-1.5.0-nodejs-0.12.patch b/groovebasin-1.5.0-nodejs-0.12.patch
new file mode 100644
index 00000000000..54cb7911b85
--- /dev/null
+++ b/groovebasin-1.5.0-nodejs-0.12.patch
@@ -0,0 +1,11 @@
+--- groovebasin-1.5.0/package.json 2015-02-19 08:54:20.585145205 +0200
++++ groovebasin-1.5.0/package.json 2015-02-19 08:54:30.928478224 +0200
+@@ -27,7 +27,7 @@
+ "express": "~4.10.6",
+ "findit2": "~2.2.3",
+ "googleapis": "~1.0.21",
+- "groove": "~2.2.7",
++ "groove": "~2.3.1",
+ "httpolyglot": "~0.1.0",
+ "keese": "~1.1.1",
+ "lastfm": "~0.9.2",
diff --git a/groovebasin.install b/groovebasin.install
new file mode 100644
index 00000000000..3ac9f3ef45c
--- /dev/null
+++ b/groovebasin.install
@@ -0,0 +1,11 @@
+post_install() {
+ getent group groovebasin &>/dev/null || groupadd -r -g 49 groovebasin >/dev/null
+ getent passwd groovebasin &>/dev/null || useradd -r -u 49 -g groovebasin -d /var/lib/groovebasin -s /bin/false -G audio groovebasin >/dev/null
+ usr/bin/systemd-tmpfiles --create groovebasin.conf || true
+}
+
+post_remove() {
+ getent passwd groovebasin &>/dev/null && userdel groovebasin >/dev/null
+ getent group groovebasin &>/dev/null && groupdel groovebasin >/dev/null
+ true
+}
diff --git a/groovebasin.json b/groovebasin.json
new file mode 100644
index 00000000000..d19e33f3fd9
--- /dev/null
+++ b/groovebasin.json
@@ -0,0 +1,16 @@
+{
+ "host": "127.0.0.1",
+ "port": 16242,
+ "dbPath": "groovebasin.db",
+ "musicDirectory": "/var/lib/groovebasin/music",
+ "lastFmApiKey": "bb9b81026cd44fd086fa5533420ac9b4",
+ "lastFmApiSecret": "2309a40ae3e271de966bf320498a8f09",
+ "mpdHost": "127.0.0.1",
+ "mpdPort": 6600,
+ "acoustidAppKey": "bgFvC4vW",
+ "encodeQueueDuration": 8,
+ "sslKey": "certs/self-signed-key.pem",
+ "sslCert": "certs/self-signed-cert.pem",
+ "sslCaDir": null,
+ "googleApiKey": "AIzaSyDdTDD8-gu_kp7dXtT-53xKcVbrboNAkpM"
+}
diff --git a/groovebasin.service b/groovebasin.service
new file mode 100644
index 00000000000..8d4f4245505
--- /dev/null
+++ b/groovebasin.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=groovebasin music player
+Documentation=http://groovebasin.com/
+
+[Service]
+User=groovebasin
+ExecStart=/usr/bin/groovebasin
+WorkingDirectory=/var/lib/groovebasin
+
+[Install]
+WantedBy=multi-user.target