diff options
author | Joffrey Darcq | 2018-02-02 14:11:00 +0100 |
---|---|---|
committer | Joffrey Darcq | 2018-02-02 14:11:00 +0100 |
commit | 0c1c365bd1876434d8df8e50eed0e04ab26a95bd (patch) | |
tree | 34e675635a8c17f496eeae75a40fcbdddbca8d0d | |
parent | 133e483d8e97987263ab905d7f3d1d484bb79b06 (diff) | |
download | aur-0c1c365bd1876434d8df8e50eed0e04ab26a95bd.tar.gz |
Major changes see ChangeLog
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | PKGBUILD | 113 | ||||
-rw-r--r-- | seahub.install | 10 |
4 files changed, 99 insertions, 65 deletions
@@ -1,25 +1,27 @@ -# Generated by mksrcinfo v8 -# Wed Jan 24 07:36:38 UTC 2018 pkgbase = seahub - pkgdesc = The web end of seafile server + pkgdesc = The web frontend for seafile server pkgver = 6.2.5 - pkgrel = 2 + pkgrel = 3 url = https://github.com/haiwen/seahub install = seahub.install + changelog = ChangeLog arch = i686 arch = x86_64 arch = armv7h arch = armv6h arch = aarch64 license = Apache + license = PSF + license = MIT + license = BSD + makedepends = python2-virtualenv depends = seafile-server - depends = python2-virtualenv depends = libmemcached - options = !strip + depends = libmariadbclient + optdepends = memcached + optdepends = mariadb source = seahub-6.2.5-server.tar.gz::https://github.com/haiwen/seahub/archive/v6.2.5-server.tar.gz - source = seahub-preupgrade sha256sums = 80a7a1cadde8e8e570bdc454bc4a4902ebcace97b347f9eef701b5ab02742039 - sha256sums = d3b0d33848ab9e0dbb9ea6e6e385fc4ffa82a77193af447edef7646d68e396b1 pkgname = seahub diff --git a/ChangeLog b/ChangeLog index bc64397d4320..0e3b06bccc38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,17 @@ -Seahub 6.2.5-3: -- python2-virtualenv and libmemcached moved to makedepends -- virtualenv moved to /usr/lib/seahub (more intuitive) -- seahub-preupgrade script is no longer maintained but it remains available in the package -- Fix subprocess exception if gunicorn is already installed -- Fix jpeg thumbnails, add openjpeg2 depdend (thanks Klemens) +2018-02-03 Joffrey <j-off@live.fr> + + * Version: v6.2.5-2 -> 6.2.5-3 + + * ChangeLog: Add Changelog + + * PKGBUILD: Use python2-virtualenv only for makedepends + Python modules utils are added to requirements.txt + Seahub virtualenv is now to /usr/lib/seahub (more appropriate) + Fix subprocess exception if gunicorn already installed + + * seahub-preupgrade: Will no longer be installed, it isn't a part of seahub + sources, an ArchLinux user can package it, it will be deleted soon. + + * nginx.example.conf: Add nginx configuration example for https and wsgi + + * seahub.install: Remove old virtualenv and seahub-preupgrade of your system @@ -1,61 +1,82 @@ -# Maintainer: eolianoe <eolianoe [at] gmail [DoT] com> +# Maintainer: Joffrey Darcq <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 +pkgname='seahub' pkgver=6.2.5 -pkgrel=2 -pkgdesc="The web end of seafile server" +pkgrel=3 +pkgdesc='The web frontend for seafile server' arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64') url="https://github.com/haiwen/${pkgname}" -license=('Apache') -depends=("seafile-server" "python2-virtualenv" 'libmemcached') +license=('Apache' 'PSF' 'MIT' 'BSD') +depends=('seafile-server' 'libmemcached' 'libmariadbclient') +optdepends=('memcached' 'mariadb') +makedepends=('python2-virtualenv') install="${pkgname}.install" -source=("${pkgname}-${pkgver}-server.tar.gz::${url}/archive/v${pkgver}-server.tar.gz" - "seahub-preupgrade") -sha256sums=('80a7a1cadde8e8e570bdc454bc4a4902ebcace97b347f9eef701b5ab02742039' - 'd3b0d33848ab9e0dbb9ea6e6e385fc4ffa82a77193af447edef7646d68e396b1') -# Strip is not happy on precompiled libs in virtualenv, temporary disable -options=("!strip") +changelog="ChangeLog" +source=("${pkgname}-${pkgver}-server.tar.gz::${url}/archive/v${pkgver}-server.tar.gz") +sha256sums=('80a7a1cadde8e8e570bdc454bc4a4902ebcace97b347f9eef701b5ab02742039') prepare () { - cd "${srcdir}/${pkgname}-${pkgver}-server" + cd "${srcdir}/${pkgname}-${pkgver}-server" - # Fix all script's python 2 requirement - grep -s -l -r '#!/usr/bin/env python\b' "${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|' + + # Add python utils modules to requirements.txt + { + echo 'flup' # WSGI support + echo 'MySQL-python' # MySQL support + echo 'pylibmc' # Memcached support + echo 'django-pylibmc' # Memcached support + } >> "./requirements.txt" } package() { - # Install seahub - install -dm755 "${pkgdir}/usr/share/seafile-server/seahub" - cp -r -p "${srcdir}/seahub-${pkgver}-server/"* \ - "${pkgdir}/usr/share/seafile-server/seahub/" - - # Install seahub preupgrade script - install -D -m755 "${srcdir}/seahub-preupgrade" \ - "${pkgdir}/usr/bin/seahub-preupgrade" - - # Create private virtualenv - virtualenv2 --no-wheel --system-site-packages "${pkgdir}/usr/lib/seafile/seafileenv" - source "${pkgdir}/usr/lib/seafile/seafileenv/bin/activate" - pip2 --isolated install --no-compile \ - -r "${srcdir}/${pkgname}-${pkgver}-server/requirements.txt" - pip2 --isolated install --no-compile \ - gunicorn pylibmc django-pylibmc - deactivate - virtualenv2 --relocatable "${pkgdir}/usr/lib/seafile/seafileenv" - - # Recompile all .pyc files in virtualenv. - # Not stricly required, but useful for printing valid source file paths in case of python exceptions. - # One caveat: 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 - python2 -m compileall -q -f -d /usr/lib/seafile/seafileenv/bin \ - -- "${pkgdir}/usr/lib/seafile/seafileenv/bin" - python2 -m compileall -q -f -d /usr/lib/seafile/seafileenv/lib/python2.7 \ - -x '.*/gunicorn/workers/_gaiohttp.py' \ - -- "${pkgdir}/usr/lib/seafile/seafileenv/lib/python2.7" - - # Fix virtualenv paths - sed -i "s#${pkgdir}##" "${pkgdir}"/usr/lib/seafile/seafileenv/bin/activate* + cd "${srcdir}/seahub-${pkgver}-server/" + + # Install seahub + install -dm755 "${pkgdir}/usr/share/seafile-server/seahub" + cp -r -p "./"* "${pkgdir}/usr/share/seafile-server/seahub/" + + # Create VirtualEnv + virtualenv="${pkgdir}/usr/lib/seahub" + virtualenv2 --no-wheel --system-site-packages "${virtualenv}" + + # Activates the VirtualEnv + source "${virtualenv}/bin/activate" + + # Fix subprocess exception if gunicorn is already installed + printf 'Installing gunicorn...' + pip2 install --isolated --no-compile --upgrade --force-reinstall gunicorn > /dev/null && \ + printf 'done.\n' + + # Install requirements + pip2 install --isolated --no-compile -r "./requirements.txt" + + deactivate # Deactivate VirtualEnv + + # Use relative path + virtualenv2 --relocatable "${virtualenv}" + + # Recompile all .pyc files in virtualenv. + # 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" + python2 -m compileall \ + -q -f -d "${virtualenv#$pkgdir}/bin" \ + -- "${virtualenv}/bin" && \ + printf 'done.\n' + + printf "Compile all .py in %s/..." "${virtualenv}/lib/python2.7" + python2 -m compileall \ + -q -f -d "${virtualenv#$pkgdir}/lib/python2.7" \ + -x '.*/gunicorn/workers/_gaiohttp.py' \ + -- "${virtualenv}/lib/python2.7" && \ + printf 'done.\n' } diff --git a/seahub.install b/seahub.install index 8a857fd4fb39..e8dfa8184abd 100644 --- a/seahub.install +++ b/seahub.install @@ -1,6 +1,6 @@ -post_upgrade() { - echo "For upgrade don't forget to execute:" - echo 'seahub-preupgrade' - echo 'In your seafile-server instance directory' - echo 'For instance /usr/share/seafile-server/' +post_upgrade() { + # Remove old virtualenv and script upgrade + # More infos: pacman -Qc seahub + rm -rf /usr/lib/seafile + rm -f /usr/bin/seahub-preupgrade } |