summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuflone2016-12-26 21:42:38 +0100
committerMuflone2016-12-26 21:44:03 +0100
commit7ffa6e836a9c0a0f65268da0d645281485939b35 (patch)
treec445db786dd3033acaba73d762c438e562374cc9
downloadaur-7ffa6e836a9c0a0f65268da0d645281485939b35.tar.gz
New package nexcloud-10 10.0.2-1
-rw-r--r--.SRCINFO37
-rw-r--r--PKGBUILD48
-rw-r--r--apache.example.conf15
-rwxr-xr-xset-nc-perms.sh62
4 files changed, 162 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c269bb038584
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,37 @@
+# Generated by mksrcinfo v8
+# Mon Dec 26 20:43:53 UTC 2016
+pkgbase = nextcloud-10
+ pkgdesc = A safe home for all your data. Secure, under your control and developed in an open, transparent and trustworthy way (Version 10.x for migrating from ownCloud 9.x)
+ pkgver = 10.0.2
+ pkgrel = 1
+ url = https://nextcloud.com
+ arch = any
+ license = AGPL
+ 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: Memory caching
+ 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
+ conflicts = nextcloud
+ options = !strip
+ options = emptydirs
+ source = https://download.nextcloud.com/server/releases/nextcloud-10.0.2.tar.bz2
+ source = https://download.nextcloud.com/server/releases/nextcloud-10.0.2.tar.bz2.asc
+ source = apache.example.conf
+ source = set-nc-perms.sh
+ sha256sums = a687a818778413484f06bb23b4e98589c73729fe2aa9feb1bf5584e3bd37103c
+ sha256sums = SKIP
+ sha256sums = f9ff4ecee6bca01a2820e0f8509e4ef59343fb91fa2ada205ced2d3765c7d707
+ sha256sums = 6622fc3beba36d055b10b6a661bfe9ca44373277edfa4ce9d5ac8258893efd02
+
+pkgname = nextcloud-10
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..baea9bec71e9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+# Contributor: Grey Christoforo <first name [at] last name [dot] net>
+
+pkgname=nextcloud-10
+pkgver=10.0.2
+pkgrel=1
+pkgdesc="A safe home for all your data. Secure, under your control and developed in an open, transparent and trustworthy way (Version 10.x for migrating from ownCloud 9.x)"
+url="https://nextcloud.com"
+arch=('any')
+license=('AGPL')
+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: Memory caching'
+ 'mariadb: to use the MySQL database backend'
+ 'smbclient: to mount SAMBA shares'
+ 'php-mcrypt'
+ 'imagemagick: file preview'
+ 'ffmpeg: file preview'
+ 'libreoffice: file preview')
+conflicts=('nextcloud')
+validpgpkeys=('28806A878AE423A28372792ED75899B9A724937A')
+source=("https://download.nextcloud.com/server/releases/nextcloud-${pkgver}.tar.bz2"{,.asc}
+ "apache.example.conf"
+ "set-nc-perms.sh")
+sha256sums=('a687a818778413484f06bb23b4e98589c73729fe2aa9feb1bf5584e3bd37103c'
+ 'SKIP'
+ 'f9ff4ecee6bca01a2820e0f8509e4ef59343fb91fa2ada205ced2d3765c7d707'
+ '6622fc3beba36d055b10b6a661bfe9ca44373277edfa4ce9d5ac8258893efd02')
+options=(!strip emptydirs)
+
+package() {
+ install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ mkdir -p "${pkgdir}/usr/share/webapps"
+ cp -a nextcloud "${pkgdir}/usr/share/webapps/."
+
+ # set the proper permissions
+ "${srcdir}/set-nc-perms.sh" runtime "${pkgdir}/usr/share/webapps/nextcloud"
+
+ 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/occ "${pkgdir}/usr/bin/occ"
+}
+
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/set-nc-perms.sh b/set-nc-perms.sh
new file mode 100755
index 000000000000..849b565ad5ad
--- /dev/null
+++ b/set-nc-perms.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/env bash
+# from https://docs.nextcloud.org/server/9/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
+
+if [ -d "$2/apps" ]; then
+ ncpath="$2"
+else
+ ncpath='/usr/share/webapps/nextcloud'
+fi
+
+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}/occ
+
+ 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