LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Script to download and build the latest libreoffice (http://www.linuxquestions.org/questions/slackware-14/script-to-download-and-build-the-latest-libreoffice-4175425662/)

neymac 09-04-2012 07:06 PM

Script to download and build the latest libreoffice
 
I've found a amazing script to update java (JRE) to the latest version. Is there any script to download the latest 3 libreoffice's files (help rpm, language source and Libreoffice rpm) available for slackware?

Didier Spaier 09-04-2012 07:30 PM

Even better, you can just download the packages provided by Alien Bob and available here for the application itself, languages files and mozilla plugins.

You will be able to use the standard Slackware tool to manage these packages; that wouldn't be the case with RPM ones.

Please notice though that these packages are intended for Slackware-13.37.

For Slackware 13.1 (if you are still using it) you could have to build yourself the packages with the SlackBuilds provided in the same directory.

neymac 09-04-2012 09:18 PM

Quote:

Originally Posted by Didier Spaier (Post 4772743)
For Slackware 13.1 (if you are still using it) you could have to build yourself the packages with the SlackBuilds provided in the same directory.

I've built the latest (3.6.1) version with the 3 files downloaded from http://www.libreoffice.org/download. I'm looking for a way to check by script if is there a new version, download and build it automatically.I'm still with slackware 13.1 (64 bits), maybe I will upgrade to 14.0 soon.
Thanks for the tip.

ruario 09-05-2012 02:08 AM

Quote:

Originally Posted by neymac (Post 4772816)
I've built the latest (3.6.1) version with the 3 files downloaded from http://www.libreoffice.org/download. I'm looking for a way to check by script if is there a new version, download and build it automatically.

You could probably start with something like this:

Code:

LIBOVERSION=$(wget -qO- http://www.libreoffice.org/download | sed -rn 's,.*/LibO_([0-9\.]*)_Linux_x86_install-rpm_en-US.tar.gz[^\.].*,\1,p')

if [ -z $LIBOVERSION ]; then
  echo "Could not work out the latest version; exiting"
  exit 1
fi

if /bin/ls /var/log/packages/libreoffice-$LIBOVERSION-* >/dev/null 2>&1 ; then
  echo "LibreOffice version $LIBOVERSION is already installed. Nothing to do!"
  exit 0
fi

wget --header="Accept-Language: $(echo $LANG | cut -d. -f1)" -qO- http://www.libreoffice.org/download |\
  grep -E "(install-rpm|langpack-rpm|helppack-rpm).*tar.gz[^\.]" |\
  grep -v "LibO-SDK" |\
  wget -Fi-

That covers the check for new version and download parts. Put this in a script and have the rest be like a traditional SlackBuild that does repacking, using $LIBOVERSION as the version number.

EDIT: The above assumes you are using the naming format libreoffice-version-arch-buildtag, like Alien Bob does with his packages. If you use some other name (i.e. not libreoffice) adjust my check in /var/log/packages/ accordingly.

Alien Bob 09-05-2012 04:56 AM

A script for easy re-packaging of the official RPM's into a Slackware package can be found on SlackBuilds.org: http://slackbuilds.org/repository/13...e/libreoffice/

The differnce between my packages and the official RPM's:
My own packages (http://www.slackware.com/~alien/slac...s/libreoffice/) are compiled from source on Slackware - the official binary RPM's are not of course. They contain some compatibility libs that allow those binaries to run on a wide range of Linux distributions.

Eric

neymac 09-05-2012 09:57 AM

Quote:

Originally Posted by ruario (Post 4773001)
You could probably start with something like this:

Thanks, ruario, your script works fine here. Then I'd just added the libreoffice.SlackBuild script on it and it's done (I changed "-" to "_" after $LIBOVERSION "if /bin/ls /var/log/packages/libreoffice-$LIBOVERSION-*" to match my package name).
Thanks, Alien Bob for the usefully hints.

D1ver 09-08-2012 03:17 AM

Mildly off topic but I installed Libreoffice (3.6.1.2) from the slackbuild by editing the version variable, it seems to work fine but it looks very ugly in KDE.. Is there a way to enable qt/kde theme integration?

ruario 09-08-2012 06:32 AM

oxygen-gtk perhaps.

neymac 09-08-2012 08:31 AM

Quote:

Originally Posted by D1ver (Post 4775492)
Mildly off topic but I installed Libreoffice (3.6.1.2) from the slackbuild by editing the version variable, it seems to work fine but it looks very ugly in KDE.. Is there a way to enable qt/kde theme integration?

Or you can change the icon's styles on Libreoffice. "Tools"->"Options"->"Views"->"Icons size and styles" - Choose "oxygen (Automatic)" or try others styles, if you want.

D1ver 09-08-2012 07:24 PM

I ended up finding the answer here. Renaming the /opt/libreoffice3.6/ure/lib/libstdc++.so.6 file results in a nice pretty KDE libreoffice.


All times are GMT -5. The time now is 05:12 AM.