Last active
April 22, 2020 09:27
-
-
Save mmaridev/a69312ef14042bd77dcb668ec541b75a to your computer and use it in GitHub Desktop.
-WIP- Compile LibreOffice core+online from source on Debian 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright (c) 2019 Marco Marinello <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
# | |
# references | |
# https://wiki.documentfoundation.org/Development/BuildingOnLinux | |
# https://wiki.documentfoundation.org/Development/Linux_Build_Dependencies#Utopic_.2814.10.29_.2F_Vivid_.2815.04.29 | |
# https://wiki.documentfoundation.org/Development/LibreOffice_Online#Development | |
# https://gerrit.libreoffice.org/plugins/gitiles/online/+/HEAD/wsd/README | |
# https://gist.github.com/m-jowett/0f28bff952737f210574fc3b2efaa01a | |
# DEPS | |
grep backports /etc/apt/sources.list || echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list | |
apt update && apt install -y git build-essential devscripts libkrb5-dev openssl g++ libssl-dev libcap-dev libtool m4 automake libcppunit-dev libcppunit-doc pkg-config python-polib python3-polib default-jre libpam-dev npm python-lxml python3-lxml libreoffice-dev libpoco-dev libpng-dev sudo cpio translate-toolkit | |
npm i npm@latest -g | |
apt install -t buster-backports -y libreofficekit-dev libreoffice-core | |
# Create user | |
getent passwd lool-user || useradd -s /bin/bash lool-user | |
# Clone | |
mkdir -p /opt | |
cd /opt | |
[ -e online ] || git clone --branch=libreoffice-6-3 https://git.libreoffice.org/online | |
cd online | |
git checkout -- . | |
git checkout libreoffice-6.2.3.2 | |
MASTER="/opt/core" | |
./autogen.sh | |
./configure --enable-silent-rules --with-max-connections=100000 --with-max-documents=100000 --enable-anonymize-filenames --enable-anonymize-usernames --disable-werror | |
make -j$(nproc) | |
chown -R lool-user . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright (c) 2019 Marco Marinello <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
# | |
# references | |
# https://wiki.documentfoundation.org/Development/BuildingOnLinux | |
# https://wiki.documentfoundation.org/Development/Linux_Build_Dependencies#Utopic_.2814.10.29_.2F_Vivid_.2815.04.29 | |
# https://wiki.documentfoundation.org/Development/LibreOffice_Online#Development | |
# https://gerrit.libreoffice.org/plugins/gitiles/online/+/HEAD/wsd/README | |
# https://gist.github.com/m-jowett/0f28bff952737f210574fc3b2efaa01a | |
# DEPS | |
apt-get install -y git build-essential devscripts libkrb5-dev openssl g++ libssl-dev libcap-dev libtool m4 automake libcppunit-dev libcppunit-doc pkg-config python-polib python3-polib default-jre libpam-dev npm python-lxml python3-lxml translate-toolkit libubsan0 libubsan1 | |
apt-get build-dep -y libreoffice | |
npm i npm@latest -g | |
# Clone and build core | |
mkdir -p /opt | |
cd /opt | |
[ -e core ] || git clone --branch=libreoffice-6-2-8 https://git.libreoffice.org/core | |
getent passwd lool-user || useradd -s /bin/bash lool-user | |
chown -R lool-user core | |
cd core | |
git checkout libreoffice-6-3-2 | |
su lool-user -c ./autogen.sh | |
su lool-user -c ./configure | |
su lool-user -c "make -j$(nproc)" | |
# Compile POCO | |
cd /opt | |
# REPLACE with the latest version from https://pocoproject.org/download.html | |
ls poco-* || wget -O - https://pocoproject.org/releases/poco-1.9.4/poco-1.9.4-all.tar.gz | tar -xvz | |
# Create the directory for the installation | |
mkdir -p poco | |
chown -R lool-user poco* | |
cd poco-* | |
su lool-user -c "./configure --prefix=/opt/poco" | |
su lool-user -c "make install -j$(nproc)" | |
# Compile LOOL | |
cd /opt | |
[ -e online ] || git clone --branch=libreoffice-6-3 https://git.libreoffice.org/online | |
cd online | |
# 305832f is the last time CODE was built | |
#git checkout 305832f | |
# Try with a newer "release" | |
git checkout libreoffice-6.2.3.2 | |
MASTER="/opt/core" | |
./autogen.sh | |
./configure --enable-silent-rules --with-lokit-path=${MASTER}/include --with-lo-path=${MASTER}/instdir --with-poco-includes=/opt/poco/include --with-poco-libs=/opt/poco/lib --with-max-connections=100000 --with-max-documents=100000 --enable-anonymize-filenames --enable-anonymize-usernames --disable-werror | |
# Needs superpowers to compile | |
make -j$(nproc) | |
chown -R lool-user . | |
# | |
# real 236m22,048s | |
# user 808m58,465s | |
# sys 61m32,114s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment