aur/nextcloud/PKGBUILD
drone 346c961af6
All checks were successful
ci/woodpecker/cron/woodpecker Pipeline was successful
nextcloud: update to 28.0.0 [CI SKIP]
2023-12-13 00:09:34 +00:00

145 lines
7.4 KiB
Bash

# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: David Runge <dvzrv@archlinux.org>
pkgname=nextcloud
# NOTE: always check first whether the version is supposed to be packaged:
# https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule
pkgver=28.0.0
pkgrel=1
pkgdesc="A cloud server to store your files centrally on a hardware controlled by you"
arch=(any)
url="https://nextcloud.com"
license=(AGPL3)
makedepends=(php)
optdepends=(
'curl: for webcron jobs from within uwsgi'
'ffmpeg: for preview generation'
'libreoffice: for preview generation'
'mariadb: to use a local MariaDB server'
'memcached: to use a local memcached server'
'mod_itk: to use the Apache web server'
'postgresql: to use a local PostgreSQL server'
'redis: to use a local Redis server'
'smbclient: for SMB/CIFS integration'
'sudo: for privilege elevation in occ command when not run as root'
)
backup=(
etc/webapps/$pkgname/config/config.php
etc/webapps/$pkgname/.htaccess
etc/uwsgi/$pkgname.ini
)
# there are no elf files, no need to strip anything
options=(!strip)
install=$pkgname.install
source=(
https://download.nextcloud.com/server/releases/$pkgname-$pkgver.tar.bz2{,.asc}
apache.example.conf
$pkgname.config.php
$pkgname.hook
$pkgname.occ.sh
$pkgname.sysusers
$pkgname.tmpfiles
$pkgname.uwsgi
$pkgname-cron.service
$pkgname-cron.timer
)
sha512sums=('84f543bb73982fe302925837f2def3166e2965c8bccf52650684f6f4c17cd7e009184ce423eb987da181570bcc6cfe80afdb6900cb03d01db03e1c44ecdc8f5b'
'SKIP'
'5f9be223225e6ad2772989c440df8585a852ea0be697274384064ec73df47dab2f5d0847c275732fab26c419a713911d8f77ebc2b639bf6e8ede76272b752cde'
'92592f9a76ee534d0ae6d3aedf2257c147337debe7e2d6dbec1daff66a682e3abc74611e08662058de314bf3ea6ff1c85efd678674b782d71251c38786e446f9'
'2791382d7b005c64cd6938695f273e83435cc5f1b785fe7d44d6dbd69864c502847e45d93c4a5f6752a759a660118279e3e22e5bc32f79b8775693fde603a9c5'
'0bd4fc8f80b36ad40cfd6475aa3bb82c6055b8349bac0a6904f5b829932dbab08ff9f11596f274ef5d5efccd579edff984607170bee970dd8d49375d8fdd2ea1'
'1d06f339c43d57e5f5406c2698b815241fd9e39039a9e55f777face510c9a5ddae5ccd4e051393e8f16f391301a6aa03fff2462837a2d3441d969ea7195e7d84'
'919008a2bf6cf2492cb1e9c8e28c1e082d74e45da5a96e6669f8971d6cf721e36d23625c89918fe10d8bc1b202c0340aa897849d9ec501a26f3f4572ccb57a98'
'532737bc6c9fb4af4c6d34ac5ce488451d21847b89acbfe74ce9775b038ace274bb0039ed59e76ab48269c444248b7c906a79d3f327a6cc09a766f81b2270dd2'
'66f542d8b84701d81e6f6d896163faa232996ee081bcabe4acc121064ef538b5c1ea43728222b5cadc60a5d433b1e54ad7c1fe9d1d188ffa8eaf331fd4cd8ec0'
'eb69785a5b0df0e2a11f53f9c2e2dbf75681d7c698e88cbcc5ceed713a558d528511cc576813cc083cbaa28a2c83d543a39436ad4805670348ef22634305b1c8')
b2sums=('fb2d88ace6c05a17995817258a5cf51abb42886af5835b51edc36b4338ada7d88c1537e1ad3032f639c4cead8cc3e870bba41b3238dbe46a2079ce4de25bc77e'
'SKIP'
'7d40d120c28291f1a7537f3e1b5049fa83c9c0af949371345ea9ccdf3de4a0f3a3a06edbc52d9254dba483e4d11acf562cf679b9e379c5dfc2f61dfbfc2e4cef'
'4ad061efbc20b4d0e9f8cfd01c5e8e612fa5af29bce754b77f90c1835b98ee445ef4de3d8c83da91461053622620af14d880eb9014b51f2383c75f1860d479f4'
'c69f18de513562e32f0f655fee7ef81877d74a76717e2eaad9a13882bf8edd0dad99bec5958e460a4ec32eecfdd425ae009d11ac27af16a3ad1d6498282be32f'
'43aeee02f45335088f9e4bb3893c8344ae63f0e7504246c033e74a785de07a661a78eb791f4313bf1d51f4dffacb3a14876c7f5ea4e339af9d199d1a501d6588'
'1a61a89531636b65dade03cd7edca8747b3e1e880f9bbd4d5a53cffa452d70fe17e345cfed739ae92e99e336d4c1f2633c84a5c84a4ee6da518762bf1396b1db'
'd132044cb7f1d61a1ce87800d2e1142e3ac385acdec25e2f5ad685603a0ffa88e105f4c35688584d65d287adbb40b8d9a02d6a80d7a0b58bb8801a6769405218'
'2b73e7bed7d1a0e5eb735fe4168708a46aa00cf4d56241d0e3b4e5cf753f4f6a1f259875011a30a764ac43c5cb051ba311bbf3e4ea7e4e2b21595ca7bf1419b9'
'a84fbdc9b5caf28eae6bfb147ea0c77e4cfc5a42f29b3fe93c0ecf8414f95ed20999a131efb7c7ba49041304fe7104813c574e6b5aaa6b03881aea3428144f33'
'e6214351ca16bfe97683e838e727d6b5eaa62194878272204034c62aac4a632c9b33cd31aa0570c2eb936d7e9e7ff60190ac05a3a8cc2e27eda423a7d89b6d39')
validpgpkeys=('28806A878AE423A28372792ED75899B9A724937A') # Nextcloud Security <security@nextcloud.com>
prepare() {
local _file
truncate -s 0 nextcloud/lib/versioncheck.php
# setup custom files with default PHP interpreter, etc.
install -vDm 644 nextcloud.{occ.sh,uwsgi} nextcloud-cron.service -t custom_files/
for _file in custom_files/*; do
sed -e "s/PHP_INTERPRETER/php/g;s/UWSGI_PLUGIN/php/g" -i $_file
done
}
package() {
depends=("php")
# NOTE: this sets a custom php postfix based on whether php-legacy needs to be used
depends+=("php-gd")
# NOTE: due to weird makepkg checks we can't add optdepends with dynamically derived contents directly
_optdepends=(
"php-apcu: for caching with APCU"
"php-apache: to use the Apache web server"
"php-fpm: to run in fastCGI process manager"
"php-imagick: for preview generation"
"php-imap: for external user authentication"
"php-intl: to increase language translation performance and fix sorting"
"php-memcached: for caching with memcached"
"php-pgsql: to use the PostgreSQL database backend"
"php-redis: for caching with redis"
"php-sqlite: to use the SQLite database backend"
"uwsgi-plugin-php: run as application container"
)
optdepends+=("${_optdepends[@]}")
cd $pkgname
# sysusers.d integration
install -vDm 644 ../$pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# tmpfiles.d integration
install -vDm 644 ../$pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
# state dir for data and writable apps
install -vdm 755 "$pkgdir/var/lib/$pkgname/"
install -vdm 770 "$pkgdir/var/lib/$pkgname/data"
install -vdm 755 "$pkgdir/var/lib/$pkgname/apps"
# log dir
install -vdm 755 "$pkgdir/var/log/$pkgname/"
# uwsgi integration
install -vDm 644 ../custom_files/$pkgname.uwsgi "$pkgdir/etc/uwsgi/$pkgname.ini"
# config dir
install -vDm 644 .htaccess -t "$pkgdir/etc/webapps/$pkgname/"
install -vDm 640 ../$pkgname.config.php "$pkgdir/etc/webapps/$pkgname/config/config.php"
find config -type f -exec install -vDm 644 {} "$pkgdir/etc/webapps/$pkgname/"{} \;
# remove config dir and .htaccess from source so that it is not installed to default location
rm -rf config .htaccess
# webapp
find . -type f -not -iname "*.orig" -exec install -vDm 644 {} "$pkgdir/usr/share/webapps/$pkgname/"{} \;
# symlink config directory into place
ln -sv /etc/webapps/$pkgname/config "$pkgdir/usr/share/webapps/$pkgname/"
# symlink .htaccess file into place
ln -sv /etc/webapps/$pkgname/.htaccess "$pkgdir/usr/share/webapps/$pkgname/"
# add symlink to default writable apps directory
ln -sv /var/lib/$pkgname/apps "$pkgdir/usr/share/webapps/$pkgname/wapps"
# install occ command
install -vDm 755 occ -t "$pkgdir/usr/share/webapps/$pkgname/"
# occ script
install -vDm 755 ../custom_files/$pkgname.occ.sh "$pkgdir/usr/bin/occ"
# optional pacman hook
install -vDm 644 ../$pkgname.hook -t "$pkgdir/usr/share/doc/$pkgname/"
# apache example conf
install -vDm 644 ../apache.example.conf -t "$pkgdir/usr/share/doc/$pkgname/"
# systemd service
install -vDm 644 ../custom_files/$pkgname-cron.service -t "$pkgdir/usr/lib/systemd/system/"
install -vDm 644 ../$pkgname-cron.timer -t "$pkgdir/usr/lib/systemd/system/"
}