diff options
author | Grey Christoforo | 2016-06-04 17:11:55 +0100 |
---|---|---|
committer | Grey Christoforo | 2016-06-04 17:11:55 +0100 |
commit | b3755c0d5812c9a8def9a53d0d8949f0fcca80f8 (patch) | |
tree | e8ac8b2b7c7d1c738715e0dcff309c9a105bb49b | |
download | aur-b3755c0d5812c9a8def9a53d0d8949f0fcca80f8.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | apache.example.conf | 15 | ||||
-rw-r--r-- | nextcloud.install | 10 | ||||
-rwxr-xr-x | set-nc-perms.sh | 57 |
6 files changed, 173 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cf3bcbc7462f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +# Generated by mksrcinfo v8 +# Sat Jun 4 16:11:36 UTC 2016 +pkgbase = nextcloud + pkgdesc = nextcloud: A safe home for all your data. Secure, under your control and developed in an open, transparent and trustworthy way + pkgver = 9.0.2 + pkgrel = 1 + url = https://nextcloud.com + install = nextcloud.install + arch = any + license = GPL + depends = php + depends = php-gd + optdepends = php-apache: to use the Apache web server + optdepends = php-sqlite: to use the SQLite database backend + optdepends = php-pgsql: to use the PostgreSQL database backend + optdepends = php-ldap: LDAP authentication + optdepends = php-intl + optdepends = php-apcu + optdepends = mariadb: to use the MySQL database backend + optdepends = smbclient: to mount SAMBA shares + optdepends = php-mcrypt + optdepends = imagemagick: file preview + optdepends = ffmpeg: file preview + optdepends = libreoffice: file preview + options = !strip + options = emptydirs + source = apache.example.conf + source = set-nc-perms.sh + md5sums = bc2b02b0562b7a58e660e33acd4202bc + md5sums = 106536581b9d2a69b363f375c2dbd349 + +pkgname = nextcloud + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..dae0ea37f7bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.tar.bz2 +*.asc +*.pkg.tar.xz +*.patch + +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..554d3965bb91 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Grey Christoforo <first name [at] last name [dot] net> + +pkgname=nextcloud +pkgver=9.0.2 +pkgrel=1 +pkgdesc="nextcloud: A safe home for all your data. Secure, under your control and developed in an open, transparent and trustworthy way" +url="https://nextcloud.com" +arch=('any') +license=('GPL') +depends=('php' 'php-gd') +optdepends=('php-apache: to use the Apache web server' + 'php-sqlite: to use the SQLite database backend' + 'php-pgsql: to use the PostgreSQL database backend' + 'php-ldap: LDAP authentication' + 'php-intl' + 'php-apcu' + 'mariadb: to use the MySQL database backend' + 'smbclient: to mount SAMBA shares' + 'php-mcrypt' + 'imagemagick: file preview' + 'ffmpeg: file preview' + 'libreoffice: file preview') +options=('!strip') +install=${pkgname}.install +#validpgpkeys=('E3036906AD9F30807351FAC32D5D5E97F6978A26') +#source=("https://download.owncloud.org/community/owncloud-${pkgver}.tar.bz2"{,.asc} +source=("apache.example.conf" +# "https://github.com/nextcloud/server/archive/v${pkgver}.tar.gz" + "set-nc-perms.sh") +md5sums=('bc2b02b0562b7a58e660e33acd4202bc' + '106536581b9d2a69b363f375c2dbd349') + +options=(!strip emptydirs) + +#prepare() { +# cd nextcloud-${pkgver} +#} + +package() { + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + cp "${srcdir}/nextcloud/COPYING-*" "${pkgdir}/usr/share/licenses/${pkgname}" + + mkdir -p "${pkgdir}/usr/share/webapps" + cp -a nextcloud "${pkgdir}/usr/share/webapps/." + + install -D -m755 "${srcdir}/set-nc-perms.sh" "${pkgdir}/usr/bin/set-nc-perms" + install -m644 -D "${srcdir}/apache.example.conf" -t "${pkgdir}/etc/webapps/nextcloud" + ln -s /usr/share/webapps/nextcloud/ncc "${pkgdir}/usr/bin/ncc" +} + +# vim:set ts=2 sw=2 et: diff --git a/apache.example.conf b/apache.example.conf new file mode 100644 index 000000000000..84f452ac274c --- /dev/null +++ b/apache.example.conf @@ -0,0 +1,15 @@ +Alias /nextcloud "/usr/share/webapps/nextcloud" + +<Directory /usr/share/webapps/nextcloud/> + Options +FollowSymlinks + AllowOverride All + Require all granted + + <IfModule mod_dav.c> + Dav off + </IfModule> + + SetEnv HOME /usr/share/webapps/nextcloud + SetEnv HTTP_HOME /usr/share/webapps/nextcloud + +</Directory> diff --git a/nextcloud.install b/nextcloud.install new file mode 100644 index 000000000000..5a46de13a0d5 --- /dev/null +++ b/nextcloud.install @@ -0,0 +1,10 @@ +# arg 1: the new package version +# arg 2: the old package version + +post_install () { + set-nc-perms runtime +} + +post_upgrade() { + set-nc-perms runtime +} diff --git a/set-nc-perms.sh b/set-nc-perms.sh new file mode 100755 index 000000000000..b2b10efe318a --- /dev/null +++ b/set-nc-perms.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# from https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#strong-perms-label +# run with the argument "runtime" to set the proper runtime permissions +# run with the argument "upgrade" to set the proper upgrade permissions + +ncpath='/usr/share/webapps/nextcloud' +htuser='http' +htgroup='http' +rootuser='root' + +runtime() { + printf "Creating possible missing Directories\n" + mkdir -p $ncpath/data + mkdir -p $ncpath/assets + mkdir -p $ncpath/updater + + printf "chmod Files and Directories\n" + find ${ncpath}/ -type f -print0 | xargs -0 chmod 0640 + find ${ncpath}/ -type d -print0 | xargs -0 chmod 0750 + + printf "chown Directories\n" + chown -R ${rootuser}:${htgroup} ${ncpath}/ + chown -R ${htuser}:${htgroup} ${ncpath}/apps/ + chown -R ${htuser}:${htgroup} ${ncpath}/assets/ + chown -R ${htuser}:${htgroup} ${ncpath}/config/ + chown -R ${htuser}:${htgroup} ${ncpath}/data/ + chown -R ${htuser}:${htgroup} ${ncpath}/themes/ + chown -R ${htuser}:${htgroup} ${ncpath}/updater/ + + chmod +x ${ncpath}/ncc + + printf "chmod/chown .htaccess\n" + if [ -f ${ncpath}/.htaccess ] + then + chmod 0664 ${ncpath}/.htaccess + chown ${rootuser}:${htgroup} ${ncpath}/.htaccess + fi + if [ -f ${ncpath}/data/.htaccess ] + then + chmod 0664 ${ncpath}/data/.htaccess + chown ${rootuser}:${htgroup} ${ncpath}/data/.htaccess + fi + + printf "chmod/chown .user.ini\n" + if [ -f ${ncpath}/.user.ini ] + then + chmod 0664 ${ncpath}/.user.ini + chown ${rootuser}:${htgroup} ${ncpath}/.htaccess + fi +} + +upgrade() { + printf "Setting upgrade permissions\n" + chown -R ${htuser}:${htgroup} ${ncpath} +} + +$1 |