# Contributor: David Runge pkgname=nextcloud pkgver=11.0.1 pkgrel=2 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=('AGPL3') 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') validpgpkeys=('28806A878AE423A28372792ED75899B9A724937A') source=("https://download.nextcloud.com/server/releases/nextcloud-${pkgver}.tar.bz2"{,.asc} "apache.example.conf") sha512sums=('33bed146a984bd805a8648888db3fbe4f1bace3e59e64463ac66aedc6d73fa6ab231d83824eed8d551cd77dabfcdbc840c4fefd3d9a73cda82c7240705a43bdb' 'SKIP' '52af814809e1077f0713616d8758a2265d32acc202fa3440d8b4d85a584c18e792cce61fc9f78875f58d41557ea80132aa45c842427e63afac73f5d91e25ca1d') options=(!strip emptydirs) #prepare() { # cd nextcloud-${pkgver} #} package() { # copy nextcloud to webapps install -d "${pkgdir}/usr/share/webapps" cp -R "${srcdir}/${pkgname}" "${pkgdir}/usr/share/webapps/" # install missing folders install -d "${pkgdir}/usr/share/webapps/${pkgname}/"{data,assets,updater} # install apache example config file install -m644 -D "${srcdir}/apache.example.conf" -t "${pkgdir}/etc/webapps/${pkgname}" # move config directory to /etc/webapps/nextcloud/config and symlink to /usr/share/webapps/nextcloud mv "$pkgdir"/usr/share/webapps/${pkgname}/config "$pkgdir"/etc/webapps/${pkgname}/config chown -R http:http "$pkgdir"/etc/webapps/${pkgname} ln -s /etc/webapps/${pkgname}/config "$pkgdir"/usr/share/webapps/${pkgname}/config chown -R root:http "$pkgdir"/usr/share/webapps/${pkgname} # set permissions find "$pkgdir"/usr/share/webapps/${pkgname} -type f -exec chmod 0644 {} \; find "$pkgdir"/usr/share/webapps/${pkgname} -type d -exec chmod 0755 {} \; # make occ executable and symlink to /usr/bin chmod a+x "$pkgdir"/usr/share/webapps/${pkgname}/occ install -d "${pkgdir}/usr/bin" ln -s /usr/share/webapps/nextcloud/occ "${pkgdir}/usr/bin/occ" } # vim:set ts=2 sw=2 et: