milis/talimatname/genel/libreoffice/talimat

57 lines
1.6 KiB
Plaintext
Raw Normal View History

2016-02-24 01:27:23 +01:00
# Description: LibreOffice is a full-featured office suite. It is largely compatible with Microsoft Office and is descended from OpenOffice.org.
# URL: http://www.libreoffice.org
2016-06-06 18:58:39 +02:00
# Packager: milisarge
2016-03-14 17:11:40 +01:00
# Depends on: cups xorg-libxaw xorg-libxcursor xorg-libxft xorg-libxinerama xorg-libxi xorg-libxrandr dbus-glib krb5
2016-02-24 01:27:23 +01:00
name=libreoffice
2016-06-06 18:58:39 +02:00
version=5.1.3
2016-02-24 01:27:23 +01:00
release=1
2016-06-06 18:58:39 +02:00
source=(http://tdf.c3sl.ufpr.br/libreoffice/stable/5.1.3/rpm/x86_64/LibreOffice_5.1.3_Linux_x86-64_rpm.tar.gz)
2016-02-24 01:27:23 +01:00
build() {
2016-03-14 17:11:40 +01:00
local workd="$SRC/tmp_work"
mkdir $workd
cd LibreOffice_${version}*/RPMS
for rpm in *.rpm; do
bsdtar -p -o -C $workd -xf $rpm
done
bsdtar -p -o -C $workd -xf \
$name${version%.*}-freedesktop-menus-${version%.*}*.noarch.rpm
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/
for desktop in *.desktop; do
sed -i '/^Exec=/s/libreoffice[^ ]*/soffice/' $desktop
ln -sf /usr/lib/$name/share/xdg/$desktop $PKG/usr/share/applications/$desktop
done
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
2016-02-24 01:27:23 +01:00
}
2016-03-14 17:11:40 +01:00