mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-11-24 01:22:18 -05:00
Add nextcloud
This commit is contained in:
parent
35dc2f1141
commit
17b81b4b48
37
src/nextcloud/.SRCINFO
Normal file
37
src/nextcloud/.SRCINFO
Normal file
@ -0,0 +1,37 @@
|
||||
# Generated by mksrcinfo v8
|
||||
# Wed Oct 5 10:23:00 UTC 2016
|
||||
pkgbase = nextcloud
|
||||
pkgdesc = A safe home for all your data. Secure, under your control and developed in an open, transparent and trustworthy way
|
||||
pkgver = 10.0.1
|
||||
pkgrel = 1
|
||||
url = https://nextcloud.com
|
||||
install = nextcloud.install
|
||||
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
|
||||
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 = https://download.nextcloud.com/server/releases/nextcloud-10.0.1.tar.bz2
|
||||
source = https://download.nextcloud.com/server/releases/nextcloud-10.0.1.tar.bz2.asc
|
||||
source = apache.example.conf
|
||||
source = set-nc-perms.sh
|
||||
md5sums = dc30ee58858d4f6f2373472264f7d147
|
||||
md5sums = SKIP
|
||||
md5sums = bc2b02b0562b7a58e660e33acd4202bc
|
||||
md5sums = 0c996a76cf39b2bccde8d74ac062895e
|
||||
|
||||
pkgname = nextcloud
|
||||
|
8
src/nextcloud/.gitignore
vendored
Normal file
8
src/nextcloud/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
*.tar.bz2
|
||||
*.asc
|
||||
*.pkg.tar.xz
|
||||
*.patch
|
||||
*.pkg.tar
|
||||
|
||||
pkg/
|
||||
src/
|
62
src/nextcloud/PKGBUILD
Normal file
62
src/nextcloud/PKGBUILD
Normal file
@ -0,0 +1,62 @@
|
||||
# Maintainer: Grey Christoforo <first name [at] last name [dot] net>
|
||||
|
||||
pkgname=nextcloud
|
||||
pkgver=10.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="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=('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'
|
||||
'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=('28806A878AE423A28372792ED75899B9A724937A')
|
||||
source=("https://download.nextcloud.com/server/releases/nextcloud-${pkgver}.tar.bz2"{,.asc}
|
||||
"apache.example.conf"
|
||||
"set-nc-perms.sh")
|
||||
|
||||
md5sums=('dc30ee58858d4f6f2373472264f7d147'
|
||||
'SKIP'
|
||||
'bc2b02b0562b7a58e660e33acd4202bc'
|
||||
'0c996a76cf39b2bccde8d74ac062895e')
|
||||
_fetchedMD5=$(curl -sS https://download.nextcloud.com/server/releases/nextcloud-${pkgver}.tar.bz2.md5)
|
||||
IFS=' '; _arrFetchedMD5=($_fetchedMD5); unset IFS;
|
||||
_fetchedMD5=${_arrFetchedMD5[0]}
|
||||
md5sums[0]=$_fetchedMD5
|
||||
|
||||
options=(!strip emptydirs)
|
||||
|
||||
#prepare() {
|
||||
# cd nextcloud-${pkgver}
|
||||
#}
|
||||
|
||||
package() {
|
||||
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
cp "${srcdir}/nextcloud/COPYING-AGPL" "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/share/webapps"
|
||||
cp -a nextcloud "${pkgdir}/usr/share/webapps/."
|
||||
|
||||
find "${pkgdir}/usr/share/webapps/nextcloud/" -type f -print0 | xargs -0 chmod 0640
|
||||
find "${pkgdir}/usr/share/webapps/nextcloud/" -type d -print0 | xargs -0 chmod 0750
|
||||
chmod 0664 "${pkgdir}/usr/share/webapps/nextcloud/.user.ini"
|
||||
chmod 0664 "${pkgdir}/usr/share/webapps/nextcloud/.htaccess"
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
15
src/nextcloud/apache.example.conf
Normal file
15
src/nextcloud/apache.example.conf
Normal file
@ -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>
|
10
src/nextcloud/nextcloud.install
Normal file
10
src/nextcloud/nextcloud.install
Normal file
@ -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
|
||||
}
|
57
src/nextcloud/set-nc-perms.sh
Executable file
57
src/nextcloud/set-nc-perms.sh
Executable file
@ -0,0 +1,57 @@
|
||||
#!/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
|
||||
|
||||
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}/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
|
Loading…
Reference in New Issue
Block a user