[arch-commits] Commit in nextcloud-app-notify_push/repos (4 files)
Caleb Maclennan
alerque at gemini.archlinux.org
Fri May 20 19:30:04 UTC 2022
Date: Friday, May 20, 2022 @ 19:30:04
Author: alerque
Revision: 1209460
archrelease: copy trunk to community-testing-x86_64
Added:
nextcloud-app-notify_push/repos/community-testing-x86_64/
nextcloud-app-notify_push/repos/community-testing-x86_64/PKGBUILD
(from rev 1209459, nextcloud-app-notify_push/trunk/PKGBUILD)
nextcloud-app-notify_push/repos/community-testing-x86_64/nextcloud-app-notify_push.install
(from rev 1209459, nextcloud-app-notify_push/trunk/nextcloud-app-notify_push.install)
nextcloud-app-notify_push/repos/community-testing-x86_64/nextcloud-app-notify_push.service
(from rev 1209459, nextcloud-app-notify_push/trunk/nextcloud-app-notify_push.service)
-----------------------------------+
PKGBUILD | 108 ++++++++++++++++++++++++++++++++++++
nextcloud-app-notify_push.install | 12 ++++
nextcloud-app-notify_push.service | 10 +++
3 files changed, 130 insertions(+)
Copied: nextcloud-app-notify_push/repos/community-testing-x86_64/PKGBUILD (from rev 1209459, nextcloud-app-notify_push/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2022-05-20 19:30:04 UTC (rev 1209460)
@@ -0,0 +1,108 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Carlos Galindo < arch -at - cgj.es >
+
+pkgname=nextcloud-app-notify_push
+pkgver=0.4.0
+pkgrel=3
+pkgdesc='Update notifications for nextcloud clients'
+arch=(x86_64)
+url="https://github.com/nextcloud/${pkgname##*-}"
+license=(AGPL3)
+makedepends=(cargo
+ rsync)
+optdepends=('redis: use a local redis instance')
+options=(debug)
+install="$pkgname.install"
+groups=('nextcloud-apps')
+_archive="${pkgname##*-}-$pkgver"
+source=("$url/archive/v$pkgver/$_archive.tar.gz"
+ "$pkgname.service")
+sha256sums=('c53ccb6df9fd7319d9ec3a3c21b5a602666b88bd6e05e769dd9fc290eefa2df0'
+ 'b22b470f9e02d2bbe0c266431948daaadd7e7f007c27a989bdfcb063ee58fac6')
+
+# BEGIN boilerplate nextcloud app versioning code, see nextcloud-app-* packages
+makedepends+=(nextcloud ripgrep yq)
+_get_nextcloud_versions() {
+ _app_min_major_version="$(< appinfo/info.xml xq -r '.info.dependencies.nextcloud["@min-version"] | values')"
+ _app_max_major_version="$(< appinfo/info.xml xq -r '.info.dependencies.nextcloud["@max-version"] | values | tonumber | .+1')"
+}
+_get_php_versions() {
+ local _phps=(php7 php)
+ _app_min_php="$(< appinfo/info.xml xq -r '.info.dependencies.php["@min-version"] | values')"
+ _app_max_php="$(< appinfo/info.xml xq -r '.info.dependencies.php["@max-version"] | values | tonumber | .+0.1')"
+ _system_php=""
+ for _php in "${_phps[@]}"; do
+ if command -v "$_php" > /dev/null; then
+ _system_php="$_php"
+ break
+ fi
+ done
+}
+_nextcloud_app_check() {
+ _get_nextcloud_versions
+ _get_php_versions
+ local _nextcloud_major_version="$("$_system_php" <(cat /usr/share/webapps/nextcloud/version.php; echo 'print($OC_Version[0]);'))"
+ if [[ "$(vercmp "$_nextcloud_major_version" "$_app_min_major_version")" -lt 0 ]] \
+ || [[ "$(vercmp "$_nextcloud_major_version" "$_app_max_major_version")" -gt 0 ]] ; then
+ printf "%s requires nextcloud >= %s/ nextcloud <= %s, but nextcloud %s is provided.\n" \
+ "$pkgname" "$_app_min_major_version" "$_app_max_major_version" "$_nextcloud_major_version"
+ exit 1
+ fi
+ local _php_version="$("$_system_php" -r 'print(phpversion());')"
+ if [[ "$(vercmp "$_php_version" "$_app_min_php" )" -lt 0 ]]; then
+ printf "%s requires php-interpreter >= %s, but %s is provided\n" "$pkgname" "$_app_min_php" "$_php_version"
+ exit 1
+ fi
+ if [[ -n $_app_max_php ]]; then
+ if [[ "$(vercmp "$_php_version" "$_app_max_php" )" -ge 0 ]]; then
+ printf "%s requires php-interpreter < %s, but %s is provided\n" "$pkgname" "$_app_max_php" "$_php_version"
+ exit 1
+ fi
+ fi
+}
+_nextcloud_app_package() {
+ _get_nextcloud_versions
+ _get_php_versions
+ depends=("nextcloud>=$_app_min_major_version" "nextcloud<$_app_max_major_version")
+ [[ -z "$_app_min_php" ]] || depends+=("php-interpreter>=$_app_min_php")
+ [[ -z "$_app_max_php" ]] || depends+=("php-interpreter<$_app_max_php")
+ [[ -z "$_app_min_php" && -z "$_app_max_php" ]] || depends+=(php-interpreter)
+}
+# END boilerplate nextcloud app versioning code
+
+prepare() {
+ cd "$_archive"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+ sed -i -e "s/@ARCH@/$CARCH/" "../$pkgname.service"
+}
+
+build() {
+ cd "$_archive"
+ export CFLAGS+=" -ffat-lto-objects"
+ cargo build --frozen --release --all-features
+}
+
+check() {
+ cd "$_archive"
+ _nextcloud_app_check
+ cargo test --frozen --all-features
+}
+
+package() {
+ cd "$_archive"
+ _nextcloud_app_package
+ _appdir="$pkgdir/usr/share/webapps/nextcloud/apps/${pkgname##*-}"
+ rsync -a --mkpath \
+ --include='appinfo/***' \
+ --include='js/***' \
+ --include='lib/***' \
+ --include='templates/***' \
+ --include='vendor/***' \
+ --include=.php_cs.dist \
+ --include=webpack.common.js \
+ --include=webpack.prod.js \
+ --exclude='*' \
+ ./ $_appdir/
+ install -Dm0755 -t "$_appdir/bin/$CARCH/" "target/release/${pkgname##*-}"
+ install -Dm0644 -t "$pkgdir/usr/lib/systemd/system/" "$srcdir/$pkgname.service"
+}
Copied: nextcloud-app-notify_push/repos/community-testing-x86_64/nextcloud-app-notify_push.install (from rev 1209459, nextcloud-app-notify_push/trunk/nextcloud-app-notify_push.install)
===================================================================
--- community-testing-x86_64/nextcloud-app-notify_push.install (rev 0)
+++ community-testing-x86_64/nextcloud-app-notify_push.install 2022-05-20 19:30:04 UTC (rev 1209460)
@@ -0,0 +1,12 @@
+post_install() {
+ echo 'Remember to finish the setup for notify_push:'
+ echo ''
+ echo 'Enable and start the nextcloud-app-notify_push.service'
+ echo 'Setup your reverse proxy (see /usr/share/webapps/nextcloud/apps/notify_push/README.md)'
+ echo 'Run the setup with `occ notify_push:setup https://your.nextcloud.com/push`.'
+}
+
+post_upgrade() {
+ echo 'You may want to restart nextcloud-app-notify_push.service'
+ echo 'and re-check your setup with `occ notify_push:self-test`'
+}
Copied: nextcloud-app-notify_push/repos/community-testing-x86_64/nextcloud-app-notify_push.service (from rev 1209459, nextcloud-app-notify_push/trunk/nextcloud-app-notify_push.service)
===================================================================
--- community-testing-x86_64/nextcloud-app-notify_push.service (rev 0)
+++ community-testing-x86_64/nextcloud-app-notify_push.service 2022-05-20 19:30:04 UTC (rev 1209460)
@@ -0,0 +1,10 @@
+[Unit]
+Description = Push daemon for Nextcloud clients
+
+[Service]
+Environment = PORT=7867 BIND=127.0.0.1
+ExecStart = /usr/share/webapps/nextcloud/apps/notify_push/bin/@ARCH@/notify_push /etc/webapps/nextcloud/config/config.php
+User = nextcloud
+
+[Install]
+WantedBy = multi-user.target
More information about the arch-commits
mailing list