The only reason I've not submitted a PKGBUILD to AUR is that I can not find a direct link to the openoffice tarball. Anyway, here's how to install it:
- Install rpmextract ( sudo pacman -S rpmextract )
- Download the RPM bundle of OpenOffice for your architecture and language and extract it (tar xf Apacheblabla.tar.gz)
- When the bundle is unpacked you get a directory like en_US or da_DK or whichever language you downloaded.
- I'll use en-US as an example in the commands below, substitute as needed.
- Then move the RPMS directory into a newly created oooarch/src dir as shown:
$ mkdir -p oooarch/src/
$ mv en-US/RPMS oooarch/src - Now create a new file inside oooarch called PKGBUILD, and put the following text into it:
pkgname=apache-openoffice
pkgver=4.1.1 #or something
pkgrel=1
pkgdesc="Danish openoffice from Apache"
arch=('x86_64')
license=('GPL')
depends=('libidn')
makedepends=('rpmextract')
build() { - Then execute:
$ cd oooarch/src/
$ find *.rpm -exec echo rpmextract.sh {} \; >> ../PKGBUILD - Now open the PKGBUILD file again, and add the following text:
}
package() {
mv opt ${pkgdir}
}
$ makepkg
$ sudo pacman -U apache-openoffice-blablabla.tar.xz
Done, this does not include .desktop files and such, you can add these if you want, I don't care for them.
One thing that might be convenient though, is to add a symlink /usr/bin/soffice -> /opt/openoffice4/program/soffice so that office can be started with the "soffice" command and documents opened with the "soffice" binary, this will automatically open the writer, calc, draw, applications depending on the argument file.
$ ln -s /opt/openoffice4/program/soffice /usr/bin/soffice
That's it.