Improve packaging

pull/246/head
Francis Lachapelle 2018-11-02 11:59:29 -04:00
parent 7d7c3ca06a
commit 98eabddec8
3 changed files with 5 additions and 64 deletions

View File

@ -82,7 +82,7 @@ binary-arch: build-arch install-arch
ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ )
dh_compress -X.py -X.sh
dh_fixperms
# dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends
dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends
dh_shlibdeps
dh_installdeb
dh_gencontrol

View File

@ -85,7 +85,7 @@ binary-arch: build-arch install-arch
ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ )
dh_compress -X.py -X.sh
dh_fixperms
# dh_makeshlibs -X/usr/lib/mapistore_backends
dh_makeshlibs -X/usr/lib/mapistore_backends
dh_shlibdeps
dh_installdeb
dh_gencontrol

View File

@ -1,19 +1,4 @@
# We disable OpenChange builds on el5 since it's prehistoric
%define enable_openchange 1
%{?el5:%define enable_openchange 0}
%{?el6:%define enable_openchange 0}
%{?el7:%define enable_openchange 0}
%ifarch %ix86
%define enable_openchange 0
%endif
%{!?sogo_major_version: %global sogo_major_version %(/bin/echo %{sogo_version} | /bin/cut -f 1 -d .)}
%if %enable_openchange
%global oc_build_depends samba4 openchange
%endif
%{!?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
@ -28,10 +13,10 @@ Summary: SOGo
Name: sogo
Version: %{sogo_version}
Release: %{dist_suffix}%{?dist}
Vendor: http://www.inverse.ca/
Vendor: https://inverse.ca/
Packager: Inverse inc. <info@inverse.ca>
License: GPL
URL: http://www.inverse.ca/contributions/sogo.html
URL: https://sogo.nu/
Group: Productivity/Groupware
Source: SOGo-%{sogo_version}.tar.gz
Prefix: /usr
@ -136,7 +121,7 @@ Requires: sope%{sope_major_version}%{sope_minor_version}-gdl1
AutoReqProv: off
%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
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.
@ -158,29 +143,11 @@ AutoReqProv: off
%description -n sope%{sope_major_version}%{sope_minor_version}-cards-devel
SOPE versit parsing library for iCal and VCard formats
%if %enable_openchange
%package openchange-backend
Summary: SOGo backend for OpenChange
Group: Productivity/Groupware
AutoReqProv: off
%description openchange-backend
SOGo backend for OpenChange
%endif
########################################
%prep
rm -fr ${RPM_BUILD_ROOT}
%setup -q -n SOGo-%{sogo_version}
# 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}
@ -201,13 +168,6 @@ 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
QA_SKIP_BUILD_ROOT=1
@ -245,7 +205,6 @@ install -d ${RPM_BUILD_ROOT}/var/run/sogo
install -d ${RPM_BUILD_ROOT}/var/spool/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}/etc/httpd/conf.d/SOGo.conf
install -m 600 Scripts/sogo.cron ${RPM_BUILD_ROOT}/etc/cron.d/sogo
cp Scripts/tmpwatch ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch
@ -266,16 +225,6 @@ cp Scripts/logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/sogo
cp Scripts/sogo-default ${RPM_BUILD_ROOT}/etc/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} \
@ -305,7 +254,6 @@ rm -fr ${RPM_BUILD_ROOT}
%dir %attr(0700, %sogo_user, %sogo_user) %{_var}/spool/sogo
%dir %attr(0750, root, %sogo_user) %{_sysconfdir}/sogo
%{_sbindir}/sogod
#%{_sbindir}/openchange_user_cleanup
%{_libdir}/sogo/libSOGo.so*
%{_libdir}/sogo/libSOGoUI.so*
%{_libdir}/GNUstep/SOGo/AdministrationUI.SOGo
@ -379,13 +327,6 @@ rm -fr ${RPM_BUILD_ROOT}
%{_includedir}/NGCards
%{_libdir}/sogo/libNGCards.so*
%if %enable_openchange
%files openchange-backend
%defattr(-,root,root,-)
%{_libdir}/GNUstep/SOGo/*.MAPIStore
%{_libdir}/mapistore_backends/*
%endif
# **************************** pkgscripts *****************************
%pre
if ! getent group %sogo_user >& /dev/null; then