33 lines
1.6 KiB
Bash
33 lines
1.6 KiB
Bash
# Maintainer: Carlos Galindo < arch -at - cgj.es >
|
|
_appname=onlyoffice
|
|
pkgname=nextcloud-app-onlyoffice
|
|
pkgver=7.6.8
|
|
pkgrel=1
|
|
pkgdesc="ONLYOFFICE connector allows you to view, edit and collaborate using ONLYOFFICE Docs."
|
|
arch=("any")
|
|
url="https://github.com/ONLYOFFICE/onlyoffice-nextcloud"
|
|
license=('AGPL3')
|
|
makedepends=('yq')
|
|
source=("$_appname-nextcloud-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
|
|
"onlyoffice-document-templates-main-new.tar.gz::https://github.com/ONLYOFFICE/document-templates/archive/main/new.tar.gz")
|
|
sha512sums=('f8932525fff3c98ed2348e3ef8f943b44eecf5cd0b4d37ef84897a4fa1ad81845e04faebd26d7ba7416436aa6080ce4d7f3eba494fec970ac2485d9ac697209b'
|
|
'0d4239ea9d9f7848afe4eb192b67bfae5e56e7614d38eb6970cf6a54651f1a32c5e30d229e2c63b98530fc98e87f0e395d051234f33514109dc17bf1ca694b11')
|
|
|
|
_get_nextcloud_versions() {
|
|
_app_min_major_version="$(xq '.info.dependencies.nextcloud["@min-version"]' "${_appname}-nextcloud-$pkgver/appinfo/info.xml"| sed 's/"//g')"
|
|
_app_max_major_version="$(xq '.info.dependencies.nextcloud["@max-version"]' "${_appname}-nextcloud-$pkgver/appinfo/info.xml"| sed 's/"//g')"
|
|
_app_max_major_version=$(expr ${_app_max_major_version} + 1)
|
|
}
|
|
|
|
package() {
|
|
local _app_min_major_version
|
|
local _app_max_major_version
|
|
_get_nextcloud_versions
|
|
|
|
depends=("nextcloud>=$_app_min_major_version" "nextcloud<$_app_max_major_version")
|
|
local _appsdir="$pkgdir/usr/share/webapps/nextcloud/apps"
|
|
mkdir -p "$_appsdir"
|
|
cp -a "$_appname-nextcloud-$pkgver" "$_appsdir/$_appname"
|
|
rmdir "$_appsdir/$_appname/assets"
|
|
cp -a document-templates-main-new "$_appsdir/$_appname/assets"
|
|
}
|