123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- # Template file for 'openoffice'
- pkgname=openoffice
- version=4.1.14
- revision=1
- _vmaj=4
- _lang=en-US
- archs="x86_64 i686"
- create_wrksrc=yes
- depends="desktop-file-utils hicolor-icon-theme freetype glibc gtk+ shared-mime-info"
- short_desc="Free and Open Productivity Suite"
- maintainer="MarcoAPC <marcoaureliopc@gmail.com>"
- license="Apache-2.0"
- homepage="https://www.openoffice.org"
- nostrip=yes
- # To install different language version adjust the following lines: _lang and checksum.
- # available: ast, bg, ca, ca-XR, ca-XV, cs, da, de, el, en-GB, en-US, es, eu, fi, fr, gd, gl, he, hi, hu, it, ja, km, ko, lt, nb, nl, pl, pt, pt-BR, ru, SDK, sk, sl, sr, sv, ta, th, tr, vi, zh-CN, zh-TW
- case "$XBPS_TARGET_MACHINE" in
- x86_64)
- distfiles="https://downloads.apache.org/openoffice/${version}/binaries/${_lang}/Apache_OpenOffice_${version}_Linux_x86-64_install-rpm_${_lang}.tar.gz"
- checksum=680614656e1c5625b39111af37ff2e144b90cf0b3028c6e7d63bbd41ffc5863e
- ;;
- i686)
- distfiles="https://downloads.apache.org/openoffice/${version}/binaries/${_lang}/Apache_OpenOffice_${version}_Linux_x86_install-rpm_${_lang}.tar.gz"
- checksum=f20abdd86b9fbf4518fa80955048c0d6098569d78340b06c9567029509b03652
- ;;
- *)
- broken="No distfiles available for this target"
- ;;
- esac
- do_install() {
- _source_dirs=${_lang}/RPMS
- local dir file
- for dir in "${_source_dirs[@]}"; do
- dir=${wrksrc}/${dir}
- ( cd "${dir}" ) # check existing
- for file in $( find "${dir}" -type f -name '*.rpm' ); do
- echo "Extracting ${file##*/}"
- bsdtar -xf "${file}"
- if ! [[ $file == */desktop-integration/* && $file != *-freedesktop-menus-* ]] &&
- ! [[ $file == */jre-* ]]; then
- echo "${file}"
- elif type -p msg >/dev/null; then
- echo "Skipping ${file##*/}" >&2
- else
- echo "Skipping ${file##*/}" >&2
- fi
- done
- done
- # remove symlink to avoid conflict with libreoffice-common
- # (not used in the desktop files)
- [[ -h usr/bin/soffice ]] && rm -f usr/bin/soffice
- sed -i -re "1s;^#! *(/usr(/local)?)?/bin/(env +)?python(2[^ ]*)?( |$);#!/usr/bin/env python2 ;" $(
- find opt/openoffice${_vmaj}/program/python-core-2.7.18/lib -type f -name '*.py'
- )
- # Remove unused
- rm -rf usr/share/application-registry
- rm -rf usr/share/applnk-redhat
- rm -rf usr/lib/menu
- vcopy opt /
- vcopy usr /
- }
|