blob: c7ad84afc492903b11e0872a00fb9d65afc8dedb (
plain)
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
71
72
73
74
75
76
77
78
79
80
81
|
# Maintainer: Joffrey <j-off@live.fr>
# Contributor: eolianoe <eolianoe [at] gmail [DoT] com>
# Contributor: Edvinas Valatka <edacval@gmail.com>
# Contributor: Aaron Lindsay <aaron@aclindsay.com>
pkgname=seahub
pkgver=7.1.1
pkgrel=1
pkgdesc='The web frontend for seafile server'
arch=('any')
url='https://github.com/haiwen/seahub'
license=('Apache')
depends=(
"seafile-server>=$pkgver"
'python-future'
'python-django-statici18n'
'python-django-post-office'
'python-django-webpack-loader'
'gunicorn'
'python-pymysql'
'python-django-picklefield'
'python-openpyxl'
'python-qrcode'
'python-django-formtools'
'python-django-simple-captcha'
'python-django-rest-framework'
'python-dateutil'
'python-requests'
'python-pillow'
'python-pyjwt'
'python-pycryptodome'
'python-django-ranged-response'
)
optdepends=(
'python-wsgidav-seafile: Webdav support'
'python-django-pylibmc: Memcached support'
'ffmpeg: For video thumbnails'
)
source=(
"$pkgname-$pkgver-server.tar.gz::$url/archive/v$pkgver-server.tar.gz"
'https://www.djangoproject.com/m/releases/1.11/Django-1.11.25.tar.gz'
)
sha256sums=(
'31dbcfa3ff176925f3de69d9b920fa8407150587be97b3fc568d52042dc44e23'
'5314e8586285d532b7aa5c6d763b0248d9a977a37efec86d30f0212b82e8ef66'
)
options=('!strip')
prepare() {
cd "$srcdir/$pkgname-$pkgver-server"
# Remove useless files and directories
rm -rf \
./{CONTRIBUTORS,HACKING,Makefile} \
./{*test*,*dev*,*sh*,README*,pylintrc*,LICENSE*} \
"$(find . -name \*.pyc)"
sed -i -E "/SEAFILE_VERSION/s/[0-9.]+/$pkgver/" ./seahub/settings.py
}
build() {
cd "$srcdir/$pkgname-$pkgver-server"
for locale in ./locale/*/LC_MESSAGES/*.po; do
echo "$locale"
msgfmt -vo "${locale%.po}.mo" "$locale"
done
}
package() {
cd "$srcdir/seahub-$pkgver-server/"
install -dm755 "$pkgdir/usr/share/seafile-server/seahub"
cp -r -p "./"* "$pkgdir/usr/share/seafile-server/seahub/"
cd "$srcdir/Django-1.11.25"
python setup.py install \
--root="$pkgdir" --optimize=1 \
--install-lib "usr/share/seafile-server/$pkgname/thirdpart"
rm -rf "$pkgdir/usr/bin/"
}
|