upgpkg: nextcloud-app-client-push
Simplify package.
This commit is contained in:
parent
ebd9993ceb
commit
511e623042
5 changed files with 20 additions and 44 deletions
|
@ -6,24 +6,23 @@ pkgver=0.2.4
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Push update support for Nextcloud clients"
|
pkgdesc="Push update support for Nextcloud clients"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/nextcloud/notify_push"
|
url="https://apps.nextcloud.com/apps/notify_push"
|
||||||
license=('AGPL')
|
license=('AGPL')
|
||||||
depends=('nextcloud')
|
depends=('nextcloud')
|
||||||
makedepends=('rust')
|
makedepends=('rust')
|
||||||
optdepends=('redis: use a local redis server')
|
optdepends=('redis: use a local redis server')
|
||||||
install="$pkgname.install"
|
|
||||||
source=(
|
source=(
|
||||||
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
|
"$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/notify_push/archive/v$pkgver.tar.gz"
|
||||||
"$pkgname.hook"
|
'pacman.hook'
|
||||||
"$pkgname.service"
|
'systemd.service'
|
||||||
)
|
)
|
||||||
b2sums=('5136f254c51994924f89eb986ae77f0034b51ac9f8c09e5acb17cd9070e3a5f1241e9795d8fde05ce17ee383b56a95c92f84f871d2471ea5f5ec401578421dcf'
|
b2sums=('5136f254c51994924f89eb986ae77f0034b51ac9f8c09e5acb17cd9070e3a5f1241e9795d8fde05ce17ee383b56a95c92f84f871d2471ea5f5ec401578421dcf'
|
||||||
'1dd7720beba1482e1759f7dea8e9c07ae32f2107fc45fe94388993e66ad9a442771209af086b36e0cc50ab36e7a3990c6f3a120e24a525292f906e0d1a3434cd'
|
'4ed61b199e995ecd29ef41505e8ce08a7e784c9e08350e2512b6cb6ad3b30d2601052d208e0d2f7d78e025971fa25a3091deb8eed232475bbd7155776ab99400'
|
||||||
'28f2c102b1370ef7d9bc5bc736f71ccb4708e50285a1f6592535efe2ad0c301e99707021bdc4fe2be131082b1589329334b30ad0ad1e6a6764c189fb4f287170')
|
'21f677df863f7d52b1fb5689e1270b1df592d4502d63fab21a922fe29191dc82402909b4c4b45b2f3f41e93965312fc375ec492ca44692dcab7aaa884f7300a9')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
# kludgy workaround to specify target architecture
|
# kludgy workaround to specify target architecture
|
||||||
sed -i "s/ARCH/$CARCH/" "$pkgname.service"
|
sed -i "s/ARCH/$CARCH/" systemd.service
|
||||||
|
|
||||||
cd "$_pkgname-$pkgver"
|
cd "$_pkgname-$pkgver"
|
||||||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||||||
|
@ -40,25 +39,25 @@ check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
local _appdir="$pkgdir/usr/share/webapps/nextcloud/apps/$_pkgname"
|
# systemd integration
|
||||||
|
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||||
|
|
||||||
cd "$_pkgname-$pkgver"
|
cd "$_pkgname-$pkgver"
|
||||||
|
|
||||||
# documentation
|
# documentation
|
||||||
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" \
|
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
|
||||||
README.md \
|
install -vDm644 "$srcdir/pacman.hook" \
|
||||||
"$srcdir/$pkgname.hook"
|
"$pkgdir/usr/share/doc/$pkgname/$pkgname.hook"
|
||||||
|
|
||||||
# app files
|
# app files
|
||||||
install -d "$_appdir"
|
local _appdir="$pkgdir/usr/share/webapps/nextcloud/apps/$_pkgname"
|
||||||
cp -a . "$_appdir"
|
install -vd "$_appdir"
|
||||||
|
cp -va . "$_appdir"
|
||||||
|
|
||||||
# binary
|
# binary
|
||||||
install -Dm755 -t "$_appdir/bin/$CARCH" "target/release/$_pkgname"
|
install -vDm755 -t "$_appdir/bin/$CARCH" "target/release/$_pkgname"
|
||||||
|
|
||||||
# systemd integration
|
# remove unnecessary files & folders
|
||||||
install -Dm644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/$pkgname.service"
|
|
||||||
|
|
||||||
# cleanup
|
|
||||||
cd "$_appdir"
|
cd "$_appdir"
|
||||||
rm .dockerignore
|
rm .dockerignore
|
||||||
cat .nextcloudignore | xargs echo rm -rf | sh
|
cat .nextcloudignore | xargs echo rm -rf | sh
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Specify path to Nextcloud's config.php
|
|
||||||
NC_CLIENT_PUSH_ARGS="/etc/webapps/nextcloud/config/config.php"
|
|
||||||
|
|
||||||
# If using the config.php isn't possible, you can configure the push server by
|
|
||||||
# setting the following environment variables:
|
|
||||||
#PORT=7867 Listen port for push server
|
|
||||||
#SOCKET_PATH=/run/nextcloud/push.sock
|
|
||||||
#DATABASE_URL connection url for the Nextcloud database, e.g. postgres://user:password@db_host/db_name
|
|
||||||
#DATABASE_PREFIX database prefix configured in Nextcloud, e.g. oc_
|
|
||||||
#REDIS_URL connection url for redis, e.g. redis://redis_host
|
|
||||||
#NEXTCLOUD_URL url for the nextcloud instance, e.g. https://cloud.example.com
|
|
||||||
#LOG log level of the push server, e.g. error, warn, info, debug or trace
|
|
||||||
#METRICS_PORT Exposes Prometheus-compatible metrics on configured port if set
|
|
||||||
#ALLOW_SELF_SIGNED Disable certificate verification by setting this to true
|
|
||||||
|
|
||||||
# If both the config.php and environment variables are provided, the environment
|
|
||||||
# variables will overwrite the value from config.php
|
|
|
@ -1,7 +0,0 @@
|
||||||
post_install() {
|
|
||||||
echo "Run systemctl enable --now nextcloud-app-client-push.service"
|
|
||||||
echo "Enable the Nextcloud app via 'occ app:enable notify_push'"
|
|
||||||
echo "Set up the push server via 'occ notify_push:setup https://cloud.example.com/push'"
|
|
||||||
echo "Perform a self check via 'occ notify_push:self-test"
|
|
||||||
echo "See /usr/share/doc/nextcloud-app-client-push for README.md and a pacman hook"
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copy, move or symlink this file in /usr/share/libalpm/hooks/ to force a
|
# Copy or symlink this file in /usr/share/libalpm/hooks/ to force a
|
||||||
# restart when nextcloud-app-client-push is updated.
|
# restart when nextcloud-app-client-push is updated.
|
||||||
|
|
||||||
[Trigger]
|
[Trigger]
|
|
@ -1,5 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Push daemon for Nextcloud clients
|
Description=Push daemon for Nextcloud clients
|
||||||
|
Documentation=https://apps.nextcloud.com/apps/notify_push https://github.com/nextcloud/notify_push
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# If NC_CLIENT_PUSH_ARGS needs to be adjusted, it should be adjusted
|
# If NC_CLIENT_PUSH_ARGS needs to be adjusted, it should be adjusted
|
Loading…
Reference in a new issue