blob: 01d3e898c2c0edf5caa34cc9eca675da8ea6c9b2 (
plain)
1 # Description: full featured cross platform office suite (binary)
2 # URL: https://www.libreoffice.org
3 # Maintainer: Thomas Penteker, tek at serverop dot de
4 # Packager: Bartlomiej Palmowski, rotwang at crux dot org dot pl
5 # Depends on: avahi cups dbus-glib desktop-file-utils glu gtk gtk3 krb5 shared-mime-info xorg-libxaw xorg-libxi
6
7 name=libreoffice-bin
8 version=6.4.7
9 release=1
10 source=(http://download.documentfoundation.org/libreoffice/stable/$version/rpm/x86_64/LibreOffice_${version}_Linux_x86-64_rpm.tar.gz)
11
12
13 build() {
14 local workd="$SRC/tmp_work"
15 mkdir $workd
16
17 cd LibreOffice_${version}*/RPMS
18 for rpm in *.rpm; do
19 bsdtar -p -o -C $workd -xf $rpm
20 done
21
22 bsdtar -p -o -C $workd -xf \
23 libreoffice${version%.*}-freedesktop-menus-${version%.*}*.noarch.rpm
24
25 cd $workd
26 mkdir -p $PKG/usr/lib/libreoffice
27 mv opt/libreoffice*/* $PKG/usr/lib/libreoffice
28
29 cd $PKG/usr/lib/libreoffice
30 ln -sf basis${version%.*} basis-link
31
32 mkdir -p $PKG/usr/bin
33 local programs=(sbase scalc sdraw simpress smath soffice swriter)
34 for program in ${programs[@]}; do
35 ln -sf /usr/lib/libreoffice/program/$program $PKG/usr/bin/$program
36 done
37
38 mkdir -p $PKG/usr/share/applications
39 cd $PKG/usr/lib/libreoffice/share/xdg/
40
41 for desktop in *.desktop; do
42 sed -i '/^Exec=/s/libreoffice[^ ]*/soffice/' $desktop
43 ln -sf /usr/lib/libreoffice/share/xdg/$desktop $PKG/usr/share/applications/$desktop
44 done
45
46 mv $workd/usr/share/{mime,icons} $PKG/usr/share
47
48 find $PKG \(\
49 -iname '*readme*' -o \
50 -iname '*changelog*' -o \
51 -name '*TODO*' -o \
52 -iname '*news*' -o \
53 -iname '*license*' -o \
54 -iname '*credits*' \
55 \) -exec rm -rf '{}' \; || true
56
57 # prevent crashing because of absent wayland bindings
58 sed -i '$i export SAL_USE_VCLPLUGIN=gen' $PKG/usr/lib/libreoffice/program/soffice
59 }
|