chore(rhel): drop support for RHEL 6
parent
a2ef542ad4
commit
9703cfdfd5
|
@ -15,13 +15,6 @@
|
||||||
|
|
||||||
%{!?python_sys_pyver: %global python_sys_pyver %(/usr/bin/python -c "import sys; print sys.hexversion")}
|
%{!?python_sys_pyver: %global python_sys_pyver %(/usr/bin/python -c "import sys; print sys.hexversion")}
|
||||||
|
|
||||||
# Systemd for fedora >= 17 or el 7
|
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
|
||||||
%global _with_systemd 1
|
|
||||||
%else
|
|
||||||
%global _with_systemd 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%define sogo_user sogo
|
%define sogo_user sogo
|
||||||
|
|
||||||
Summary: SOGo
|
Summary: SOGo
|
||||||
|
@ -36,26 +29,11 @@ Group: Productivity/Groupware
|
||||||
Source: SOGo-%{sogo_version}.tar.gz
|
Source: SOGo-%{sogo_version}.tar.gz
|
||||||
Prefix: /usr
|
Prefix: /usr
|
||||||
AutoReqProv: off
|
AutoReqProv: off
|
||||||
Requires: gnustep-base >= 1.23, sope%{sope_major_version}%{sope_minor_version}-core, httpd, sope%{sope_major_version}%{sope_minor_version}-core, sope%{sope_major_version}%{sope_minor_version}-appserver, sope%{sope_major_version}%{sope_minor_version}-ldap, sope%{sope_major_version}%{sope_minor_version}-cards >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-gdl1-contentstore >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-sbjson, libmemcached, memcached, tmpwatch, zip
|
Requires: gnustep-base >= 1.23, sope%{sope_major_version}%{sope_minor_version}-core, httpd, sope%{sope_major_version}%{sope_minor_version}-core, sope%{sope_major_version}%{sope_minor_version}-appserver, sope%{sope_major_version}%{sope_minor_version}-ldap, sope%{sope_major_version}%{sope_minor_version}-cards >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-gdl1-contentstore >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-sbjson, lasso, libmemcached, memcached, libcurl, tmpwatch, zip
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||||
BuildRequires: gcc-objc gnustep-base gnustep-make sope%{sope_major_version}%{sope_minor_version}-appserver-devel sope%{sope_major_version}%{sope_minor_version}-core-devel sope%{sope_major_version}%{sope_minor_version}-ldap-devel sope%{sope_major_version}%{sope_minor_version}-mime-devel sope%{sope_major_version}%{sope_minor_version}-xml-devel sope%{sope_major_version}%{sope_minor_version}-gdl1-devel sope%{sope_major_version}%{sope_minor_version}-sbjson-devel libmemcached-devel sed %{?oc_build_depends}
|
BuildRequires: gcc-objc gnustep-base gnustep-make sope%{sope_major_version}%{sope_minor_version}-appserver-devel sope%{sope_major_version}%{sope_minor_version}-core-devel sope%{sope_major_version}%{sope_minor_version}-ldap-devel sope%{sope_major_version}%{sope_minor_version}-mime-devel sope%{sope_major_version}%{sope_minor_version}-xml-devel sope%{sope_major_version}%{sope_minor_version}-gdl1-devel sope%{sope_major_version}%{sope_minor_version}-sbjson-devel lasso-devel libmemcached-devel sed libcurl-devel
|
||||||
|
|
||||||
|
|
||||||
# Required by MS Exchange freebusy lookups
|
|
||||||
%{?el5:Requires: curl}
|
|
||||||
%{?el5:BuildRequires: curl-devel}
|
|
||||||
%{?el6:Requires: libcurl}
|
|
||||||
%{?el6:BuildRequires: libcurl-devel}
|
|
||||||
|
|
||||||
# saml is enabled everywhere except on el5 since its glib2 is prehistoric
|
|
||||||
%define saml2_cfg_opts "--enable-saml2"
|
%define saml2_cfg_opts "--enable-saml2"
|
||||||
%{?el5:%define saml2_cfg_opts ""}
|
|
||||||
%{?el6:Requires: lasso}
|
|
||||||
%{?el6:BuildRequires: lasso-devel}
|
|
||||||
%{?el7:Requires: lasso}
|
|
||||||
%{?el7:BuildRequires: lasso-devel}
|
|
||||||
%{?el8:Requires: lasso}
|
|
||||||
%{?el8:BuildRequires: lasso-devel}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
SOGo is a groupware server built around OpenGroupware.org (OGo) and
|
||||||
|
@ -138,7 +116,7 @@ Requires: sope%{sope_major_version}%{sope_minor_version}-gdl1
|
||||||
AutoReqProv: off
|
AutoReqProv: off
|
||||||
|
|
||||||
%description -n sope%{sope_major_version}%{sope_minor_version}-gdl1-contentstore-devel
|
%description -n sope%{sope_major_version}%{sope_minor_version}-gdl1-contentstore-devel
|
||||||
This package contains the header files for SOPE's GDLContentStore library.
|
This package contains the header files for SOPE\'s GDLContentStore library.
|
||||||
|
|
||||||
SOPE is a framework for developing web applications and services. The
|
SOPE is a framework for developing web applications and services. The
|
||||||
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.
|
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.
|
||||||
|
@ -185,11 +163,7 @@ rm -fr ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
# ****************************** build ********************************
|
# ****************************** build ********************************
|
||||||
%build
|
%build
|
||||||
%if 0%{?rhel} >= 7
|
|
||||||
. /usr/lib64/GNUstep/Makefiles/GNUstep.sh
|
. /usr/lib64/GNUstep/Makefiles/GNUstep.sh
|
||||||
%else
|
|
||||||
. /usr/share/GNUstep/Makefiles/GNUstep.sh
|
|
||||||
%endif
|
|
||||||
./configure %saml2_cfg_opts
|
./configure %saml2_cfg_opts
|
||||||
|
|
||||||
case %{_target_platform} in
|
case %{_target_platform} in
|
||||||
|
@ -229,12 +203,7 @@ make DESTDIR=${RPM_BUILD_ROOT} \
|
||||||
CC="$cc" LDFLAGS="$ldflags" \
|
CC="$cc" LDFLAGS="$ldflags" \
|
||||||
install
|
install
|
||||||
|
|
||||||
%if 0%{?_with_systemd}
|
install -d ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
|
||||||
install -d ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
|
|
||||||
%else
|
|
||||||
install -d ${RPM_BUILD_ROOT}/etc/init.d
|
|
||||||
%endif
|
|
||||||
|
|
||||||
install -d ${RPM_BUILD_ROOT}/etc/cron.d
|
install -d ${RPM_BUILD_ROOT}/etc/cron.d
|
||||||
install -d ${RPM_BUILD_ROOT}/etc/cron.daily
|
install -d ${RPM_BUILD_ROOT}/etc/cron.daily
|
||||||
install -d ${RPM_BUILD_ROOT}/etc/logrotate.d
|
install -d ${RPM_BUILD_ROOT}/etc/logrotate.d
|
||||||
|
@ -253,18 +222,11 @@ install -m 600 Scripts/sogo.cron ${RPM_BUILD_ROOT}/etc/cron.d/sogo
|
||||||
cp Scripts/tmpwatch ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch
|
cp Scripts/tmpwatch ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch
|
||||||
chmod 755 ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch
|
chmod 755 ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch
|
||||||
cp Scripts/logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/sogo
|
cp Scripts/logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/sogo
|
||||||
|
cp Scripts/sogo-systemd-redhat ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service
|
||||||
%if 0%{?_with_systemd}
|
chmod 644 ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service
|
||||||
cp Scripts/sogo-systemd-redhat ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service
|
mkdir ${RPM_BUILD_ROOT}/etc/tmpfiles.d
|
||||||
chmod 644 ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service
|
cp Scripts/sogo-systemd.conf ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf
|
||||||
mkdir ${RPM_BUILD_ROOT}/etc/tmpfiles.d
|
chmod 644 ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf
|
||||||
cp Scripts/sogo-systemd.conf ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf
|
|
||||||
chmod 644 ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf
|
|
||||||
%else
|
|
||||||
cp Scripts/sogo-init.d-redhat ${RPM_BUILD_ROOT}/etc/init.d/sogod
|
|
||||||
chmod 755 ${RPM_BUILD_ROOT}/etc/init.d/sogod
|
|
||||||
%endif
|
|
||||||
|
|
||||||
cp Scripts/sogo-default ${RPM_BUILD_ROOT}/etc/sysconfig/sogo
|
cp Scripts/sogo-default ${RPM_BUILD_ROOT}/etc/sysconfig/sogo
|
||||||
rm -rf ${RPM_BUILD_ROOT}%{_bindir}/test_quick_extract
|
rm -rf ${RPM_BUILD_ROOT}%{_bindir}/test_quick_extract
|
||||||
|
|
||||||
|
@ -294,12 +256,8 @@ rm -fr ${RPM_BUILD_ROOT}
|
||||||
%files -n sogo
|
%files -n sogo
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
|
||||||
%if 0%{?_with_systemd}
|
|
||||||
/usr/lib/systemd/system/sogod.service
|
/usr/lib/systemd/system/sogod.service
|
||||||
/etc/tmpfiles.d/sogo.conf
|
/etc/tmpfiles.d/sogo.conf
|
||||||
%else
|
|
||||||
/etc/init.d/sogod
|
|
||||||
%endif
|
|
||||||
/etc/cron.daily/sogo-tmpwatch
|
/etc/cron.daily/sogo-tmpwatch
|
||||||
%dir %attr(0700, %sogo_user, %sogo_user) %{_var}/lib/sogo
|
%dir %attr(0700, %sogo_user, %sogo_user) %{_var}/lib/sogo
|
||||||
%dir %attr(0700, %sogo_user, %sogo_user) %{_var}/log/sogo
|
%dir %attr(0700, %sogo_user, %sogo_user) %{_var}/log/sogo
|
||||||
|
@ -403,25 +361,15 @@ find %{_libdir}/GNUstep/SOGo/WebServerResources -exec touch {} \;
|
||||||
# make shells scripts in documentation directory executable
|
# make shells scripts in documentation directory executable
|
||||||
find %{_docdir}/ -name '*.sh' -exec chmod a+x {} \;
|
find %{_docdir}/ -name '*.sh' -exec chmod a+x {} \;
|
||||||
|
|
||||||
%if 0%{?_with_systemd}
|
systemctl daemon-reload
|
||||||
systemctl daemon-reload
|
systemctl enable sogod
|
||||||
systemctl enable sogod
|
systemctl start sogod > /dev/null 2>&1
|
||||||
systemctl start sogod > /dev/null 2>&1
|
|
||||||
%else
|
|
||||||
/sbin/chkconfig --add sogod
|
|
||||||
/etc/init.d/sogod condrestart >&/dev/null
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" == "0" ]
|
if [ "$1" == "0" ]
|
||||||
then
|
then
|
||||||
%if 0%{?_with_systemd}
|
systemctl disable sogod
|
||||||
systemctl disable sogod
|
systemctl stop sogod > /dev/null 2>&1
|
||||||
systemctl stop sogod > /dev/null 2>&1
|
|
||||||
%else
|
|
||||||
/sbin/chkconfig --del sogod
|
|
||||||
/sbin/service sogod stop > /dev/null 2>&1
|
|
||||||
%endif
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
@ -436,6 +384,9 @@ fi
|
||||||
|
|
||||||
# ********************************* changelog *************************
|
# ********************************* changelog *************************
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 27 2021 Inverse inc. <support@inverse.ca>
|
||||||
|
- Drop support for RHEL/CentOS 6
|
||||||
|
|
||||||
* Thu Mar 31 2015 Inverse inc. <support@inverse.ca>
|
* Thu Mar 31 2015 Inverse inc. <support@inverse.ca>
|
||||||
- Change script start sogod for systemd
|
- Change script start sogod for systemd
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue