wok-next view LibreOffice/receipt @ rev 21613
updated eboard (1.1.1 -> 1.1.3)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Jun 25 10:33:28 2020 +0100 (2020-06-25) |
parents | 82b613cfd1e0 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="LibreOffice"
4 VERSION="6.0.5"
5 CATEGORY="office"
6 SHORT_DESC="Powerful office suite"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="MPL2"
9 WEB_SITE="https://www.libreoffice.org/"
10 REPOLOGY="libreoffice"
12 case $ARCH in
13 i?86) lo_arch="x86" ; lo_arch2="x86" ;;
14 x86_64) lo_arch="x86_64"; lo_arch2="x86-64";;
15 esac
17 TARBALL="LibreOffice_${VERSION}_Linux_${lo_arch2}_deb.tar.gz"
18 WGET_URL="http://download.documentfoundation.org/libreoffice/stable/$VERSION/deb/$lo_arch/$TARBALL"
20 COOKOPTS="force-arch" # different .bau, segments_3, .jar, help.ht_, .xcd in langpacks
22 SPLIT="$PACKAGE-langpack-de $PACKAGE-langpack-es $PACKAGE-langpack-fr \
23 $PACKAGE-langpack-it $PACKAGE-langpack-pt-BR $PACKAGE-langpack-ru \
24 $PACKAGE $PACKAGE-extra"
26 sizes() { du -chs ${1:-$fs} | awk 'END{print $1}'; }
28 compile_rules() {
29 echo 'Checking language packages...'
30 for i in de es fr it pt-BR ru; do
31 TARBALL="LibreOffice_${VERSION}_Linux_${lo_arch2}_deb_langpack_$i.tar.gz"
32 WGET_URL="$(dirname $WGET_URL)/$TARBALL"
33 [ -e "$SRC/$TARBALL" ] || wget -O $SRC/$TARBALL $WGET_URL
34 tar -xzf $SRC/$TARBALL
35 done
36 action 'Extracting LibreOffice...'
37 # extract all deb's filesystem into $install
38 find . -name '*.deb' -exec dpkg-deb -x '{}' $install \;
39 sizes $install
41 # substitute desktop files symlinks by actual files (to be processed by cook)
42 find $install/usr/share/applications/ -type l -delete # no way to remove 'broken' symlinks by `rm`
43 find $install/opt/libreoffice${VERSION%.*}/share/xdg/ -type f | \
44 while read i; do
45 mv $i $install/usr/share/applications/libreoffice${VERSION%.*}-$(basename $i)
46 done
47 # remove useless (after processing by sdft) lines from desktop files
48 sed -i '/^#/d; /^Actions=/d; s|X-Red-Hat-Base;||;
49 s|X-MandrivaLinux-[^;]*;||' $install/usr/share/applications/*.desktop
51 # fix some files permissions
52 find $install -type f -name 'libpl*.so' -exec chmod -v 755 '{}' \; # was 444
53 find $install -type f -name 'libnspr4.so' -exec chmod -v 755 '{}' \; # was 444
54 find $install -type f -name 'Carlito*.ttf' -exec chmod -v 644 '{}' \; # was 640
55 find $install -type f -name 'Noto*.ttf' -exec chmod -v 644 '{}' \; # was 640
57 # make symlink relative: /usr/bin/libreoffice6.0 -> /opt/libreoffice6.0/program/soffice
58 fix symlinks
59 }
61 genpkg_rules() {
62 case $PACKAGE in
63 LibreOffice-langpack-*)
64 lang=${PACKAGE#*langpack-}
65 copy *$lang.res $lang/ $lang.zip dict-$lang/ *-$lang.xcd *_$lang.xcd
67 action 'Removing unwanted files...'
68 find $fs -name '*.properties' | \
69 while read i; do
70 j=$(basename $i .properties)
71 case $j in
72 *de|*en_US|*es|*fr|*it|*pt_BR|*ru) ;;
73 *) rm $i;;
74 esac
75 done
76 sizes
78 case $lang in
79 de) L='German';;
80 es) L='Spanish';;
81 fr) L='French';;
82 it) L='Italian';;
83 pt-BR) L='Portuguese Brazilian';;
84 ru) L='Russian';;
85 esac
86 CAT="localization|$L langpack"
87 DEPENDS="LibreOffice"
88 ;;
89 LibreOffice)
90 copy @std *.inc @rm
91 DEPENDS="atk libcairo dbus dbus-glib fontconfig freetype gdk-pixbuf \
92 glib gpgme gst1-plugins-base gstreamer1 gtk2 icu liblcms2 libassuan \
93 libcomerr libcups libcurl libepoxy libgpg-error libicu libkrb5 \
94 libsqlite3 libxml2 libxslt neon nspr nss pango perl python \
95 libice libsm libx11 libxext libxinerama \
96 libxrandr libxrender zlib"
97 SUGGESTED="mesa"
99 action 'Info: current size is...'; sizes
101 action 'Removing Java support...'
102 # remove Java support
103 find $fs -name '*.jar' -delete
104 rm $fs/opt/libreoffice${VERSION%.*}/program/libofficebean.so
105 sizes
107 action 'Removing unwanted files...'
108 # remove kde & qt support
109 rm $fs/opt/libreoffice${VERSION%.*}/program/libkde4be1lo.so
110 rm $fs/opt/libreoffice${VERSION%.*}/program/libvclplug_kde4lo.so
112 # remove gstreamer0 support (libavmediagst_0_10.so)
113 # leave gstreamer1 support (libavmediagst.so)
114 rm $fs/opt/libreoffice${VERSION%.*}/program/libavmediagst_0_10.so
116 # remove multilingual files
117 find $fs -name '*.properties' | \
118 while read i; do
119 j=$(basename $i .properties)
120 case $j in
121 *de|*en_US|*es|*fr|*it|*pt_BR|*ru) ;;
122 *) rm $i;;
123 esac
124 done
126 # remove icon themes; leave only default tango theme (-11MB)
127 for i in $fs/opt/libreoffice${VERSION%.*}/share/config/images*.zip; do
128 case $(basename $i .zip) in
129 *tango) ;;
130 *) rm $i;;
131 esac
132 done
134 # remove wiki-publisher extension
135 rm -r $fs/opt/libreoffice${VERSION%.*}/share/extensions/wiki-publisher
137 # remove unneded desktop integration
138 rm -r $fs/usr/lib/
139 cd $fs/usr/share/
140 rm -r mime-info/ application-registry/ icons/locolor/ icons/gnome/
141 rm -r icons/hicolor/scalable/
143 # remove other files
144 rm -r $fs/opt/libreoffice${VERSION%.*}/readmes/
146 sizes
148 # action 'Compressing xml files...'
149 # # compress xml-based files
150 # t="$(mktemp)"
151 # find $fs -type f \( -name '*.xml' -o -name 'xsl' \) | \
152 # while read i; do
153 # xmlstarlet c14n --without-comments "$i" | \
154 # xmlstarlet --no-doc-namespace sel -B -t -c '*' > $t
155 # cat "$t" > "$i"
156 # done
157 # sizes
158 ;;
160 LibreOffice-extra)
161 # all the rest...
162 copy @std *.inc @rm
163 CAT="office|extra files"
164 DEPENDS="glib gst0-plugins-base gstreamer0 libepoxy libicu libxml2 \
165 libice libsm libx11 libxext"
166 SUGGESTED="libQtCore libQtGui libQtNetwork"
167 ;;
168 esac
169 }