cruxports/libreoffice-bin/Pkgfile

48 lines
1.6 KiB
Plaintext

# Description: a powerful office suite, compiled upstream
# URL: https://www.libreoffice.org/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: gtk3 freetype avahi cups nss nspr
# Optional: qt5 sane
name=libreoffice-bin
Name=LibreOffice
version=7.3.7
release=1
source=(https://download.documentfoundation.org/${name%-bin}/stable/$version/rpm/x86_64/${Name}_${version}_Linux_x86-64_rpm.tar.gz)
build() {
cd ${Name}*/RPMS
for RPM in *.rpm; do
[[ $RPM =~ "-firebird-" ]] && continue
[[ $RPM =~ "-report-builder-" ]] && continue
[[ $RPM =~ "-mediawiki-" ]] && continue
[[ $RPM =~ "-mediawiki-" ]] && continue
[[ $RPM =~ "-onlineupdate-" ]] && continue
[[ $RPM =~ "-kde-integration-" ]] && continue
[[ $RPM =~ "-postgresql-" ]] && continue
[[ $RPM =~ "-nlpsolver-" ]] && continue
[[ $RPM =~ "-ooofonts-" ]] && continue
[[ $RPM =~ "-ogltrans-" ]] && continue
[[ $RPM =~ "-javascript-" ]] && continue
[[ $RPM =~ "-beanshell-" ]] && continue
[[ $RPM =~ "-dict-" ]] && [[ ! $RPM =~ "-dict-${LANG:0:2}" ]] && continue
bsdtar -p -C $PKG -xf "$RPM"
done
mv "$PKG/opt" "$PKG/usr/lib"
find "$PKG" -type d -perm 700 -exec chmod 755 {} +
rm -f "$PKG"/usr/share/applications/*.desktop
cd "$PKG"/usr/share/applications
for APP in ../../lib/libreoffice7.3/share/xdg/*.desktop; do
ln -sf $APP libreoffice7.3-${APP##*/}
done
# clean up junk files
rm -rf "$PKG"/usr/lib/libreoffice7.3/readmes
find "$PKG" \( -name "README*" -o -name "LICENSE*" -o -name "NOTICE*" \
-o -name "COPYING*" \) -exec rm {} +
find "$PKG" -name "wininst*.exe" -exec rm {} +
}