diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-10 13:38:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-10 13:38:42 +0000 |
commit | edcd2fc03278ac8ff6c3cb1c98e33805ada8ce93 (patch) | |
tree | f17b6ac796d464a759e5ddb6e5eb3a64327d4c4f /community/seahub | |
parent | bf4cf79b81f0ddb0c7c95b8d791ec48a2698f692 (diff) | |
download | aports-edcd2fc03278ac8ff6c3cb1c98e33805ada8ce93.tar.bz2 aports-edcd2fc03278ac8ff6c3cb1c98e33805ada8ce93.tar.xz |
community/seafile (and deps): move from main
Diffstat (limited to 'community/seahub')
-rw-r--r-- | community/seahub/APKBUILD | 50 | ||||
-rw-r--r-- | community/seahub/seahub.confd | 7 | ||||
-rw-r--r-- | community/seahub/seahub.initd | 19 | ||||
-rw-r--r-- | community/seahub/seahub.post-install | 9 |
4 files changed, 85 insertions, 0 deletions
diff --git a/community/seahub/APKBUILD b/community/seahub/APKBUILD new file mode 100644 index 0000000000..538532f444 --- /dev/null +++ b/community/seahub/APKBUILD @@ -0,0 +1,50 @@ +# Contributor: <xmingske@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=seahub +pkgver=4.0.1 +pkgrel=1 +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="93e8755aec1cd7d028538e04683f30e7 seahub-4.0.1.tar.gz +e1ed5467cd78159fb7e73e2d2d925a8e seahub.confd +1a1777dd469cbbc6773b2c31e265cb37 seahub.initd" +sha256sums="7429751f1b47dbaf6ecc5b8cb32f00b85c817f536b34b923fb47cc046559c6d3 seahub-4.0.1.tar.gz +8b0e8bf45d278bbf32f4dca4a402f2584a87e46adee2e24732804acebd1c2cff seahub.confd +2da114c938efa349f7762466d5cffc26393262968db5194cd469c2fd79077396 seahub.initd" +sha512sums="85c793893dcada7b0600abdc4ab6c0fcc7ee978d8828af1cd7dc6a711c30c45e9b217c906de282b7d901923f582882361a2ac2f39ed6d49c8d8c5b6816dfc14e seahub-4.0.1.tar.gz +d55dbd3e59ae48a930cbcb42ec840689a17f6cb1cb16f6d0d155e646b24accb8a5e5c1f59f549f66941bb21475b2c6ce55a3bb014d016bfeddea13602984c2a6 seahub.confd +71445244d966d5770618c2b4b003959ae135e737657d7b7cb79b2def8787655d0a50f8a7fdb1fee64108e51410e99d1a52144c707c2247bc7ffd8d422c5c7f4c seahub.initd" diff --git a/community/seahub/seahub.confd b/community/seahub/seahub.confd new file mode 100644 index 0000000000..a72045dc1e --- /dev/null +++ b/community/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/community/seahub/seahub.initd b/community/seahub/seahub.initd new file mode 100644 index 0000000000..faee878e3b --- /dev/null +++ b/community/seahub/seahub.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run + +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/community/seahub/seahub.post-install b/community/seahub/seahub.post-install new file mode 100644 index 0000000000..262e8be8fe --- /dev/null +++ b/community/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 |