diff options
author | Joffrey | 2018-06-15 14:30:16 +0000 |
---|---|---|
committer | Joffrey | 2018-06-15 14:30:16 +0000 |
commit | afab881d0b59618491e84d6fc8f481ebce704ef5 (patch) | |
tree | 7da82bb9c4d8ec67bc1f13dfbec85c2b2c3fb5b5 /PKGBUILD | |
parent | ea886b97eec505d60b96e00e89c7668e781ed3b6 (diff) | |
download | aur-afab881d0b59618491e84d6fc8f481ebce704ef5.tar.gz |
updpkg: 6.3.1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 125 |
1 files changed, 48 insertions, 77 deletions
@@ -1,104 +1,75 @@ -# Maintainer: Joffrey Darcq <j-off@live.fr> +# 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=6.3.0 +pkgver='6.3.1' pkgrel=1 pkgdesc='The web frontend for seafile server' arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64') -url="https://github.com/haiwen/${pkgname}" -license=('custom:Apache PSF MIT BSD GPL') -depends=("seafile-server>=${pkgver}" 'libmemcached' 'freetype2' 'openjpeg2') -optdepends=('mariadb: For use MySQL databases' - 'memcached: For better caching performance' - 'ffmpeg: For video thumbnails' +url='https://github.com/haiwen/seahub' +license=('Apache') +depends=( + "seafile-server>=$pkgver" + 'python2-dateutil' + 'python2-memcached' + 'python2-chardet' + 'python2-six' + 'python2-pillow' + 'python2-django' + 'python2-django-compressor' + 'python2-django-post-office' + 'python2-django-statici18n' + 'python2-django-rest-framework' + 'python2-django-constance' + 'python2-openpyxl' + 'python2-pytz' + 'python2-django-formtools' + 'python2-qrcode' + 'python2-requests' + 'python2-requests-oauthlib' + 'python2-django-simple-captcha' + 'python2-flup' + 'python2-gunicorn' + 'python2-django-webpack-loader' + 'python2-cas' + 'python2-django-picklefield' +) +optdepends=( + 'mysql-python: MySQL support' + 'python2-wsgidav-seafile: Webdav support' + 'python2-django-pylibmc: Memcached support' + 'ffmpeg: For video thumbnails' ) -makedepends=('python2-virtualenv' 'git') changelog="ChangeLog" -source=("${pkgname}-${pkgver}-server.tar.gz::${url}/archive/v${pkgver}-server.tar.gz") -sha256sums=('89b52185ecf6a90417b4c52b4e24fb7af941996b7a9f92875dfc00967719627f') -options=("!strip") +source=("$pkgname-$pkgver-server.tar.gz::$url/archive/v$pkgver-server.tar.gz") +sha256sums=('4fb4742d22a23709e1ff227dbf186cd48cfdfceb04fe63703fe8ba6b5b08616a') +options=('!strip') prepare() { - cd "${srcdir}/${pkgname}-${pkgver}-server" - - # 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" - - # Prepare License - { - cat './LICENSE.txt' - cat './LICENSE-'* - } >> './LICENSE' - + cd "$srcdir/${pkgname}-${pkgver}-server" # Remove useless files and directories rm -rf \ - './CONTRIBUTORS' './HACKING' './Makefile' \ - './'{*test*,*dev*,*sh*,README*,pylintrc*,LICENSE[.-]*} \ + './'{CONTRIBUTORS,HACKING,Makefile} \ + './'{*test*,*dev*,*sh*,README*,pylintrc*,LICENSE*} \ "$(find . -name \*.pyc)" - # 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|' + shebang='#!/usr/bin/env python' + grep -s -l -r "$shebang" | xargs sed -i -E "1 s|$shebang|${shebang}2|" } build() { - cd "${srcdir}/${pkgname}-${pkgver}-server/" - + cd "$srcdir/$pkgname-$pkgver-server" printf 'Compile seahub locales...' for locale in ./locale/*/LC_MESSAGES/*.po; do - msgfmt -o "${locale%.po}.mo" "${locale}" + msgfmt -o "${locale%.po}.mo" "$locale" done printf 'done.\n' } package() { - cd "${srcdir}/seahub-${pkgver}-server/" - - # Install seahub - install -dm755 "${pkgdir}/usr/share/seafile-server/seahub" - cp -r -p "./"* "${pkgdir}/usr/share/seafile-server/seahub/" - - install -Dm644 './LICENSE' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - # Create VirtualEnv - venv="${pkgdir}/usr/lib/seahub" - virtualenv2 --no-wheel --system-site-packages "${venv}" - - source "${venv}/bin/activate" # Activates the VirtualEnv - - # Fix modules missing - printf 'Installing gunicorn, six...' - pip2 install --isolated --no-compile --upgrade --force-reinstall 'gunicorn' 'six' > /dev/null - printf 'done.\n' - - # Install requirements - pip2 install --isolated --no-compile -r "./requirements.txt" - - deactivate # Deactivate VirtualEnv - - virtualenv2 --relocatable "${venv}" # Use relative path - - # Recompile .py for printing valid file paths in case of python exceptions. - # Requires minimum 1GB RAM, comment next commands in case of < 1GB RAM - printf "Compile all .py in %s/..." "${venv}/bin" - python2 -m compileall \ - -q -f -d "${venv#$pkgdir}/bin" \ - -- "${venv}/bin" - printf 'done.\n' - - # _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 "${venv#$pkgdir}/lib/python2.7" \ - -x '.*/gunicorn/workers/_gaiohttp.py' \ - -- "${venv}/lib/python2.7" - printf 'done.\n' + cd "$srcdir/seahub-$pkgver-server/" + install -dm755 "$pkgdir/usr/share/seafile-server/seahub" + cp -r -p "./"* "$pkgdir/usr/share/seafile-server/seahub/" } |