2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
|
|
|
|
pkgname=nextcloud-app-client-push
|
|
|
|
_pkgname=notify_push
|
2021-11-12 20:23:22 +00:00
|
|
|
pkgver=0.3.0
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="Push update support for Nextcloud clients"
|
|
|
|
arch=('x86_64')
|
2021-09-17 21:15:54 +00:00
|
|
|
url="https://apps.nextcloud.com/apps/notify_push"
|
2021-07-24 10:00:43 +00:00
|
|
|
license=('AGPL')
|
2021-08-05 02:04:32 +00:00
|
|
|
depends=('nextcloud')
|
2021-09-16 22:00:32 +00:00
|
|
|
makedepends=('rust')
|
2021-07-24 10:00:43 +00:00
|
|
|
optdepends=('redis: use a local redis server')
|
|
|
|
source=(
|
2021-09-17 21:15:54 +00:00
|
|
|
"$pkgname-$pkgver.tar.gz::https://github.com/nextcloud/notify_push/archive/v$pkgver.tar.gz"
|
|
|
|
'pacman.hook'
|
|
|
|
'systemd.service'
|
2021-07-24 10:00:43 +00:00
|
|
|
)
|
2021-11-12 20:23:22 +00:00
|
|
|
sha512sums=('3bfa1a292222e85f0d361dfdf0958aa57ab3469fe7ebe7eb6b4de850cea6ecc8b477a41f0c1268b6e974ec52299081d2129965b1adbbc7e3f390ff49b499f091'
|
|
|
|
'cfc10cd3855bc35479db17eaf2d0ba25bf6455061c1fef51384443bbfa447e2b23465641a6cfea6203d12d7d5d4a7fb7397bd197e1049ab149a663ffac684b9d'
|
|
|
|
'0bb33af48e813ae5389df0c731823cd86147bd1d92d937ad6675b0073e09d162ab0e2eaf16ac11a62ed9a7c794ea31e671371cc09f575ea0cf3bcfb8bf6be033')
|
|
|
|
b2sums=('e012e72bfd5bfcbe60c9dc5daa871a40b489e282e116c75822746992d8e73366900dce64c5f20516b807f682913b2c5962eb60b82d7e959a7a704d90c3676212'
|
2021-09-17 21:15:54 +00:00
|
|
|
'4ed61b199e995ecd29ef41505e8ce08a7e784c9e08350e2512b6cb6ad3b30d2601052d208e0d2f7d78e025971fa25a3091deb8eed232475bbd7155776ab99400'
|
|
|
|
'21f677df863f7d52b1fb5689e1270b1df592d4502d63fab21a922fe29191dc82402909b4c4b45b2f3f41e93965312fc375ec492ca44692dcab7aaa884f7300a9')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# kludgy workaround to specify target architecture
|
2021-09-17 21:15:54 +00:00
|
|
|
sed -i "s/ARCH/$CARCH/" systemd.service
|
2021-08-05 02:04:32 +00:00
|
|
|
|
|
|
|
cd "$_pkgname-$pkgver"
|
2021-09-16 22:00:32 +00:00
|
|
|
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$_pkgname-$pkgver"
|
2021-09-16 22:00:32 +00:00
|
|
|
cargo build --frozen --release --all-features
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd "$_pkgname-$pkgver"
|
2021-09-16 22:00:32 +00:00
|
|
|
cargo test --frozen --release --all-features
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2021-09-17 21:15:54 +00:00
|
|
|
# systemd integration
|
|
|
|
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
cd "$_pkgname-$pkgver"
|
|
|
|
|
|
|
|
# documentation
|
2021-09-17 21:15:54 +00:00
|
|
|
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
|
|
|
|
install -vDm644 "$srcdir/pacman.hook" \
|
|
|
|
"$pkgdir/usr/share/doc/$pkgname/$pkgname.hook"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
# app files
|
2021-09-17 21:15:54 +00:00
|
|
|
local _appdir="$pkgdir/usr/share/webapps/nextcloud/apps/$_pkgname"
|
|
|
|
install -vd "$_appdir"
|
|
|
|
cp -va . "$_appdir"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
# binary
|
2021-09-17 21:15:54 +00:00
|
|
|
install -vDm755 -t "$_appdir/bin/$CARCH" "target/release/$_pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-09-17 21:15:54 +00:00
|
|
|
# remove unnecessary files & folders
|
2021-07-24 10:00:43 +00:00
|
|
|
cd "$_appdir"
|
|
|
|
rm .dockerignore
|
|
|
|
cat .nextcloudignore | xargs echo rm -rf | sh
|
|
|
|
}
|