diff options
author | Grey Christoforo | 2016-05-30 12:40:33 +0100 |
---|---|---|
committer | Grey Christoforo | 2016-05-30 12:42:37 +0100 |
commit | c3fa46e5f6a0cdc17a98a09bd04156df74dc35ec (patch) | |
tree | 057d45edf954e7f811ad8ab85590b463eaea66d2 | |
download | aur-c3fa46e5f6a0cdc17a98a09bd04156df74dc35ec.tar.gz |
initial commit
add srcinfo
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | apache.example.conf | 15 | ||||
-rw-r--r-- | owncloud-daily.install | 10 | ||||
-rwxr-xr-x | set-oc-perms.sh | 50 |
6 files changed, 175 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9f59a101ddc2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,38 @@ +# Generated by mksrcinfo v8 +# Mon May 30 11:40:59 UTC 2016 +pkgbase = owncloud-daily + pkgdesc = ownCloud server dialy build, installed from the official .tar.bz2 archive + pkgver = 20160530 + pkgrel = 1 + url = https://owncloud.org + install = owncloud-daily.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 + provides = owncloud + conflicts = owncloud + options = !strip + options = emptydirs + backup = etc/webapps/owncloud/apache.example.conf + source = https://download.owncloud.org/community/daily/owncloud-daily-master.tar.bz2 + source = apache.example.conf + source = set-oc-perms.sh + md5sums = 06f336dd06b0e23619a6234b6f7a9f7a + md5sums = bf523e475fd8cf1e2048018952da5c34 + md5sums = 30333bf6beb39b5048fcb85c74e690c0 + +pkgname = owncloud-daily + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..41c065c69192 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.tar.bz2 +*.asc +*.pkg.tar.xz +*.patch +*.pkg.tar + +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..eca0ba42375b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Grey Christoforo <first name [at] last name [dot] net> + +pkgname=owncloud-daily +pkgver=20160530 +pkgrel=1 +pkgdesc="ownCloud server dialy build, installed from the official .tar.bz2 archive" +url="https://owncloud.org" +arch=('any') +license=('GPL') +conflicts=('owncloud') +provides=('owncloud') +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') +backup=('etc/webapps/owncloud/apache.example.conf') +install=${pkgname}.install +validpgpkeys=('E3036906AD9F30807351FAC32D5D5E97F6978A26') +source=("https://download.owncloud.org/community/daily/owncloud-daily-master.tar.bz2" + "apache.example.conf" + "set-oc-perms.sh") +md5sums=('06f336dd06b0e23619a6234b6f7a9f7a' + 'bf523e475fd8cf1e2048018952da5c34' + '30333bf6beb39b5048fcb85c74e690c0') + +options=(!strip emptydirs) + +prepare() { + cd "${srcdir}/owncloud" +} + +package() { + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + cp "${srcdir}"/owncloud/COPYING-* "${pkgdir}/usr/share/licenses/${pkgname}" + + mkdir -p "${pkgdir}/usr/share/webapps" + cp -a owncloud "${pkgdir}/usr/share/webapps/." + + install -D -m755 "${srcdir}/set-oc-perms.sh" "${pkgdir}/usr/bin/set-oc-perms" + install -m644 -D "${srcdir}/apache.example.conf" -t "${pkgdir}/etc/webapps/owncloud" + ln -s /usr/share/webapps/owncloud/occ "${pkgdir}/usr/bin/occ" +} + +# vim:set ts=2 sw=2 et: diff --git a/apache.example.conf b/apache.example.conf new file mode 100644 index 000000000000..7bcc1371af14 --- /dev/null +++ b/apache.example.conf @@ -0,0 +1,15 @@ +Alias /owncloud "/usr/share/webapps/owncloud" + +<Directory /usr/share/webapps/owncloud/> + Options +FollowSymlinks + AllowOverride All + Require all granted + + <IfModule mod_dav.c> + Dav off + </IfModule> + + SetEnv HOME /usr/share/webapps/owncloud + SetEnv HTTP_HOME /usr/share/webapps/owncloud + +</Directory> diff --git a/owncloud-daily.install b/owncloud-daily.install new file mode 100644 index 000000000000..afb85db72835 --- /dev/null +++ b/owncloud-daily.install @@ -0,0 +1,10 @@ +# arg 1: the new package version +# arg 2: the old package version + +post_install () { + set-oc-perms runtime +} + +post_upgrade() { + set-oc-perms runtime +} diff --git a/set-oc-perms.sh b/set-oc-perms.sh new file mode 100755 index 000000000000..30ab966e1472 --- /dev/null +++ b/set-oc-perms.sh @@ -0,0 +1,50 @@ +#!/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 + +ocpath='/usr/share/webapps/owncloud' +htuser='http' +htgroup='http' +rootuser='root' + +runtime() { + printf "Creating possible missing Directories\n" + mkdir -p $ocpath/data + mkdir -p $ocpath/assets + mkdir -p $ocpath/updater + + printf "chmod Files and Directories\n" + find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640 + find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750 + + printf "chown Directories\n" + chown -R ${rootuser}:${htgroup} ${ocpath}/ + chown -R ${htuser}:${htgroup} ${ocpath}/apps/ + chown -R ${htuser}:${htgroup} ${ocpath}/assets/ + chown -R ${htuser}:${htgroup} ${ocpath}/config/ + chown -R ${htuser}:${htgroup} ${ocpath}/data/ + chown -R ${htuser}:${htgroup} ${ocpath}/themes/ + chown -R ${htuser}:${htgroup} ${ocpath}/updater/ + + chmod +x ${ocpath}/occ + + printf "chmod/chown .htaccess\n" + if [ -f ${ocpath}/.htaccess ] + then + chmod 0644 ${ocpath}/.htaccess + chown ${rootuser}:${htgroup} ${ocpath}/.htaccess + fi + if [ -f ${ocpath}/data/.htaccess ] + then + chmod 0644 ${ocpath}/data/.htaccess + chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess + fi +} + +upgrade() { + printf "Setting upgrade permissions\n" + chown -R ${htuser}:${htgroup} ${ocpath} +} + +$1 |