diff options
author | Thomas Sarboni | 2015-06-18 15:19:58 +0200 |
---|---|---|
committer | Thomas Sarboni | 2015-06-18 15:19:58 +0200 |
commit | bc642440a8109c7ac5c94453b3bf5468087d215d (patch) | |
tree | 52a3c232231101396aedde79eb431f8e7f166c0e | |
download | aur-bc642440a8109c7ac5c94453b3bf5468087d215d.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | ampache.install | 17 | ||||
-rw-r--r-- | nginx-example.conf | 80 |
4 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..35d54f12c09e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = ampache-git + pkgdesc = A PHP-based tool for managing and playing your audio/video files via a web interface + pkgver = 3.8.0.beta2.11.g41e837b + pkgrel = 1 + url = http://www.ampache.org/ + install = ampache.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + depends = mariadb>=5.0 + depends = php>=5.4 + depends = curl + optdepends = ffmpeg: all transcoding/downsampling + optdepends = lame: mp3 transcoding/downsampling + optdepends = vorbis-tools: ogg transcoding/downsampling + optdepends = flac: flac transcoding/downsampling + optdepends = faad2: m4a transcoding/downsampling + optdepends = mp3splt: mp3, ogg and flac downsampling + conflicts = ampache + conflicts = ampache-development + source = git://github.com/ampache/ampache.git + source = nginx-example.conf + md5sums = SKIP + md5sums = 60c0e437bd20d5ba8a53f61768d037b6 + +pkgname = ampache-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fb5daae8f9b0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +#Maintainer: max-k <max-k AT post DOT com> +#Contributor: Jonathan 'gishten' Gustafsson <mynick AT mynick DOT com> + +pkgname=ampache-git +_gitname=ampache +pkgver=3.8.0.beta2.11.g41e837b +pkgrel=1 +pkgdesc="A PHP-based tool for managing and playing your audio/video files via a web interface" +arch=('i686' 'x86_64') +url="http://www.ampache.org/" +license=('GPL') +depends=('mariadb>=5.0' 'php>=5.4' 'curl') +makedepends=('git') +optdepends=('ffmpeg: all transcoding/downsampling' + 'lame: mp3 transcoding/downsampling' + 'vorbis-tools: ogg transcoding/downsampling' + 'flac: flac transcoding/downsampling' + 'faad2: m4a transcoding/downsampling' + 'mp3splt: mp3, ogg and flac downsampling') +conflicts=('ampache' 'ampache-development') +install=ampache.install +source=(git://github.com/ampache/ampache.git 'nginx-example.conf') +md5sums=('SKIP' '60c0e437bd20d5ba8a53f61768d037b6') + +pkgver() { + cd ${_gitname} + git describe --long --tags | sed 's|-|.|g' +} + +build() { + echo "" > /dev/null +} + +package() { + cd ${srcdir}/${_gitname} + mkdir -p ${pkgdir}/srv/http/${_gitname} + cp -a * ${pkgdir}/srv/http/${_gitname}/ + mkdir -p ${pkgdir}/usr/share/doc/${_gitname} + install -D -m644 ${srcdir}/nginx-example.conf ${pkgdir}/usr/share/doc/ +} + diff --git a/ampache.install b/ampache.install new file mode 100644 index 000000000000..76c49e54c2d7 --- /dev/null +++ b/ampache.install @@ -0,0 +1,17 @@ +post_install() { + cat <<-EndOfMessage + ==> If you want to use Ampache's transcoding and/or downsampling you'll + need the packages specified in optdepends. + Check out http://wiki.archlinux.org/index.php/Ampache and + https://github.com/ampache/ampache/wiki/Transcoding for more info. + ==> Please enable curl and pdo_mysql modules in php.ini. + ==> Database will be upgraded automatically in case of update from 3.7. + Check out https://github.com/ampache/ampache/wiki/Installation for + more info about installation process. + EndOfMessage + /bin/true +} + +post_upgrade() { + post_install +} diff --git a/nginx-example.conf b/nginx-example.conf new file mode 100644 index 000000000000..ced954925819 --- /dev/null +++ b/nginx-example.conf @@ -0,0 +1,80 @@ +server { + listen 80; + server_name FQDN; + charset utf-8; + + root PATH; + index index.php; + + # Rewrite rule for Subsonic backend + if ( !-d $request_filename ) { + rewrite ^/rest/(.*).view$ /rest/index.php?action=$1 last; + rewrite ^/rest/fake/(.+)$ /play/$1 last; + } + + # Rewrite rule for Plex backend + if ( !-d $request_filename ) { + rewrite ^/plex/(.*)$ /plex/index.php?action=$1 last; + } + + # Rewrite rule for Channels + if (!-d $request_filename){ + rewrite ^/channel/([0-9]+)/(.*)$ /channel/index.php?channel=$1&target=$2 last; + } + + # Beautiful URL Rewriting + rewrite ^/play/ssid/(\w+)/type/(\w+)/oid/([0-9]+)/uid/([0-9]+)/name/(.*)$ /play/index.php?ssid=$1&type=$2&oid=$3&uid=$4&name=$5 last; + rewrite ^/play/ssid/(\w+)/type/(\w+)/oid/([0-9]+)/uid/([0-9]+)/client/(.*)/noscrobble/([0-1])/name/(.*)$ /play/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&name=$7 last; + location /play { + if (!-e $request_filename) { + rewrite ^/play/art/([^/]+)/([^/]+)/([0-9]+)/thumb([0-9]*)\.([a-z]+)$ /image.php?object_type=$2&object_id=$3&auth=$1; + break; + } + + rewrite ^/([^/]+)/([^/]+)(/.*)?$ /play/$3?$1=$2; + rewrite ^/(/[^/]+|[^/]+/|/?)$ /play/index.php last; + break; + } + + location /rest { + limit_except GET POST { + deny all; + } + } + + location /plex { + limit_except GET POST { + deny all; + } + } + + location ^~ /bin/ { + deny all; + return 403; + } + + location ^~ /config/ { + deny all; + return 403; + } + + location / { + limit_except GET POST HEAD{ + deny all; + } + } + + location ~ ^/.*.php { + # PHP config... + } + + # Rewrite rule for WebSocket + location /ws { + rewrite ^/ws/(.*) /$1 break; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_pass http://127.0.0.1:8100/; + } +} |