2011-06-27 22:55:01 +02:00
|
|
|
# Description: full featured cross platform office suite (binary)
|
|
|
|
# URL: http://www.libreoffice.org
|
|
|
|
# Maintainer: Bartlomiej Palmowski, rotwang at crux dot org dot pl
|
2013-06-25 20:45:48 +02:00
|
|
|
# Depends on: mesa3d xorg-libxaw xorg-libxcursor xorg-libxft xorg-libxinerama xorg-libxi xorg-libxrandr dbus-glib
|
2011-06-27 22:55:01 +02:00
|
|
|
|
|
|
|
name=libreoffice
|
2014-02-15 21:05:56 +01:00
|
|
|
version=4.2.0
|
2011-06-27 22:55:01 +02:00
|
|
|
release=1
|
2013-06-22 15:27:58 +02:00
|
|
|
source=(http://download.documentfoundation.org/$name/stable/$version/rpm/x86_64/LibreOffice_${version}_Linux_x86-64_rpm.tar.gz)
|
2011-06-27 22:55:01 +02:00
|
|
|
|
|
|
|
build() {
|
|
|
|
local workd="$SRC/tmp_work"
|
|
|
|
mkdir $workd
|
|
|
|
|
2013-06-22 15:27:58 +02:00
|
|
|
cd LibreOffice_${version}*/RPMS
|
2011-06-27 22:55:01 +02:00
|
|
|
for rpm in *.rpm; do
|
|
|
|
bsdtar -p -o -C $workd -xf $rpm
|
|
|
|
done
|
2014-02-15 21:05:56 +01:00
|
|
|
|
2011-06-27 22:55:01 +02:00
|
|
|
bsdtar -p -o -C $workd -xf \
|
2013-02-25 21:56:07 +01:00
|
|
|
$name${version%.*}-freedesktop-menus-${version%.*}*.noarch.rpm
|
2011-06-27 22:55:01 +02:00
|
|
|
|
|
|
|
cd $workd
|
|
|
|
mkdir -p $PKG/usr/lib/$name
|
|
|
|
mv opt/$name*/* $PKG/usr/lib/$name
|
|
|
|
|
|
|
|
cd $PKG/usr/lib/$name
|
|
|
|
ln -sf basis${version%.*} basis-link
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/bin
|
|
|
|
local programs=(sbase scalc sdraw simpress smath soffice spadmin swriter)
|
|
|
|
for program in ${programs[@]}; do
|
|
|
|
ln -sf /usr/lib/$name/program/$program $PKG/usr/bin/$program
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
cd $PKG/usr/lib/$name/share/xdg/
|
2014-02-15 21:05:56 +01:00
|
|
|
|
2011-06-27 22:55:01 +02:00
|
|
|
for desktop in *.desktop; do
|
2011-11-28 00:54:41 +01:00
|
|
|
sed -i '/^Exec=/s/libreoffice[^ ]*/soffice/' $desktop
|
2011-06-27 22:55:01 +02:00
|
|
|
ln -sf /usr/lib/$name/share/xdg/$desktop $PKG/usr/share/applications/$desktop
|
|
|
|
done
|
2014-02-15 21:05:56 +01:00
|
|
|
|
2011-06-27 22:55:01 +02:00
|
|
|
mv $workd/usr/share/{mime,icons} $PKG/usr/share
|
|
|
|
|
|
|
|
find $PKG \(\
|
|
|
|
-iname '*readme*' -o \
|
|
|
|
-iname '*changelog*' -o \
|
|
|
|
-name '*TODO*' -o \
|
|
|
|
-iname '*news*' -o \
|
|
|
|
-iname '*license*' -o \
|
|
|
|
-iname '*credits*' \
|
|
|
|
\) -exec rm -rf '{}' \; || true
|
|
|
|
}
|