diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-10-31 11:50:35 +0100 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-10-31 11:50:35 +0100 |
commit | bd40d543bcea6700c99518d1dda8e9c82e3449bf (patch) | |
tree | 68691b8f8eb470855c1655b7792599a815db5b4d /main/seahub | |
parent | c3e2c12d30f48a88fbc9b4aa98a0861ebb06d052 (diff) | |
download | aports-bd40d543bcea6700c99518d1dda8e9c82e3449bf.tar.bz2 aports-bd40d543bcea6700c99518d1dda8e9c82e3449bf.tar.xz |
testing/seafile: move seafile and deps to main
Diffstat (limited to 'main/seahub')
-rw-r--r-- | main/seahub/APKBUILD | 50 | ||||
-rw-r--r-- | main/seahub/seahub.confd | 7 | ||||
-rw-r--r-- | main/seahub/seahub.initd | 19 | ||||
-rw-r--r-- | main/seahub/seahub.post-install | 9 |
4 files changed, 85 insertions, 0 deletions
diff --git a/main/seahub/APKBUILD b/main/seahub/APKBUILD new file mode 100644 index 0000000000..4dc609f518 --- /dev/null +++ b/main/seahub/APKBUILD @@ -0,0 +1,50 @@ +# Contributor: <xmingske@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=seahub +pkgver=3.1.7 +pkgrel=0 +pkgdesc="web frontend for Seafile" +url="https://github.com/haiwen/seahub/" +arch="noarch" +license="Apache" +depends="bash py-dateutil py-mako py-simplejson py-pillow py-pip py-virtualenv py-six + python py-django1.5 py-gunicorn py-chardet py-django-djblets py-ccnet py-libsearpc + py-django-simple-captcha py-django-registration py-flup py-seafile seafile-server" +source="$pkgname-$pkgver.tar.gz::https://github.com/haiwen/seahub/archive/v${pkgver}-server.tar.gz + seahub.confd seahub.initd" +install="seahub.post-install" + +_builddir="${srcdir}/${pkgname}-${pkgver}-server" + +prepare() { + local pf + cd "${_builddir}" + for pf in $source; do + case $pf in + *.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;; + esac + done +} + +build() { + echo +} + +package() { + cd "${_builddir}" + mkdir -m 755 -p "${pkgdir}"/usr/share/seahub || return 1 + cp -ar "${_builddir}"/* "${pkgdir}"/usr/share/seahub + install -D -m0644 "${srcdir}"/seahub.confd "${pkgdir}"/etc/conf.d/seahub \ + || return 1 + install -D -m0755 "${srcdir}"/seahub.initd "${pkgdir}"/etc/init.d/seahub \ + || return 1 +} +md5sums="d019b7171ed23817025cba55554b90d9 seahub-3.1.7.tar.gz +e1ed5467cd78159fb7e73e2d2d925a8e seahub.confd +4d0df2a2cb7e5e6a0db0b893257aaaf5 seahub.initd" +sha256sums="7e67719a65e67d01522e08cee9f3580f01188035061927bfc4f398909372a0ec seahub-3.1.7.tar.gz +8b0e8bf45d278bbf32f4dca4a402f2584a87e46adee2e24732804acebd1c2cff seahub.confd +49176ee3911a39ce94388fb67600da98cfe52e2e7e026d3bbfa3b6a8ead759b1 seahub.initd" +sha512sums="ee3d7b161992192cc3a5854956106a3857110ec890c457455b093a0be8163a85bc571b71c76116c02407500f55c16e219489cdeb0737a3cba2aa34054a1767c5 seahub-3.1.7.tar.gz +d55dbd3e59ae48a930cbcb42ec840689a17f6cb1cb16f6d0d155e646b24accb8a5e5c1f59f549f66941bb21475b2c6ce55a3bb014d016bfeddea13602984c2a6 seahub.confd +8329a3b730e4ce5276662fa6a74c3d8889d96f289f1706cefa340c5bd7d0590f022c7647ab957866642f30618bc82a62468c02999bab6bbe04e03e0e07668b62 seahub.initd" diff --git a/main/seahub/seahub.confd b/main/seahub/seahub.confd new file mode 100644 index 0000000000..a72045dc1e --- /dev/null +++ b/main/seahub/seahub.confd @@ -0,0 +1,7 @@ +instance="default" + +seafile_user="seafile" +seafile_group="seafile" + +# to run seahub in fcgi mode uncomment the following line +#seafile_opts="--fastcgi --port 8500" diff --git a/main/seahub/seahub.initd b/main/seahub/seahub.initd new file mode 100644 index 0000000000..cfb5df5692 --- /dev/null +++ b/main/seahub/seahub.initd @@ -0,0 +1,19 @@ +#!/sbin/runscript + +export SEAHUB_LOG_DIR=/var/lib/seafile/$instance/logs + +depend() { + need net +} + +start() { + ebegin "Starting Seafile $instance instance" + start-stop-daemon --chdir /var/lib/seafile/$instance --user $seafile_user \ + --group $seafile_group /usr/bin/seafile-admin start +} + +stop() { + ebegin "Stopping Seafile $instance instance" + start-stop-daemon --chdir /var/lib/seafile/$instance /usr/bin/seafile-admin \ + stop +} diff --git a/main/seahub/seahub.post-install b/main/seahub/seahub.post-install new file mode 100644 index 0000000000..262e8be8fe --- /dev/null +++ b/main/seahub/seahub.post-install @@ -0,0 +1,9 @@ +#!/bin/sh + +SEAFILE_HOME=/var/lib/seafile +SEAFILE_DEFAULT=$SEAFILE_HOME/default + +if [[ ! -h $SEAFILE_DEFAULT/seafile-server/seahub ]]; then + su seafile -c "mkdir -m 755 -p $SEAFILE_DEFAULT/seafile-server" 2>/dev/null + su seafile -c "cp -R /usr/share/seahub $SEAFILE_DEFAULT/seafile-server" 2>/dev/null +fi
\ No newline at end of file |