diff options
author | Bryn Edwards | 2019-04-08 16:59:53 +0100 |
---|---|---|
committer | Bryn Edwards | 2019-04-08 16:59:53 +0100 |
commit | 2baad8a76417de63c18fa66c18180937eb386469 (patch) | |
tree | 6b130f04ac335f9166d65db2c66d7e5bd6847c1b | |
parent | 6dcfb4ba10f927fd77fafbf3159bafed0206a179 (diff) | |
download | aur-2baad8a76417de63c18fa66c18180937eb386469.tar.gz |
Add some configuration defaults
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | supysonic.ini | 64 | ||||
-rw-r--r-- | supysonic.sysusers | 1 | ||||
-rw-r--r-- | supysonic.tmpfiles | 1 |
5 files changed, 109 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = supysonic-git pkgdesc = A Python implementation of the Subsonic server API. - pkgver = 0.3.488.g5367f06 - pkgrel = 1 + pkgver = 0.3.495.g92fed40 + pkgrel = 2 url = https://github.com/spl0k/supysonic arch = any license = AGPL @@ -15,8 +15,16 @@ pkgbase = supysonic-git depends = python-mutagen depends = python-zipstream optdepends = python-watchdog: Watch for library changes using supysonic-watcher + optdepends = ffmpeg: transcoder support + backup = etc/supysonic source = supysonic::git+https://github.com/spl0k/supysonic + source = supysonic.ini + source = supysonic.sysusers + source = supysonic.tmpfiles sha256sums = SKIP + sha256sums = 8f52e93cd4f13e2e555b5ac4e456020b4395bf311b0226d9d50b13444721872d + sha256sums = b4b723d30fb45f86a15ec218910cd3935aac4546d5e2f9a1e1bc79cccfb98480 + sha256sums = 430eba10de5381a425074b89d0a46fb770be5112b26e81ac6a2b55765675cb13 pkgname = supysonic-git @@ -1,11 +1,11 @@ # Maintainer: Bryn Edwards <bryn.edwards@gmail.com> pkgname=supysonic-git _pkgname=supysonic -pkgver=0.3.488.g5367f06 -pkgrel=1 +pkgver=0.3.495.g92fed40 +pkgrel=2 pkgdesc="A Python implementation of the Subsonic server API." arch=('any') -url="https://github.com/spl0k/supysonic" +url="https://github.com/spl0k/$_pkgname" license=('AGPL') depends=( 'python-flask' @@ -20,13 +20,27 @@ makedepends=( 'python-setuptools' 'python-pip' ) -optdepends=('python-watchdog: Watch for library changes using supysonic-watcher') -source=("${_pkgname}::git+https://github.com/spl0k/supysonic") -sha256sums=('SKIP') +optdepends=('python-watchdog: Watch for library changes using supysonic-watcher' + 'ffmpeg: transcoder support') +source=("${_pkgname}::git+https://github.com/spl0k/$_pkgname" + "$_pkgname.ini" + "$_pkgname.sysusers" + "$_pkgname.tmpfiles") +sha256sums=('SKIP' + '8f52e93cd4f13e2e555b5ac4e456020b4395bf311b0226d9d50b13444721872d' + 'b4b723d30fb45f86a15ec218910cd3935aac4546d5e2f9a1e1bc79cccfb98480' + '430eba10de5381a425074b89d0a46fb770be5112b26e81ac6a2b55765675cb13') +backup=("etc/$_pkgname") pkgver() { cd $_pkgname - echo "$(grep '^VERSION =' supysonic/__init__.py|head -n1|cut -d\' -f2).$(git rev-list --count HEAD).g$(git describe --always)" + echo "$(grep '^VERSION =' $_pkgname/__init__.py|head -n1|cut -d\' -f2).$(git rev-list --count HEAD).g$(git describe --always)" +} + +prepare() { + cd $_pkgname + cp cgi-bin/server.py $_pkgname + cp "cgi-bin/$_pkgname.wsgi" $_pkgname/wsgi.py } build() { @@ -37,4 +51,16 @@ build() { package() { cd $_pkgname python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + + install -Dm664 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" + install -Dm664 README.md "$pkgdir/usr/share/doc/$_pkgname/README.md" + install -m664 -t "$pkgdir/usr/share/doc/$_pkgname" docs/* + install -dm644 "$pkgdir/var/lib/$_pkgname" + + cd $srcdir + install -Dm664 "$_pkgname.ini" "$pkgdir/etc/$_pkgname" + install -Dm664 "$srcdir/$_pkgname.sysusers" \ + "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf" + install -Dm664 "$srcdir/$_pkgname.tmpfiles" \ + "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf" } diff --git a/supysonic.ini b/supysonic.ini new file mode 100644 index 000000000000..fb59d0117207 --- /dev/null +++ b/supysonic.ini @@ -0,0 +1,64 @@ +[base]
+; A database URI. See the 'schema' folder for schema creation scripts
+; Default: sqlite:////tmp/supysonic/supysonic.db
+database_uri = sqlite:////var/lib/supysonic/supysonic.db
+;database_uri = mysql://supysonic:supysonic@localhost/supysonic
+;database_uri = postgres://supysonic:supysonic@localhost/supysonic
+
+; Optional, restrict scanner to these extensions. Default: none
+;scanner_extensions = mp3 ogg
+
+[webapp]
+; Optional cache directory. Default: /tmp/supysonic
+cache_dir = /var/lib/supysonic/cache
+
+; Main cache max size in MB. Default: 512
+cache_size = 512
+
+; Transcode cache max size in MB. Default: 1024 (1GB)
+transcode_cache_size = 1024
+
+; Optional rotating log file. Default: none
+;log_file = /var/supysonic/supysonic.log
+
+; Log level. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL. Default: WARNING
+log_level = WARNING
+
+; Enable the Subsonic REST API. You'll most likely want to keep this on, here for testing purposes. Default: on
+;mount_api = on
+
+; Enable the administrative web interface. Default: on
+;mount_webui = on
+
+[daemon]
+; Delay before triggering scanning operation after a change have been detected
+; This prevents running too many scans when multiple changes are detected for a
+; single file over a short time span. Default: 5
+wait_delay = 5
+
+; Optional rotating log file for the scanner daemon. Logs to stderr if empty
+;log_file = /var/supysonic/supysonic-daemon.log
+log_level = INFO
+
+[lastfm]
+; API and secret key to enable scrobbling. http://www.last.fm/api/accounts
+; Defaults: none
+;api_key =
+;secret =
+
+[transcoding]
+; Programs used to convert from one format/bitrate to another. Defaults: none
+;transcoder_mp3_mp3 = lame --quiet --mp3input -b %outrate %srcpath -
+transcoder = ffmpeg -i %srcpath -ab %outratek -v 0 -f %outfmt -
+;decoder_mp3 = mpg123 --quiet -w - %srcpath
+;decoder_ogg = oggdec -o %srcpath
+;decoder_flac = flac -d -c -s %srcpath
+;encoder_mp3 = lame --quiet -b %outrate - -
+;encoder_ogg = oggenc2 -q -M %outrate -
+
+[mimetypes]
+; Extension to mimetype mappings in case your system has some trouble guessing
+; Default: none
+;mp3 = audio/mpeg
+;ogg = audio/vorbis
+
diff --git a/supysonic.sysusers b/supysonic.sysusers new file mode 100644 index 000000000000..56145ba3ba31 --- /dev/null +++ b/supysonic.sysusers @@ -0,0 +1 @@ +u supysonic - "Supysonic" /var/lib/supysonic/ diff --git a/supysonic.tmpfiles b/supysonic.tmpfiles new file mode 100644 index 000000000000..6837a8f710aa --- /dev/null +++ b/supysonic.tmpfiles @@ -0,0 +1 @@ +d /var/lib/supysonic 0750 supysonic supysonic |