Skip to content

Instantly share code, notes, and snippets.

@n-epifanov
Last active May 10, 2019 06:12
Show Gist options
  • Save n-epifanov/364a80ad0e083948b9f873640e50fe89 to your computer and use it in GitHub Desktop.
Save n-epifanov/364a80ad0e083948b9f873640e50fe89 to your computer and use it in GitHub Desktop.
A script to build and install LibreOffice 4.4.7.2 with Python 2.7 on Ubuntu Trusty 14.04. To import uno package you'll need to bootstrap it, see https://gist.github.com/nicktime/a35ed52a4b04d6da5b867c6907c825f3
#!/bin/bash -xe
sudo apt-get update
sudo apt-get build-dep libreoffice
sudo apt-get install pkg-config
mkdir libreoffice
cd libreoffice
wget https://downloadarchive.documentfoundation.org/libreoffice/old/4.4.7.2/src/libreoffice-4.4.7.2.tar.xz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/4.4.7.2/src/libreoffice-dictionaries-4.4.7.2.tar.xz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/4.4.7.2/src/libreoffice-help-4.4.7.2.tar.xz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/4.4.7.2/src/libreoffice-translations-4.4.7.2.tar.xz
tar -xf libreoffice-4.4.7.2.tar.xz
tar -xf libreoffice-dictionaries-4.4.7.2.tar.xz
tar -xf libreoffice-help-4.4.7.2.tar.xz
tar -xf libreoffice-translations-4.4.7.2.tar.xz
cd libreoffice-4.4.7.2/
export PYTHON=/usr/bin/python2.7 PYTHON_CFLAGS="$(pkg-config --cflags python-2.7)" PYTHON_LIBS="$(pkg-config --libs python-2.7)"
./autogen.sh --with-package-format=deb --enable-epm
make -j6
sudo dpkg -i workdir/installation/LibreOffice_Dev/deb/install/LibreOfficeDev_4.4.7.2_Linux_x86-64_deb/DEBS/*.deb
# SDK, optional.
sudo dpkg -i workdir/installation/LibreOffice_Dev_SDK/deb/install/LibreOfficeDev_4.4.7.2_Linux_x86-64_deb_sdk/DEBS/lodevbasis4.4-sdk_4.4.7.2-2_amd64.deb
sudo apt-get install -f
echo /opt/libreofficedev4.4/program | sudo tee /usr/lib/python2.7/dist-packages/uno.pth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment