[Lunar-commits] <moonbase> libreoffice-bin: Adding to moonbase. Major credit goes to akelling for creating

Dennis `stumbles` Veatch stumbles at lunar-linux.org
Thu May 19 12:26:25 CEST 2011


commit 0c335c870624146a71315c5ea0e43f9c14106608
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date:   Thu May 19 06:26:25 2011 -0400

    libreoffice-bin: Adding to moonbase. Major credit goes to akelling for creating
    
    this module. The only thing I did was add a couple of symlinks and merged a BUILD/BUILD.x86_64
    into one and a few other minor things. Don't have a x86 box handy but I don't see any reason why it won't work.
    
    Thanks akelling for your work.
---
 x11-apps/libreoffice-bin/BUILD                     |  100 ++++++++++++++++++++
 x11-apps/libreoffice-bin/CONFIGURE                 |    1 +
 x11-apps/libreoffice-bin/CONFLICTS                 |    1 +
 x11-apps/libreoffice-bin/DEPENDS                   |    3 +
 x11-apps/libreoffice-bin/DETAILS                   |   20 ++++
 x11-apps/libreoffice-bin/DETAILS.x86_64            |   20 ++++
 x11-apps/libreoffice-bin/POST_REMOVE               |    1 +
 x11-apps/libreoffice-bin/PRE_BUILD                 |    5 +
 .../libreoffice-bin/profile.d/libreoffice-bin.rc   |    5 +
 9 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/x11-apps/libreoffice-bin/BUILD b/x11-apps/libreoffice-bin/BUILD
