%global sourceversion 3.3.1-final Name: loolwsd Version: 3.3.1 Release: 0.1%{?dist} Summary: LibreOffice Online Web Socket Daemon License: MPL Source0: https://github.com/LibreOffice/online/archive/%{sourceversion}.tar.gz # https://gerrit.libreoffice.org/#/c/49097/ Source1: loolwsd.service Patch0: %{name}-no_setcap_build.patch %{?systemd_requires} BuildRequires: systemd BuildRequires: libcap libcap-devel libpng-devel poco-devel >= 1.7.5 python python-polib pcre-devel BuildRequires: kernel-headers glibc-devel autoconf automake libtool cppunit-devel npm jake fontconfig BuildRequires: python-lxml pam-devel BuildRequires: devtoolset-7 Requires(pre): shadow-utils Requires: libreoffice-core systemd Requires: expat keyutils-libs krb5-libs libattr libcap libcom_err libgcc libpng libselinux pcre xz-libs zlib cppunit openssl-libs Requires: poco-crypto >= 1.7.5 poco-foundation >= 1.7.5 poco-json >= 1.7.5 poco-net >= 1.7.5 poco-netssl >= 1.7.5 poco-util >= 1.7.5 poco-xml >= 1.7.5 Requires: atk avahi-glib avahi-libs bzip2-libs cairo cups-libs dbus-glib dbus-libs fontconfig freetype GConf2 gdk-pixbuf2 glib2 gnome-vfs2 graphite2 Requires: gstreamer gstreamer-plugins-base gtk2 harfbuzz libdrm libffi libICE libSM libuuid libX11 libXau libxcb Requires: libXcomposite libXcursor libXdamage libXext libXfixes libXi libXinerama libXrandr libXrender libxshmfence libXt libXxf86vm Requires: mesa-libEGL mesa-libgbm mesa-libGL mesa-libglapi pango pixman python3 Requires(post): coreutils grep sed fontconfig Provides: loolwsd = %{version} Obsoletes: loolwsd <= %{version} Provides: loleaflet = 1.5.8 Obsoletes: loleaflet <= 1.5.8 %description LibreOffice Online Web Socket Daemon %prep %setup -n online-%{sourceversion} %patch0 -p1 %build source /opt/rh/devtoolset-7/enable ./autogen.sh %configure \ --enable-silent-rules \ --with-lokit-path=`pwd`/bundled/include \ --with-lo-path=%{_libdir} \ --disable-setcap make CXXFLAGS="%{optflags} -Wno-error" %{?_smp_mflags} %check #make check %install make install DESTDIR=%{buildroot} install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service install -d -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates install -D -m 644 sysconfig.loolwsd %{buildroot}%{_sysconfdir}/sysconfig/loolwsd mkdir -p %{buildroot}%{_sysconfdir}/cron.d cat > %{buildroot}%{_sysconfdir}/cron.d/loolwsd.cron < %{buildroot}%{_sysconfdir}/pam.d/loolwsd </dev/null || groupadd -r lool getent passwd lool >/dev/null || useradd -g lool -r lool exit 0 %post setcap cap_fowner,cap_mknod,cap_sys_chroot=ep %{_bindir}/loolforkit setcap cap_sys_admin=ep %{_bindir}/loolmount mkdir -p %%{_localstatedir}/cache/loolwsd && chown lool:lool %{_localstatedir}/cache/loolwsd rm -rf %{_localstatedir}/cache/loolwsd/* # Figure out where LO is installed, let's hope it is not a mount point # Create a directory for loolwsd on the same file system loroot=%{_libdir}/libreoffice loolparent=`cd ${loroot} && cd .. && /bin/pwd` rm -rf ${loolparent}/lool mkdir -p ${loolparent}/lool/child-roots chown lool:lool ${loolparent}/lool chown lool:lool ${loolparent}/lool/child-roots fc-cache ${loroot}/share/fonts/truetype su lool -c "loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null 2>&1" %systemd_post loolwsd.service %preun %systemd_preun loolwsd.service %postun %systemd_postun loolwsd.service %changelog * Sun May 13 2018 Bugzy Little - 6.0.0.3-2 - Reduce package install requirements * Thu Feb 1 2018 Christian Glombek - 6.0.0.3-1 - Updates to version 6.0.0.3 - Adds patch to to build without env - Adds PAM support (upstream @Timar) * Wed Sep 27 2017 Christian Glombek - 5.4.2.2-1 - RPM packaging for LibreOffice Online in Fedora - Forked from https://github.com/LibreOffice/online/blob/fdec71ad6963bd91fa56b379bdb0380776efd93a/loolwsd.spec.in - Renamed package from loolwsd to libreoffice-online * Mon Aug 03 2015 Mihai Varga - added the cronjob * Tue May 19 2015 Tor Lillqvist - Initial RPM release