summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Ryan P.C. McQuen <ryan.q@linux.com>2015-02-25 15:17:12 -0800
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2015-02-28 11:37:06 +0700
commit8915120b2472764e791285b3739c169687aee4c5 (patch)
tree6ebbe743d669af2a2896a96a26c4cea567b2f2a9
parent4a9b0224629bdf51fa1f2b24426b47598e68fafe (diff)
downloadslackbuilds-8915120b2472764e791285b3739c169687aee4c5.tar.gz
slackbuilds-8915120b2472764e791285b3739c169687aee4c5.tar.xz
office/openoffice.org: Fix build.
Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
-rw-r--r--office/openoffice.org/openoffice.org.SlackBuild42
1 files changed, 32 insertions, 10 deletions
diff --git a/office/openoffice.org/openoffice.org.SlackBuild b/office/openoffice.org/openoffice.org.SlackBuild
index 8ae0adc5e4..382b6aaf52 100644
--- a/office/openoffice.org/openoffice.org.SlackBuild
+++ b/office/openoffice.org/openoffice.org.SlackBuild
@@ -28,10 +28,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=openoffice.org
+SRCNAM=openoffice
VERSION=${VERSION:-4.1.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-SRCSHORT=$(echo $VERSION | cut -f1-2 -d.)
+SRCSHORT=$(echo $VERSION | cut -f1 -d.)
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -77,6 +78,8 @@ SOURCEDIR=$(tar tzf $CWD/$TARNAME 2>/dev/null | head -n 1 | tr -d \/)
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $PKG/usr/bin/
+mkdir -p $PKG/usr/share/applications/
rm -rf $TMP/$SOURCEDIR
# Extract tarball
@@ -94,12 +97,33 @@ rm -rf desktop-integration *.rpm
mv opt $PKG
cd $PKG
-# Remove DejaVu fonts - these are included in other packages
-rm -f $PKG/opt/openoffice4/share/fonts/truetype/DejaVu*.ttf
+## Remove DejaVu fonts - these are included in other packages
+#rm -f $PKG/opt/${SRCNAM}${SRCSHORT}/share/fonts/truetype/DejaVu*.ttf
-# Move docs to their expected locations
+## Create symlinks in /usr/bin to actual binaries
+cd $PKG/usr/bin/
+ for FILE in \
+ sbase scalc sdraw simpress smath soffice spadmin swriter unopkg ; do
+ rm -f $FILE
+ ln -sfv ../../opt/${SRCNAM}${SRCSHORT}/program/$FILE open-$FILE ;
+ done
+cd -
+
+## fix desktop files, so they can launch
+cat <<EOT > $PKG/usr/bin/${SRCNAM}4
+#!/bin/sh
+/opt/${SRCNAM}${SRCSHORT}/program/soffice "\$@"
+EOT
+chmod 755 $PKG/usr/bin/${SRCNAM}4
+
+## desktop files!
+for APP in base calc draw impress math writer; do
+ cp -av $PKG/opt/${SRCNAM}${SRCSHORT}/share/xdg/$APP.desktop $PKG/usr/share/applications/open-$APP.desktop ;
+done
+
+## Move docs to their expected locations
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cd $PKG/opt/openoffice4
+cd $PKG/opt/${SRCNAM}${SRCSHORT}
mv README* share/readme/* $PKG/usr/doc/$PRGNAM-$VERSION
rmdir share/readme
cd -
@@ -110,12 +134,10 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+mv $TMP/$OOLANG $PKG/opt/${SRCNAM}${SRCSHORT}/lang/
+
# Fix ownership and permissions and make the package
chown -R root:root .
find . -type d -exec chmod 755 {} \;
chmod -R u+rw,go+r-w,a-s .
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
-
-# Cleanup
-cd $TMP
-rm -rf $OOLANG $PKG