summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 19 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 668e946aa9ee..2124498122c7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,25 +5,26 @@
pkgname='seahub'
pkgver=6.2.5
-pkgrel=3
+pkgrel=4
pkgdesc='The web frontend for seafile server'
arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/haiwen/${pkgname}"
-license=('Apache' 'PSF' 'MIT' 'BSD')
-depends=('seafile-server' 'libmemcached' 'libmariadbclient')
+license=('Apache' 'PSF' 'MIT' 'BSD' 'GPL')
+depends=("seafile-server=${pkgver}" 'libmemcached' 'libmariadbclient')
optdepends=('memcached' 'mariadb')
makedepends=('python2-virtualenv')
install="${pkgname}.install"
changelog="ChangeLog"
source=("${pkgname}-${pkgver}-server.tar.gz::${url}/archive/v${pkgver}-server.tar.gz")
sha256sums=('80a7a1cadde8e8e570bdc454bc4a4902ebcace97b347f9eef701b5ab02742039')
+options=("!strip")
prepare () {
cd "${srcdir}/${pkgname}-${pkgver}-server"
- # Fix all script's python 2 requirement
- grep -s -l -r '#!/usr/bin/env python\b' "./" \
- | xargs sed -i -e '1 s|env python\b|env python2|'
+ # Use python lib seahub interpreter for all scripts
+ grep -s -l -r '#!/usr/bin/env python' "./" \
+ | xargs sed -i -e '1 s|#!/usr/bin/env python|#!/usr/lib/seahub/bin/python2|'
# Add python utils modules to requirements.txt
{
@@ -42,11 +43,11 @@ package() {
cp -r -p "./"* "${pkgdir}/usr/share/seafile-server/seahub/"
# Create VirtualEnv
- virtualenv="${pkgdir}/usr/lib/seahub"
- virtualenv2 --no-wheel --system-site-packages "${virtualenv}"
+ venv="${pkgdir}/usr/lib/seahub"
+ virtualenv2 --no-wheel --system-site-packages "${venv}"
# Activates the VirtualEnv
- source "${virtualenv}/bin/activate"
+ source "${venv}/bin/activate"
# Fix subprocess exception if gunicorn is already installed
printf 'Installing gunicorn...'
@@ -59,24 +60,22 @@ package() {
deactivate # Deactivate VirtualEnv
# Use relative path
- virtualenv2 --relocatable "${virtualenv}"
+ virtualenv2 --relocatable "${venv}"
- # Recompile all .pyc files in virtualenv.
- # Not stricly required
+ # Recompile all .pyc files in venv. Not stricly required
# But useful for printing valid source file paths in case of python exceptions.
# Requires minimum 1GB RAM, comment next two commands in case of < 1GB RAM
- # _gaiohttp.py excluded due to https://github.com/benoitc/gunicorn/issues/810
-
- printf "Compile all .py in %s/..." "${virtualenv}/bin"
+ printf "Compile all .py in %s/..." "${venv}/bin"
python2 -m compileall \
- -q -f -d "${virtualenv#$pkgdir}/bin" \
- -- "${virtualenv}/bin" && \
+ -q -f -d "${venv#$pkgdir}/bin" \
+ -- "${venv}/bin" && \
printf 'done.\n'
- printf "Compile all .py in %s/..." "${virtualenv}/lib/python2.7"
+ # _gaiohttp.py excluded due to https://github.com/benoitc/gunicorn/issues/810
+ printf "Compile all .py in %s/..." "${venv}/lib/python2.7"
python2 -m compileall \
- -q -f -d "${virtualenv#$pkgdir}/lib/python2.7" \
+ -q -f -d "${venv#$pkgdir}/lib/python2.7" \
-x '.*/gunicorn/workers/_gaiohttp.py' \
- -- "${virtualenv}/lib/python2.7" && \
+ -- "${venv}/lib/python2.7" && \
printf 'done.\n'
}