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')
|
|
|
|
url="https://github.com/nextcloud/notify_push"
|
|
|
|
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')
|
|
|
|
install="$pkgname.install"
|
|
|
|
source=(
|
|
|
|
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
|
|
|
|
"$pkgname.hook"
|
|
|
|
"$pkgname.service"
|
|
|
|
)
|
2021-09-16 22:00:32 +00:00
|
|
|
b2sums=('5136f254c51994924f89eb986ae77f0034b51ac9f8c09e5acb17cd9070e3a5f1241e9795d8fde05ce17ee383b56a95c92f84f871d2471ea5f5ec401578421dcf'
|
2021-07-24 10:00:43 +00:00
|
|
|
'1dd7720beba1482e1759f7dea8e9c07ae32f2107fc45fe94388993e66ad9a442771209af086b36e0cc50ab36e7a3990c6f3a120e24a525292f906e0d1a3434cd'
|
|
|
|
'28f2c102b1370ef7d9bc5bc736f71ccb4708e50285a1f6592535efe2ad0c301e99707021bdc4fe2be131082b1589329334b30ad0ad1e6a6764c189fb4f287170')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# kludgy workaround to specify target architecture
|
|
|
|
sed -i "s/ARCH/$CARCH/" "$pkgname.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() {
|
|
|
|
local _appdir="$pkgdir/usr/share/webapps/nextcloud/apps/$_pkgname"
|
|
|
|
cd "$_pkgname-$pkgver"
|
|
|
|
|
|
|
|
# documentation
|
|
|
|
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" \
|
|
|
|
README.md \
|
|
|
|
"$srcdir/$pkgname.hook"
|
|
|
|
|
|
|
|
# app files
|
|
|
|
install -d "$_appdir"
|
|
|
|
cp -a . "$_appdir"
|
|
|
|
|
|
|
|
# binary
|
|
|
|
install -Dm755 -t "$_appdir/bin/$CARCH" "target/release/$_pkgname"
|
|
|
|
|
|
|
|
# systemd integration
|
|
|
|
install -Dm644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/$pkgname.service"
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
cd "$_appdir"
|
|
|
|
rm .dockerignore
|
|
|
|
cat .nextcloudignore | xargs echo rm -rf | sh
|
|
|
|
}
|