onlyoffice-bin 8.2.0

This commit is contained in:
Евгений Храмов 2024-11-01 11:00:16 +03:00
parent bc51ab07ec
commit d6eefef2c8

@ -1,6 +1,6 @@
name='onlyoffice-bin'
version='8.2.0'
release='1'
release='2'
desc='An office suite that combines text, spreadsheet and presentation editors'
homepage='https://www.onlyoffice.com/'
maintainer="Евгений Храмов <xpamych@yandex.ru>"
@ -21,10 +21,11 @@ sources=("https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v${vers
checksums=('SKIP')
prepare() {
cd $srcdir
mkdir -p "onlyoffice-${version}/pkg"
bsdtar -xf "${srcdir}/onlyoffice-desktopeditors_amd64.deb" -C "onlyoffice-${version}"
bsdtar -xf "onlyoffice-${version}/data.tar.xz" -C "onlyoffice-${version}/pkg"
patch -d onlyoffice-${version}/pkg -Np1 -i "${scriptdir}/010-onlyoffice-bin-fix-document-opening.patch"
patch -d ./onlyoffice-${version}/pkg -Np1 -i "${scriptdir}/010-onlyoffice-bin-fix-document-opening.patch"
}
scripts=(
@ -34,14 +35,16 @@ scripts=(
package() {
cd $srcdir
cp -dr --no-preserve='ownership' "onlyoffice-${version}"/pkg/* "$pkgdir"
# icons
local icon_size icon_dir
for icon_size in 16 32 48 64 128 256 512; do
icon_dir="${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps"
install -d "${icon_dir}"
install -m644 "${srcdir}/onlyoffice-${version}/pkg/opt/onlyoffice/desktopeditors/asc-de-${icon_size}.png" "${icon_dir}/onlyoffice-desktopeditors.png"
done
_file
_res
while read -r -d '' _file
do
_res="$(sed 's/\.png$//;s/^.*-//' <<< "$_file")"
install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps"
ln -s "../../../../../../opt/onlyoffice/desktopeditors/asc-de-${_res}.png" \
"${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps/onlyoffice-desktopeditors.png"
done < <(find "${pkgdir}/opt/onlyoffice/desktopeditors" -maxdepth 1 -type f -name 'asc-de-*.png' -print0)
rename_directories() {
for dir in "$1"/*; do