[SOLVED] Script to download and build the latest libreoffice
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
Last edited by Didier Spaier; 09-05-2012 at 05:08 AM.
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.
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.
Last edited by ruario; 09-05-2012 at 02:29 AM.
Reason: Added the final "EDIT" line; found a more robust way to exclude the SDK
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.