arcolinux

openoffice 4.1.7

Oct 12th, 2019
371
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Bernhard Landauer <oberon@manjaro.org>
  2. # Maintainer: Sibren Vasse <arch at sibrenvasse dot nl>
  3. # Contributor: Dominic Finke <arch at realbig dot de>
  4.  
  5. ## To install different language version adjust the following line.
  6. ## 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
  7. _lang=en-US
  8.  
  9. pkgname=openoffice
  10. _vmaj=4
  11. _vmin=1.7
  12. pkgver=$_vmaj.$_vmin
  13. pkgrel=1
  14. _path=opt/$pkgname$_vmaj
  15. pkgdesc="Apache OpenOffice"
  16. arch=('i686' 'x86_64')
  17. url="http://www.openoffice.org"
  18. license=('Apache')
  19. depends=('freetype2'
  20. 'glibc>=2.5'
  21. 'gtk2>=2.10.4'
  22. 'hicolor-icon-theme'
  23. 'desktop-file-utils'
  24. 'shared-mime-info')
  25. optdepends=('apr-util: adds apr support'
  26. 'java-environment: adds java support'
  27. 'gconf: adds additional gnome support'
  28. 'gstreamer0.10-base: some gstr-plugins to support multimedia content, e.g. in impress'
  29. 'mesa: for the OGLTrans extension of impress'
  30. 'mime-types: provides /etc/mime.types'
  31. 'nss: adds support for signed files/macros'
  32. 'openoffice-de-bin: adds additional German language pack'
  33. 'python2: adds python support'
  34. 'raptor1: adds rdf support'
  35. 'sqlite: adds sqlite support')
  36. conflicts=('openoffice-base-bin-unstable')
  37. replaces=('openoffice-base-bin')
  38. backup=("$_path/program/sofficerc")
  39. options=(!strip docs)
  40. _durl="http://apache.org/dist/$pkgname/$pkgver/binaries/$_lang/Apache_OpenOffice_${pkgver}_Linux_x86"
  41. source_i686=("v$pkgver-i686::${_durl}_install-rpm_en-US.tar.gz")
  42. source_x86_64=("v$pkgver-x86_64::${_durl}-64_install-rpm_en-US.tar.gz")
  43. md5sums_i686=('650016711ab925eb0350c4d2fbbecd92')
  44. md5sums_x86_64=('f71d8bbc7c1901e808e7c5d5e6eaa051')
  45.  
  46. _source_dirs=$_lang/RPMS
  47.  
  48. _find_rpms() {
  49. local dir file
  50. for dir in "${_source_dirs[@]}"; do
  51. dir=${srcdir:-src}/${dir}
  52. ( cd "${dir}" ) # check existing
  53. for file in $( find "${dir}" -type f -name '*.rpm' ); do
  54. if ! [[ $file == */desktop-integration/* && $file != *-freedesktop-menus-* ]] &&
  55. ! [[ $file == */jre-* ]]; then
  56. echo "${file}"
  57. elif type -p msg >/dev/null; then
  58. msg "Skipping ${file##*/}" >&2
  59. else
  60. echo "Skipping ${file##*/}" >&2
  61. fi
  62. done
  63. done
  64. }
  65.  
  66. _ln_s_t() {
  67. local dir=$1 prefix=$2
  68. shift 2
  69. mkdir -p "$dir"
  70. local file
  71. for file in "${@}"; do
  72. readlink -v -e "${file}" >/dev/null # check existing
  73. ln -s -T /"${file}" "${dir}/${prefix}${file##*/}"
  74. done
  75. }
  76.  
  77. package() {
  78. cd $pkgdir
  79. local file
  80. for file in $( _find_rpms ); do
  81. msg "Extracting ${file##*/}"
  82. bsdtar -xf "${file}"
  83. done
  84. msg2 "Completing package"
  85. # remove symlink to avoid conflict with libreoffice-common 3.5.2-1
  86. # (not used in the desktop files)
  87. [[ -h usr/bin/soffice ]] && rm -f usr/bin/soffice
  88. # add licenses (found by find pkg -ipath '*license*')
  89. _ln_s_t usr/share/licenses/${_pkgname} '' \
  90. $_path/program/LICENSE
  91. # Fix python shebang calls
  92. sed -i -re "1s;^#! *(/usr(/local)?)?/bin/(env +)?python(2[^ ]*)?( |$);#!/usr/bin/env python2 ;" $(
  93. find $_path/program/python-core-2.7.6/lib -type f -name '*.py'
  94. )
  95. }
RAW Paste Data