2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
|
|
|
|
pkgname=nextcloud-app-client-push
|
|
|
|
_pkgname=notify_push
|
2021-09-16 22:00:32 +00:00
|
|
|
pkgver=0.2.4
|
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-09-16 22:00:32 +00:00
|
|
|
b2sums=('5136f254c51994924f89eb986ae77f0034b51ac9f8c09e5acb17cd9070e3a5f1241e9795d8fde05ce17ee383b56a95c92f84f871d2471ea5f5ec401578421dcf'
|
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
|
|
|
|
}
|