File SOGo5.spec of Package SOGo5
#
# spec file for package SOGo4
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define sope_name sope49
%define sope_soname 4_9
%define gs_library %{_libdir}/GNUstep
%define gs_makefiles %{_datadir}/GNUstep/Makefiles
%define sogo_major_version 5
%define sogo_version 5.11.2
%define sogo_name SOGo
%define sbjson_major_version 2
%define enable_openchange 0
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
%define sogo_user sogo
Summary: %{sogo_name} Grouware Server
Name: %{sogo_name}%{sogo_major_version}
Version: %{sogo_version}
Release: 0
License: GPL-2.0-or-later
URL: http://www.inverse.ca/contributions/sogo.html
Group: Productivity/Networking/Other
#Source: https://packages.inverse.ca/SOGo/sources/SOGo-%%{version}.tar.gz
Source: https://packages.sogo.nu/sources/SOGo-%{version}.tar.gz
Source1: %{name}-tmpfile
Source99: %{name}-rpmlintrc
Patch0: %{name}-logrotate.patch
# PATCH-FIX-OPENSUSE: SOGo-systemd.patch - Fix that sogo need memcached run before.
Patch1: %{name}-systemd.patch
# PATCH-FIX-OPENSUSE: SOGo-conf.patch - Insert some interesting parameters.
Patch2: %{name}-conf.patch
Prefix: /usr
AutoReqProv: off
Requires: gnustep-base >= 1.23
#Requires: %%{sope_name}-core
Requires: cron
Requires: httpd
Requires: logrotate
Requires: %{sope_name}-appserver
Requires: libNGLdap%{sope_soname}
Requires: libNGMime%{sope_soname}
Requires: libNGCards%{sope_soname} >= %{sogo_version}
Requires: libGDLContentStore%{sope_soname} >= %{sogo_version}
Requires: SOPE-gdl1-any-database
Requires: libSBJson%{sbjson_major_version}
Requires: libmemcached
Requires: memcached
Requires: zip
%if 0%{?suse_version} > 1315
Requires: (%{sope_name}-gdl1-mysql or s%{sope_name}-gdl1-postgresql)
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildRequires: gcc-objc
BuildRequires: gnustep-base
BuildRequires: gnustep-base-devel
BuildRequires: gnustep-make %{sope_name}-appserver-devel
BuildRequires: %{sope_name}-core-devel
BuildRequires: libNGLdap%{sope_soname}-devel
BuildRequires: libNGMime%{sope_soname}-devel
BuildRequires: %{sope_name}-xml-devel
BuildRequires: libGDLAccess%{sope_soname}-devel
BuildRequires: libSBJson%{sbjson_major_version}-devel
BuildRequires: libSBJson%{sbjson_major_version}
BuildRequires: libmemcached-devel
BuildRequires: openldap2-devel
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libsodium)
BuildRequires: pkgconfig(libzip)
BuildRequires: pkgconfig(libytnef)
BuildRequires: pkgconfig(liboath)
BuildRequires: sed %{?oc_build_depends}
%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8
BuildRequires: fdupes
%endif
# Still needed?
#%%if 0%%{?suse_version} > 1315
#BuildRequires: libffi7
#%%else
#BuildRequires: libffi6
#%%endif
Requires: liblasso3
Requires: libytnef0
BuildRequires: liblasso-devel
BuildRequires: python
Requires(pre): shadow
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(systemd)
Requires(post): %fillup_prereq
BuildRequires: -post-build-checks
# strange 64bit-portability-issue NSData+Crypto.m:610, 674
Conflicts: SOGo
Conflicts: SOGo3
%{?systemd_requires}
# saml is enabled everywhere except on el5 since its glib2 is prehistoric
%define saml2_cfg_opts "--enable-saml2"
%define mfa_cfg_opts "--enable-mfa"
%define sodium_cfg_opts "--enable-sodium"
%{?el5:%define saml2_cfg_opts ""}
%{?el6:Requires: lasso}
%{?el6:BuildRequires: lasso-devel}
%{?el7:Requires: lasso}
%{?el7:BuildRequires: lasso-devel}
%description
SOGo is a groupware server built around OpenGroupware.org (OGo) and
the SOPE application server. It focuses on scalability.
The Inverse edition of this project has many feature enhancements:
- CalDAV and GroupDAV compliance
- full handling of vCard as well as vCalendar/iCalendar formats
- support for folder sharing and ACLs
The Web interface has been rewritten in an AJAX fashion to provided a faster
UI for the users, consistency in look and feel with the Mozilla applications,
and to reduce the load of the transactions on the server.
%package -n sogo-tool
Summary: Command-line toolsuite for SOGo
Group: Productivity/Networking/Other
Requires: %{sogo_name}%{sogo_major_version} = %{sogo_version}
AutoReqProv: off
%description -n sogo-tool
Administrative tool for SOGo that provides the following internal commands:
backup -- backup user folders
restore -- restore user folders
remove-doubles -- remove duplicate contacts from the user addressbooks
check-doubles -- list user addressbooks with duplicate contacts
%package -n sogo-slapd-sockd
Summary: SOGo backend for slapd and back-sock
Group: Productivity/Networking/Other
AutoReqProv: off
%description -n sogo-slapd-sockd
SOGo backend for slapd and back-sock, enabling access to private addressbooks
via LDAP.
%package -n sogo-ealarms-notify
Summary: SOGo utility for executing email alarms
Group: Productivity/Networking/Other
AutoReqProv: off
%description -n sogo-ealarms-notify
SOGo utility executed each minute via a cronjob for executing email alarms.
%package -n sogo-activesync
Summary: SOGo module to handle ActiveSync requests
Group: Productivity/Networking/Other
Requires: wbxml2, %{sogo_name}%{sogo_major_version} = %{sogo_version}
BuildRequires: libwbxml2-devel
AutoReqProv: off
%description -n sogo-activesync
The SOGo module to handle ActiveSync requests.
%package -n %{sogo_name}%{sogo_major_version}-devel
Summary: Development headers and libraries for SOGo
Group: Development/Libraries/C and C++
Requires: %{sogo_name}%{sogo_major_version} = %{version}
AutoReqProv: off
%description -n %{sogo_name}%{sogo_major_version}-devel
Development headers and libraries for SOGo. Needed to create modules.
%package -n libGDLContentStore%{sope_soname}
Summary: Storage backend for folder abstraction
Group: Development/Libraries/C and C++
Requires: libGDLAccess%{sope_soname}
AutoReqProv: off
%description -n libGDLContentStore%{sope_soname}
The storage backend implements the "low level" folder abstraction, which is
basically an arbitary "BLOB" containing some document.
SOPE is a framework for developing web applications and services. The
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.
%package -n libGDLContentStore%{sope_soname}-devel
Summary: Development files for the GNUstep database libraries
Group: Development/Libraries/C and C++
Requires: libGDLContentStore%{sope_soname} = %{version}
Requires: libGDLAccess%{sope_soname}
AutoReqProv: off
%description -n libGDLContentStore%{sope_soname}-devel
This package contains the header files for SOPE's GDLContentStore library.
SOPE is a framework for developing web applications and services. The
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.
%package -n libNGCards%{sope_soname}
Summary: SOPE versit parsing library for iCal and VCard formats
Group: Development/Libraries/C and C++
AutoReqProv: off
%description -n libNGCards%{sope_soname}
Library SOPE versit parsing library for iCal and VCard formats.
%package -n libNGCards%{sope_soname}-devel
Summary: SOPE versit parsing library for iCal and VCard formats
Group: Development/Libraries/C and C++
Requires: libNGCards%{sope_soname} = %{version}
AutoReqProv: off
%description -n libNGCards%{sope_soname}-devel
Devel SOPE versit parsing library for iCal and VCard formats.
%if %enable_openchange
%package openchange-backend
Summary: SOGo backend for OpenChange
Group: Productivity/Networking/Other
AutoReqProv: off
%description openchange-backend
SOGo backend for OpenChange
%endif
########################################
%prep
rm -fr ${RPM_BUILD_ROOT}
%setup -q -n SOGo-%{sogo_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
# remove --rpath in GNUmakefile
for makefiledir in UI/Contacts UI/SOGoUI UI/MailerUI UI/Common UI/MailPartViewers \
UI/PreferencesUI UI/MainUI UI/AdministrationUI UI/Scheduler \
SoObjects/SOGo Main Tests/Unit Tools; do
sed -i 's/^\(ADDITIONAL_LDFLAGS.*\)\(--rpath,\)\(.*\)//' ${makefiledir}/GNUmakefile
done
#sed -i 's/^\(ADDITIONAL_LDFLAGS.*\)\(--rpath,\)\(.*\)//' Tests/Integration/GNUmakefile.preamble
sed -i 's/^\(.*\)\(-Wl,-rpath,$(SOGO_SYSLIBDIR)\/sogo\)\(.*\)//' SoObjects/common.make
sed -i 's/^\(.*\)\(-Wl,-rpath,$(SOGO_SYSLIBDIR)\/sogo\)\(.*\)//' ActiveSync/common.make
# Fix path of sogo-backup.sh in cron file
sed -i -e 's|\/usr\/share\/doc\/sogo\/sogo-backup.sh|\/usr\/share\/doc\/packages\/SOGo4\/sogo-backup.sh|g' Scripts/sogo.cron
# rpmlintrc
chmod -x Scripts/updates.php
chmod -x SoObjects/Mailer/SOGoMailLithuanianForward.wo/SOGoMailLithuanianForward.*
chmod -x SoObjects/Mailer/SOGoMailLithuanianReply.wo/SOGoMailLithuanianReply.*
chmod -x UI/MainUI/Slovenian.lproj/Locale
chmod -x UI/Templates/*.wox
chmod -x UI/WebServerResources/css/icons.css
# small tweak to the python script for RHEL5
# if hex(sys.hexversion) < 0x02060000
#%%if %%{python_sys_pyver} < 33947648
# sed -i 's!/usr/bin/env python!/usr/bin/env python2.6!' Scripts/openchange_user_cleanup
#%%endif
# ****************************** build ********************************
%build
%if 0%{?el7}
. /usr/lib64/GNUstep/Makefiles/GNUstep.sh
%else
. /usr/share/GNUstep/Makefiles/GNUstep.sh
%endif
./configure \
--disable-debug \
--disable-strip \
%saml2_cfg_opts \
%mfa_cfg_opts \
%sodium_cfg_opts
case %{_target_platform} in
ppc64-*)
cc="gcc -m64";
ldflags="-m64";;
*)
cc="gcc";
ldflags="";;
esac
make CC="$cc" LDFLAGS="$ldflags" messages=yes
# OpenChange
%if %enable_openchange
(cd OpenChange; \
LD_LIBRARY_PATH=../SOPE/NGCards/obj:../SOPE/GDLContentStore/obj \
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM )
%endif
# ****************************** install ******************************
%install
# delete reference to buildroot
sed -i /SOGO_LIBDIR/d SoObjects/SOGo/GNUmakefile.preamble
QA_SKIP_BUILD_ROOT=1
export QA_SKIP_BUILD_ROOT
case %{_target_platform} in
ppc64-*)
cc="gcc -m64";
ldflags="-m64";;
*)
cc="gcc";
ldflags="";;
esac
make DESTDIR=${RPM_BUILD_ROOT} \
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
CC="$cc" LDFLAGS="$ldflags" \
install
install -d ${RPM_BUILD_ROOT}%{_unitdir}
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.d
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
#install -d ${RPM_BUILD_ROOT}/etc/sysconfig
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d
install -d ${RPM_BUILD_ROOT}/usr/sbin
install -d -m750 ${RPM_BUILD_ROOT}/var/lib/sogo
install -d -m750 ${RPM_BUILD_ROOT}/var/log/sogo
install -d ${RPM_BUILD_ROOT}/run/sogo
install -d ${RPM_BUILD_ROOT}/var/spool/sogo
install -d -m 750 ${RPM_BUILD_ROOT}%{_sysconfdir}/sogo
install -m 640 Scripts/sogo.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/sogo/
#install -d -m 750 -o %%sogo_user -g %%sogo_user ${RPM_BUILD_ROOT}/etc/sogo
#install -m 640 -o %%sogo_user -g %%sogo_user Scripts/sogo.conf ${RPM_BUILD_ROOT}/etc/sogo/
#install -m 755 Scripts/openchange_user_cleanup ${RPM_BUILD_ROOT}/%%{_sbindir}
cat Apache/SOGo.conf | sed -e "s@/lib/@/%{_lib}/@g" > ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/SOGo.conf
install -m 600 Scripts/sogo.cron ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.d/sogo
cp Scripts/tmpwatch ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/sogo-tmpwatch
chmod 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/sogo-tmpwatch
cp Scripts/logrotate ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/sogo
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo %{_libdir}/sogo > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
#%%if %%{with systemd}
cp Scripts/sogo-systemd-redhat ${RPM_BUILD_ROOT}%{_unitdir}/sogod.service
chmod 644 ${RPM_BUILD_ROOT}%{_unitdir}/sogod.service
mkdir ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d
install -D -m0644 %{S:1} ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/sogo.conf
# ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsogod
#%%else
# #cp Scripts/sogo-init.d-redhat ${RPM_BUILD_ROOT}/etc/init.d/sogod
# mkdir -p ${RPM_BUILD_ROOT}%%{_sysconfdir}/init.d
# install -D -m0755 %%{S:2} %%{buildroot}%%{_initrddir}/sogod
# chmod 755 ${RPM_BUILD_ROOT}%%{_sysconfdir}/init.d/sogod
# ln -sf %%{_sysconfdir}/init.d/sogod %%{buildroot}%%{_sbindir}/rcsogod
#%%endif
#install -D -m0644 %%{S:3} %%{buildroot}%%{_sysconfdir}/logrotate.d/%%{name}
#install -D -m0755 %%{S:4} %%{buildroot}%%{_sbindir}/sogod-wrapper
#chmod 755 %%{buildroot}%%{_sbindir}/sogod
#chmod 755 %%{buildroot}%%{_sysconfdir}/cron.daily/%%{name}.nu-tmpwatch
#ln -sf %%{_sysconfdir}/init.d/sogod %%{buildroot}%%{_sbindir}/rcsogod
install -d -m 755 %{buildroot}%{_fillupdir}
install -m 644 Scripts/sogo-default %{buildroot}%{_fillupdir}/sysconfig.sogo
#install -D -m0644 Scripts/sogo-default ${RPM_BUILD_ROOT}sysconfig.sogo
rm -rf ${RPM_BUILD_ROOT}%{_bindir}/test_quick_extract
# OpenChange
%if %enable_openchange
(cd OpenChange; \
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir} \
make DESTDIR=${RPM_BUILD_ROOT} \
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
CC="$cc" LDFLAGS="$ldflags" \
install)
%endif
# ActiveSync
(cd ActiveSync; \
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir} \
make DESTDIR=${RPM_BUILD_ROOT} \
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
CC="$cc" LDFLAGS="$ldflags" \
install)
%fdupes %{buildroot}%{_libdir}
# ****************************** files ********************************
%files -n %{sogo_name}%{sogo_major_version}
%defattr(-,root,root,-)
/usr/lib/tmpfiles.d/sogo.conf
%{_sysconfdir}/cron.daily/sogo-tmpwatch
%dir %attr(0750, %sogo_user, %sogo_user) %{_var}/lib/sogo
%dir %attr(0750, %sogo_user, %sogo_user) %{_var}/log/sogo
%ghost %attr(0755, %sogo_user, %sogo_user) /run/sogo
%dir %attr(0700, %sogo_user, %sogo_user) %{_var}/spool/sogo
%dir %attr(0750, root, %sogo_user) %{_sysconfdir}/sogo
%{_sbindir}/sogod
#%%{_sbindir}/rcsogod
#%%{_sbindir}/openchange_user_cleanup
%{_libdir}/sogo/libSOGo.so.*
%{_libdir}/sogo/libSOGoUI.so.*
%{_libdir}/GNUstep/SOGo/AdministrationUI.SOGo
%{_libdir}/GNUstep/SOGo/Appointments.SOGo
%{_libdir}/GNUstep/SOGo/CommonUI.SOGo
%{_libdir}/GNUstep/SOGo/Contacts.SOGo
%{_libdir}/GNUstep/SOGo/ContactsUI.SOGo
%{_libdir}/GNUstep/SOGo/MailPartViewers.SOGo
%{_libdir}/GNUstep/SOGo/Mailer.SOGo
%{_libdir}/GNUstep/SOGo/MailerUI.SOGo
%{_libdir}/GNUstep/SOGo/MainUI.SOGo
%{_libdir}/GNUstep/SOGo/PreferencesUI.SOGo
%{_libdir}/GNUstep/SOGo/SchedulerUI.SOGo
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Resources
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}/sogo/libSOGo.so.*
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}/Resources
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/Current
%{_libdir}/GNUstep/SOGo/Templates
%{_libdir}/GNUstep/SOGo/WebServerResources
%{_libdir}/GNUstep/OCSTypeModels
%{_libdir}/GNUstep/WOxElemBuilders-*
%dir %{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}/sogo
%dir %{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}
%dir %{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions
%dir %{_libdir}/GNUstep/Frameworks/SOGo.framework
%dir %{_libdir}/GNUstep/Frameworks
%dir %{_libdir}/GNUstep/SOGo
%dir %{_libdir}/sogo
%config(noreplace) %attr(0640, root, %sogo_user) %{_sysconfdir}/sogo/sogo.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/sogo
%config(noreplace) %{_sysconfdir}/cron.d/sogo
%config(noreplace) %{_sysconfdir}/apache2/conf.d/SOGo.conf
%config %{_sysconfdir}/ld.so.conf.d/%{name}.conf
%dir %{_sysconfdir}/apache2
%dir %{_sysconfdir}/apache2/conf.d
%{_unitdir}/sogod.service
%{_fillupdir}/sysconfig.sogo
#%%config(noreplace) %%{_sysconfdir}/sysconfig/sogo
%doc ChangeLog Scripts/*sh Scripts/updates.php Apache/SOGo-apple-ab.conf
%files -n sogo-tool
%{_sbindir}/sogo-tool
%files -n sogo-ealarms-notify
%{_sbindir}/sogo-ealarms-notify
%files -n sogo-slapd-sockd
%{_sbindir}/sogo-slapd-sockd
%files -n sogo-activesync
%{_libdir}/GNUstep/SOGo/ActiveSync.SOGo
%doc ActiveSync/LICENSE ActiveSync/README
%dir %{_libdir}/GNUstep/SOGo
%files -n %{sogo_name}%{sogo_major_version}-devel
%{_includedir}/SOGo
%{_includedir}/SOGoUI
%{_libdir}/sogo/libSOGo*.so
%{_libdir}/sogo/libSOGoUI*.so
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Headers
%{_libdir}/GNUstep/Frameworks/SOGo.framework/sogo/libSOGo.so
%{_libdir}/GNUstep/Frameworks/SOGo.framework/sogo/SOGo
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}/Headers
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}/sogo/libSOGo*.so
%{_libdir}/GNUstep/Frameworks/SOGo.framework/Versions/%{sogo_major_version}/sogo/SOGo
%dir %{_libdir}/GNUstep/Frameworks/SOGo.framework/sogo
%files -n libGDLContentStore%{sope_soname}
%defattr(-,root,root,-)
%{_libdir}/sogo/libGDLContentStore*.so.*
%dir %{_libdir}/sogo
%files -n libGDLContentStore%{sope_soname}-devel
%{_includedir}/GDLContentStore
%{_libdir}/sogo/libGDLContentStore*.so
%dir %{_libdir}/sogo
%files -n libNGCards%{sope_soname}
%{_libdir}/sogo/libNGCards.so.*
%{_libdir}/GNUstep/SaxDrivers-*
%{_libdir}/GNUstep/SaxMappings
%{_libdir}/GNUstep/Libraries/Resources/NGCards
%dir %{_libdir}/sogo
%files -n libNGCards%{sope_soname}-devel
%{_includedir}/NGCards
%{_libdir}/sogo/libNGCards*.so
%dir %{_libdir}/sogo
%if %enable_openchange
%files openchange-backend
%defattr(-,root,root,-)
%{_libdir}/GNUstep/SOGo/*.MAPIStore
%{_libdir}/mapistore_backends/*
%endif
# **************************** pkgscripts *****************************
%pre
getent group %sogo_user >/dev/null || groupadd -r %sogo_user
getent passwd %sogo_user >/dev/null || useradd -r -g %sogo_user -d %{_var}/lib/sogo -s /sbin/nologin -c "SOGo daemon" %sogo_user
%service_add_pre sogod.service
exit 0
#%%pre
#if ! getent group %%sogo_user >& /dev/null; then
# groupadd -f -r %%sogo_user
#fi
#if ! id %%sogo_user >& /dev/null; then
# /usr/sbin/useradd -d %%{_var}/lib/sogo -c "SOGo daemon" -s /sbin/nologin -M -r -g %%sogo_user %%sogo_user
#fi
%preun
%service_del_preun sogod.service
%post
%service_add_post sogod.service
%fillup_only -n sogo sogo
%if 0%{?sle_version} != 120100 || !0%{?is_opensuse}
%tmpfiles_create %_tmpfilesdir/sogo.conf
%endif
/sbin/ldconfig
#%%post
# update timestamp on imgs,css,js to let apache know the files changed
find %{_libdir}/GNUstep/SOGo/WebServerResources -exec touch {} \;
# make shells scripts in documentation directory executable
find %{_docdir}/ -name '*.sh' -exec chmod a+x {} \;
%postun
%service_del_postun sogod.service
/sbin/ldconfig
#
#if test "$1" = "0"
#then
# if [ -e ~sogo/.profile ]; then
# mv -f ~sogo/.profile ~sogo/.profile.orig
# egrep -v "^source %%{gs_makefiles}/GNUstep.sh" ~sogo/.profile.orig > ~sogo/.profile
# rm -f ~sogo/.profile.orig
# /bin/chown sogo ~sogo/.profile
# fi
# /usr/sbin/userdel sogo
# /usr/sbin/groupdel sogo > /dev/null 2>&1
# /bin/rm -rf /var/spool/sogod
#fi
%post -n libNGCards%{sope_soname} -p /sbin/ldconfig
%postun -n libNGCards%{sope_soname} -p /sbin/ldconfig
%post -n libGDLContentStore%{sope_soname} -p /sbin/ldconfig
%postun -n libGDLContentStore%{sope_soname}
/sbin/ldconfig
#%%if 0%%{?_with_systemd}
# systemctl daemon-reload
# systemctl enable sogod
# systemctl start sogod > /dev/null 2>&1
#%%else
# /sbin/chkconfig --add sogod
# /etc/init.d/sogod condrestart >&/dev/null
#%%endif
#%%preun
#if [ "$1" == "0" ]
#then
# %%if 0%%{?_with_systemd}
# systemctl disable sogod
# systemctl stop sogod > /dev/null 2>&1
# %%else
# /sbin/chkconfig --del sogod
# /sbin/service sogod stop > /dev/null 2>&1
# %%endif
#fi
#%%postun
#if test "$1" = "0"
#then
# /usr/sbin/userdel %%sogo_user
# /usr/sbin/groupdel %%sogo_user > /dev/null 2>&1
# /bin/rm -rf %%{_var}/run/sogo
# /bin/rm -rf %%{_var}/spool/sogo
# not removing /var/lib/sogo to keep .GNUstepDefaults
#fi
%changelog