new file mode 100644
index 0000000..1879cab
--- /dev/null
+++ b/x11-apps/libreoffice-bin/BUILD
@@ -0,0 +1,100 @@
+(
+
+  OO_INSTALL_DIR="${SOURCE_DIRECTORY}/RPMS"
+  OO_DESK_DIR="${SOURCE_DIRECTORY}/desktop-integration/usr"
+  OO_DIR="/opt/lunar/libreoffice"
+
+  cd $OO_INSTALL_DIR  &&
+
+  if [ "$USE_DESKTOPINTEGRATION" = "y" ] ; then
+
+    mv ${OO_INSTALL_DIR}/desktop-integration ${SOURCE_DIRECTORY} &&
+    cd ${SOURCE_DIRECTORY}/desktop-integration/ &&
+
+    INT_FILE=libreoffice3.3-freedesktop-menus-3.3-202.noarch &&
+ 
+    rpm2cpio $INT_FILE.rpm > $INT_FILE.cpio &&
+    cpio -idm < $INT_FILE.cpio &&
+
+    sedit "s|/etc/libreoffice|$OO_DIR|g" ${OO_DESK_DIR}/bin/libreoffice &&
+    sedit "s|/etc/libreoffice|$OO_DIR|g" ${OO_DESK_DIR}/bin/libreoffice-printeradmin || exit 1
+  fi  &&
+
+  cd $OO_INSTALL_DIR &&
+  rm -rf desktop-integration &&
+
+  # not sure what this rpm is for, but its not there in 32bit OO, so I removed it
+  rm -rf userland &&
+
+  # Let the magic happen. Ugh, I hate rpm
+  message "${MESSAGE_COLOR}Unpacking RPMs...${DEFAULT_COLOR}" &&
+  for pack in ${OO_INSTALL_DIR}/*; do
+    rpm2cpio $pack > `basename $pack .rpm`.cpio || exit 1
+  done  &> /dev/null
+
+  # Now, lets get rid of the rpms
+  rm -rf ${OO_INSTALL_DIR}/*.rpm &&
+
+  for pack in ${OO_INSTALL_DIR}/*; do
+    cpio -idm < $pack &> /dev/null || exit 1
+  done &&
+
+  prepare_install  &&
+  message "${MESSAGE_COLOR}Installing LibreOffice ${VERSION}...${DEFAULT_COLOR}"  &&
+  mkdir -p $MODULE_PREFIX/libreoffice  &&
+  chown -R root:root "${OO_INSTALL_DIR}/opt" &&
+  # symlinks are not copied correctly
+  rm "${OO_INSTALL_DIR}/opt/libreoffice/basis-link" &&
+  rm "${OO_INSTALL_DIR}/opt/libreoffice/ure/bin/uno" &&
+  rm "${OO_INSTALL_DIR}/opt/libreoffice/ure/bin/regcomp" &&
+  rm "${OO_INSTALL_DIR}/opt/libreoffice/basis3.3/program/libicuuc.so.40" &&
+  rm "${OO_INSTALL_DIR}/opt/libreoffice/basis3.3/program/libicui18n.so.40" &&
+  #cp -a "${OO_INSTALL_DIR}/opt/libreoffice" /opt/lunar/libreoffice/  &&
+  cp -R "${OO_INSTALL_DIR}/opt/libreoffice" /opt/lunar/libreoffice/  &&
+  chown -R root /opt/lunar/libreoffice &&
+  chgrp -R root /opt/lunar/libreoffice &&
+  
+  # create the symlinks correctly
+  cd /opt/lunar/libreoffice &&
+  ln -sf libreoffice/basis3.3 basis-link &&
+  cd /opt/lunar/libreoffice/ure/bin &&
+  ln -sf startup.sh uno &&
+  ln -sf startup.sh regcomp &&
+  cd /opt/lunar/libreoffice/basis3.3/program &&
+  ln -sf /opt/lunar/libreoffice/basis3.3/program/libicuuc.so.40.1 /opt/lunar/libreoffice/basis3.3/program/libicuuc.so.40 &&
+  ln -sf /opt/lunar/libreoffice/basis3.3/program/libicui18n.so.40.1 /opt/lunar/libreoffice/basis3.3/program/libicui18n.so.40 &&
+  ln -sf /opt/lunar/libreoffice/libreoffice/basis3.3/program/libicuuc.so.40.1 /opt/lunar/libreoffice/libreoffice/basis3.3/program/libicuuc.so.40 &&
+  ln -sf /opt/lunar/libreoffice/libreoffice/basis3.3/program/libicui18n.so.40.1 /opt/lunar/libreoffice/libreoffice/basis3.3/program/libicui18n.so.40 &&
+
+  #Added this force symlink creation at sofar's request
+  cd /usr/bin &&
+  ln -sf ${OO_DIR}/program/soffice soffice &&
+  ln -sf ${OO_DIR}/program/scalc   scalc   &&
+  ln -sf ${OO_DIR}/program/swriter swriter &&
+  ln -sf ${OO_DIR}/program/swriter simpress &&
+
+  if [ "$USE_DESKTOPINTEGRATION" = "y" ] ; then
+    sedit 's:/opt/:/opt/lunar/libreoffice/:g' \
+          ${OO_DESK_DIR}/bin/libreoffice &&
+    install -m755 ${OO_DESK_DIR}/bin/libreoffice \
+                  ${OO_DESK_DIR}/bin/libreoffice-printeradmin /usr/bin/ &&
+
+    # Install icons for the .desktop files
+    mkdir -p -m0755 /usr/share/icons/{gnome,hicolor} &&
+    cd ${OO_DESK_DIR}/share/icons &&
+    cp -r gnome/*x* /usr/share/icons/gnome &&
+    cp -r hicolor/*x* /usr/share/icons/hicolor &&
+    gtk-update-icon-cache --force /usr/share/icons/hicolor &&
+
+    install -m644 "${OO_DESK_DIR}/share/mime/packages/libreoffice.xml" /usr/share/mime/packages/ &&
+    update-mime-database /usr/share/mime/ &> /dev/null &&
+
+    DESKTOP_FILES="base calc draw impress math printeradmin writer" &&
+
+    for FILE in ${DESKTOP_FILES} ; do
+      ln -s ${OO_DIR}/share/xdg/${FILE}.desktop \
+        /usr/share/applications/${FILE}.desktop || exit 1
+    done
+  fi || exit 1
+
+) > $C_FIFO 2>&1
diff --git a/x11-apps/libreoffice-bin/CONFIGURE b/x11-apps/libreoffice-bin/CONFIGURE
new file mode 100644
index 0000000..c486416
--- /dev/null
+++ b/x11-apps/libreoffice-bin/CONFIGURE
@@ -0,0 +1 @@
+mquery USE_DESKTOPINTEGRATION "Do you want LibreOffice integrated in the application menu of your DE?" y
diff --git a/x11-apps/libreoffice-bin/CONFLICTS b/x11-apps/libreoffice-bin/CONFLICTS
new file mode 100644
index 0000000..e4a219e
--- /dev/null
+++ b/x11-apps/libreoffice-bin/CONFLICTS
@@ -0,0 +1 @@
+conflicts openoffice-src
diff --git a/x11-apps/libreoffice-bin/DEPENDS b/x11-apps/libreoffice-bin/DEPENDS
new file mode 100644
index 0000000..06fab9b
--- /dev/null
+++ b/x11-apps/libreoffice-bin/DEPENDS
@@ -0,0 +1,3 @@
+depends rpmunpack
+depends cpio
+depends hicolor-icon-theme
diff --git a/x11-apps/libreoffice-bin/DETAILS b/x11-apps/libreoffice-bin/DETAILS
new file mode 100644
index 0000000..86acb33
--- /dev/null
+++ b/x11-apps/libreoffice-bin/DETAILS
@@ -0,0 +1,20 @@
+          MODULE=libreoffice-bin
+         VERSION=3.3.2
+          SOURCE=LibO_${VERSION}_Linux_x86_install-rpm_en-US.tar.gz
+SOURCE_DIRECTORY=${BUILD_DIRECTORY}/OOO330_m20_native_packed-1_en-US.9567
+   SOURCE_URL[0]=http://download.documentfoundation.org/libreoffice/stable/$VERSION/rpm/x86/
+      SOURCE_VFY=sha1:ad8bdea7b60b2845bc3181a211ed8af0d6c7a72e
+        WEB_SITE=http://www.libreoffice.org/
+         ENTERED=20110330
+         UPDATED=20110330
+           SHORT="The open office suite for unix"
+
+LDD_CHECK=off
+ARCHIVE=off
+
+cat << EOF
+LibreOffice is the free power-packed Open Source personal productivity suite for
+Windows, Macintosh and Linux, that gives you six feature-rich applications for 
+all your document production and data processing needs: Writer, Calc, Impress, 
+Draw, Math and Base.
+EOF
diff --git a/x11-apps/libreoffice-bin/DETAILS.x86_64 b/x11-apps/libreoffice-bin/DETAILS.x86_64
new file mode 100644
index 0000000..aef483d
--- /dev/null
+++ b/x11-apps/libreoffice-bin/DETAILS.x86_64
@@ -0,0 +1,20 @@
+          MODULE=libreoffice-bin
+         VERSION=3.3.2
+          SOURCE=LibO_${VERSION}_Linux_x86-64_install-rpm_en-US.tar.gz
+SOURCE_DIRECTORY=${BUILD_DIRECTORY}/LibO_${VERSION}rc2_Linux_x86-64_install-rpm_en-US
+   SOURCE_URL[0]=http://download.documentfoundation.org/libreoffice/stable/$VERSION/rpm/x86_64/
+      SOURCE_VFY=sha1:ad8bdea7b60b2845bc3181a211ed8af0d6c7a72e
+        WEB_SITE=http://www.libreoffice.org/
+         ENTERED=20110519
+         UPDATED=20110519
+           SHORT="The open office suite for unix"
+
+LDD_CHECK=off
+ARCHIVE=off
+
+cat << EOF
+LibreOffice is the free power-packed Open Source personal productivity suite for
+Windows, Macintosh and Linux, that gives you six feature-rich applications for 
+all your document production and data processing needs: Writer, Calc, Impress, 
+Draw, Math and Base.
+EOF
diff --git a/x11-apps/libreoffice-bin/POST_REMOVE b/x11-apps/libreoffice-bin/POST_REMOVE
new file mode 100644
index 0000000..e4f481b
--- /dev/null
+++ b/x11-apps/libreoffice-bin/POST_REMOVE
@@ -0,0 +1 @@
+rm -rf /opt/lunar/openoffice
diff --git a/x11-apps/libreoffice-bin/PRE_BUILD b/x11-apps/libreoffice-bin/PRE_BUILD
new file mode 100644
index 0000000..e0fdf98
--- /dev/null
+++ b/x11-apps/libreoffice-bin/PRE_BUILD
@@ -0,0 +1,5 @@
+desktopfiles="base calc draw impress math printeradmin writer"  &&
+for i in $desktopfiles; do
+  rm -f /usr/share/applications/$i.desktop
+done   &&
+default_pre_build
diff --git a/x11-apps/libreoffice-bin/profile.d/libreoffice-bin.rc b/x11-apps/libreoffice-bin/profile.d/libreoffice-bin.rc
new file mode 100644
index 0000000..6c0e564
--- /dev/null
+++ b/x11-apps/libreoffice-bin/profile.d/libreoffice-bin.rc
@@ -0,0 +1,5 @@
+# libreoffice-bin specific stuff
+
+[ -d /opt/lunar/libreoffice/libreoffice/program/ ] &&
+    PATH="$PATH:/opt/lunar/libreoffice/libreoffice/program/"
+


More information about the Lunar-commits mailing list