diff options
author | Robert Sprunk | 2020-01-20 21:49:12 +0100 |
---|---|---|
committer | Robert Sprunk | 2020-01-20 21:49:12 +0100 |
commit | e1681d9384787d4df4c4ab244732eb1df1ce4c45 (patch) | |
tree | 0f7fb119ac023a5938e77121e1a678388c124f3d | |
download | aur-e1681d9384787d4df4c4ab244732eb1df1ce4c45.tar.gz |
supysonic release v0.5.0 with install instructions
-rw-r--r-- | .SRCINFO | 41 | ||||
-rw-r--r-- | PKGBUILD | 78 | ||||
-rw-r--r-- | apache-wsgi.conf | 9 | ||||
-rw-r--r-- | supysonic-daemon.service | 13 | ||||
-rw-r--r-- | supysonic.ini | 80 | ||||
-rw-r--r-- | supysonic.install | 6 | ||||
-rw-r--r-- | supysonic.sysusers | 1 | ||||
-rw-r--r-- | supysonic.tmpfiles | 1 |
8 files changed, 229 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6fd0360178bc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,41 @@ +pkgbase = supysonic + pkgdesc = A Python implementation of the Subsonic server API. + pkgver = 0.5.0 + pkgrel = 1 + url = https://github.com/spl0k/supysonic + install = supysonic.install + arch = any + license = AGPL + makedepends = git + makedepends = python-setuptools + makedepends = python-pip + depends = python-flask + depends = python-pony + depends = python-pillow + depends = python-requests + depends = python-mutagen + depends = python-watchdog + depends = python-zipstream + optdepends = ffmpeg: Transcoder support + optdepends = mpv: Jukebox support + optdepends = mariadb: MariaDB database + optdepends = python-mysqlclient: MySQL compatible database support + optdepends = mod_wsgi: Apache WSGI module + optdepends = postgresql: PostgreSQL database + optdepends = python-psycopg2: PostgreSQL database support + backup = etc/supysonic + source = supysonic-0.5.0.tar.gz::https://github.com/spl0k/supysonic/archive/0.5.0.tar.gz + source = supysonic.ini + source = supysonic.sysusers + source = supysonic.tmpfiles + source = supysonic-daemon.service + source = apache-wsgi.conf + sha256sums = 5bc10c8928228bc0534c66b9b620fe300b8ac18693b3ae110ae3271184f5ddfe + sha256sums = e8a10b2be1c3b6757cee8928f2e585351da9e9b6eadfa68c8905913108a26b80 + sha256sums = b4b723d30fb45f86a15ec218910cd3935aac4546d5e2f9a1e1bc79cccfb98480 + sha256sums = 430eba10de5381a425074b89d0a46fb770be5112b26e81ac6a2b55765675cb13 + sha256sums = a5222df6f6c15fafc7e20ccc97c365bbb29112a60d58c9a31129e581f482819b + sha256sums = 153b01e713b8520036d6d25b3e5cee36498772c0d696078324996570046a1a11 + +pkgname = supysonic + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..98f129f3d663 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: Robert Sprunk <arch-aur@sprunk.me> +# Contributor: Bryn Edwards <bryn.edwards@gmail.com> +pkgname=supysonic +pkgver=0.5.0 +pkgrel=1 +pkgdesc="A Python implementation of the Subsonic server API." +arch=('any') +url="https://github.com/spl0k/$pkgname" +license=('AGPL') +depends=( + 'python-flask' + 'python-pony' + 'python-pillow' + 'python-requests' + 'python-mutagen' + 'python-watchdog' + 'python-zipstream' +) +makedepends=( + 'git' + 'python-setuptools' + 'python-pip' +) +optdepends=('ffmpeg: Transcoder support' + 'mpv: Jukebox support' + 'mariadb: MariaDB database' + 'python-mysqlclient: MySQL compatible database support' + 'mod_wsgi: Apache WSGI module' + 'postgresql: PostgreSQL database' + 'python-psycopg2: PostgreSQL database support') +source=("$pkgname-$pkgver.tar.gz::https://github.com/spl0k/$pkgname/archive/$pkgver.tar.gz" + "$pkgname.ini" + "$pkgname.sysusers" + "$pkgname.tmpfiles" + "$pkgname-daemon.service" + "apache-wsgi.conf") +sha256sums=('5bc10c8928228bc0534c66b9b620fe300b8ac18693b3ae110ae3271184f5ddfe' + 'e8a10b2be1c3b6757cee8928f2e585351da9e9b6eadfa68c8905913108a26b80' + 'b4b723d30fb45f86a15ec218910cd3935aac4546d5e2f9a1e1bc79cccfb98480' + '430eba10de5381a425074b89d0a46fb770be5112b26e81ac6a2b55765675cb13' + 'a5222df6f6c15fafc7e20ccc97c365bbb29112a60d58c9a31129e581f482819b' + '153b01e713b8520036d6d25b3e5cee36498772c0d696078324996570046a1a11') +backup=("etc/$pkgname") +install=$pkgname.install + +prepare() { + cd $pkgname-$pkgver + cp cgi-bin/server.py $pkgname/server.py + cp "cgi-bin/$pkgname.wsgi" $pkgname/wsgi.py + cp "cgi-bin/$pkgname.fcgi" $pkgname/fcgi.py + cp "cgi-bin/$pkgname.cgi" $pkgname/cgi.py +} + +build() { + cd $pkgname-$pkgver + python setup.py build +} + +package() { + cd $pkgname-$pkgver + 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/*.md + # TODO generate man page from docs/man + install -dm644 "$pkgdir/var/lib/$pkgname" + + cd $srcdir + install -Dm664 "$pkgname.ini" "$pkgdir/etc/$pkgname" + install -Dm664 "apache-wsgi.conf" "$pkgdir/usr/share/doc/$pkgname/apache-wsgi.conf" + install -Dm664 "$srcdir/$pkgname.sysusers" \ + "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + install -Dm664 "$srcdir/$pkgname.tmpfiles" \ + "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" + install -Dm664 "$srcdir/$pkgname-daemon.service" \ + "$pkgdir/usr/lib/systemd/system/$pkgname-daemon.service" +} diff --git a/apache-wsgi.conf b/apache-wsgi.conf new file mode 100644 index 000000000000..9adc045aa4ae --- /dev/null +++ b/apache-wsgi.conf @@ -0,0 +1,9 @@ +WSGIDaemonProcess supysonic home=/var/lib/supysonic user=supysonic group=supysonic +WSGIProcessGroup supysonic +WSGIApplicationGroup %{GLOBAL} +WSGIScriptAlias /supysonic /usr/lib/python3.8/site-packages/supysonic/wsgi.py +<Directory /usr/lib/python3.8/site-packages/supysonic> + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + Require all granted +</Directory>
\ No newline at end of file diff --git a/supysonic-daemon.service b/supysonic-daemon.service new file mode 100644 index 000000000000..6b1ec151cf50 --- /dev/null +++ b/supysonic-daemon.service @@ -0,0 +1,13 @@ +[Unit] +Description=Supysonic Daemon +;After=mariadb.service +;After=postgresql.service + +[Service] +User=supysonic +Group=supysonic +WorkingDirectory=/var/lib/supysonic +ExecStart=/usr/bin/env python -m supysonic.daemon + +[Install] +WantedBy=multi-user.target diff --git a/supysonic.ini b/supysonic.ini new file mode 100644 index 000000000000..23a2fbbbb614 --- /dev/null +++ b/supysonic.ini @@ -0,0 +1,80 @@ +[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
+
+; Should the scanner follow symbolic links? Default: no
+follow_symlinks = no
+
+[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/lib/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]
+; Socket file the daemon will listen on for incoming management commands
+; Default: /tmp/supysonic/supysonic.sock
+socket = /var/lib/supysonic/supysonic.sock
+
+; Defines if the file watcher should be started. Default: yes
+run_watcher = yes
+
+; 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
+
+; Command used by the jukebox
+jukebox_command = mpv --vid=no --start=%offset %path
+
+; Optional rotating log file for the scanner daemon. Logs to stderr if empty
+log_file = /var/lib/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 -
+
+; Default format, used when a client requests a bitrate lower than the original
+; file and no specific format
+default_transcode_target = mp3
+
+[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.install b/supysonic.install new file mode 100644 index 000000000000..8934c5431bd2 --- /dev/null +++ b/supysonic.install @@ -0,0 +1,6 @@ +post_install() { + echo "Find upstream install instructions here:" + echo " https://github.com/spl0k/supysonic#as-an-apache-wsgi-application" + echo "A sample apache WSGI config has been installed to:" + echo " /usr/share/doc/supysonic/apache-wsgi.conf" +}
\ No newline at end of file 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 |