-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
70 lines (64 loc) · 2.04 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
pkgname=supysonic
pkgver=0.3.495.g92fed40
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-zipstream'
)
makedepends=(
'git'
'python-setuptools'
'python-pip'
)
optdepends=('python-watchdog: Watch for library changes using supysonic-watcher'
'ffmpeg: transcoder support')
source=("${pkgname}::git+https://github.com/spl0k/$pkgname"
"$pkgname.ini"
"$pkgname.service"
"$pkgname.sysusers"
'nginx.conf'
'uwsgi.ini')
sha256sums=('SKIP'
'8f52e93cd4f13e2e555b5ac4e456020b4395bf311b0226d9d50b13444721872d'
'e3be2056c28b8a59873ea1bca664833359b15f51291bd5818404e76b95579e03'
'b4b723d30fb45f86a15ec218910cd3935aac4546d5e2f9a1e1bc79cccfb98480'
'adb3f3e286fe4e87477452022189b81c2b06a7fbd0fc2623c28b5624696aaa0b'
'21943b10eae0b23f437ccf6ebcfe72f3c3ec9132f063849ae0b215c79f101616')
backup=("etc/$pkgname")
pkgver() {
cd $pkgname
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/$pkgname.wsgi" $pkgname/wsgi.py
}
build() {
cd $pkgname
python setup.py 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/*.md
cd $srcdir
install -Dm664 "$pkgname.ini" "$pkgdir/etc/$pkgname"
install -Dm664 "uwsgi.ini" \
"$pkgdir/etc/uwsgi/$pkgname.ini"
install -Dm664 "$pkgname.service" \
"$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm664 "supysonic.sysusers" \
"$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -Dm664 nginx.conf \
"$pkgdir/etc/nginx/sites-available/$pkgname"
}