The Document Foundation announced the release of 4.x yesterday and Arch Linux users can install it on their system. Since 4.x is not in the main repos yet, you will have to compile it but the process is almost automated, you will have to run less commands than you have to do when you add a PPA of Ubuntu.
The credit goes to the ever helpful Arch Community and members like Martin Fox and Josh Sabboth who pointed me to the solution. I could have waited for LibreOffice to be available in main repos but I wanted to test it so the anxiety.
Here are the steps to install LO on Arch. Keep in mind it’s manual method and could take hours to compile, it will also require you to upgrade manually each time an upgrade is out.
You need the PKGBUILD which you can either get from here or download it with yaourt. Change to the directory where you want to download and then run this command:
$ yaourt -G libreoffice-common
In the downloaded folder you will see PKGBUILD 4.0, rename it to PKGBUILD.
Now cd to this directory and run makepkg to build LibreOffice:
$ makepkg -s
This can take hours depending on how powerful your machine is. Once that’s done, you can install the packages that you need. You might face some problems with md5sums. To get the md5sums run this command which will pull md5sums from source and you can edit the PKGBUILD file accordingly:
$ makepkg -g
These are the packages created:
You can install the ones you need. I installed these ones, or you can install all by running this command:
$ sudo pacman -U libreoffice*.pkg.tar.xz
So, now you have LibreOffice 4.0 installed on your Arch Linux. Keep in mind that these are not the final 4.x packages as you can see these are rc2 packages. You can always switch to stable once they are available in the main repo.