2009-07-28 21:07:51 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
export DH_VERBOSE=1
|
2009-08-12 17:25:33 +02:00
|
|
|
# export DH_OPTIONS="-p sogo"
|
2009-07-28 21:07:51 +02:00
|
|
|
|
2012-04-04 18:01:21 +02:00
|
|
|
DESTDIR=$(CURDIR)/debian/tmp
|
2018-11-01 19:45:28 +01:00
|
|
|
DIST_CODENAME=$(shell lsb_release -cs)
|
2013-03-20 16:51:37 +01:00
|
|
|
|
2020-05-12 17:20:18 +02:00
|
|
|
ifeq ($(DIST_CODENAME), squeeze)
|
|
|
|
SAML2_CONFIG=--enable-saml2
|
|
|
|
endif
|
|
|
|
|
2020-05-12 13:59:00 +02:00
|
|
|
ifeq ($(DIST_CODENAME), stretch)
|
2020-05-08 15:15:43 +02:00
|
|
|
MFA_CONFIG=--enable-mfa
|
2020-05-12 13:59:00 +02:00
|
|
|
endif
|
2020-05-08 15:15:43 +02:00
|
|
|
|
2020-05-12 13:59:00 +02:00
|
|
|
ifeq ($(DIST_CODENAME), buster)
|
2020-05-08 15:15:43 +02:00
|
|
|
MFA_CONFIG=--enable-mfa
|
2020-05-12 13:59:00 +02:00
|
|
|
endif
|
2020-05-08 15:15:43 +02:00
|
|
|
|
2020-05-12 13:59:00 +02:00
|
|
|
ifeq ($(DIST_CODENAME), xenial)
|
2020-05-08 15:15:43 +02:00
|
|
|
MFA_CONFIG=--enable-mfa
|
2020-05-12 13:59:00 +02:00
|
|
|
endif
|
2020-05-08 15:15:43 +02:00
|
|
|
|
2020-05-12 13:59:00 +02:00
|
|
|
ifeq ($(DIST_CODENAME), bionic)
|
2020-05-08 15:15:43 +02:00
|
|
|
MFA_CONFIG=--enable-mfa
|
2020-05-12 13:59:00 +02:00
|
|
|
endif
|
2020-05-08 15:15:43 +02:00
|
|
|
|
2020-05-12 19:44:10 +02:00
|
|
|
ifeq ($(DIST_CODENAME), focal)
|
|
|
|
MFA_CONFIG=--enable-mfa
|
|
|
|
endif
|
|
|
|
|
2012-04-11 15:48:28 +02:00
|
|
|
include /etc/GNUstep/GNUstep.conf
|
|
|
|
include /usr/share/GNUstep/Makefiles/common.make
|
|
|
|
|
2009-08-12 17:25:33 +02:00
|
|
|
config.make: configure
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_testdir
|
2020-05-08 15:15:43 +02:00
|
|
|
./configure $(SAML2_CONFIG) $(MFA_CONFIG)
|
2009-07-28 21:07:51 +02:00
|
|
|
|
|
|
|
#Architecture
|
2010-09-09 18:04:27 +02:00
|
|
|
build: build-arch
|
2009-07-28 21:07:51 +02:00
|
|
|
|
|
|
|
build-arch: build-arch-stamp
|
2009-08-12 17:25:33 +02:00
|
|
|
build-arch-stamp: config.make
|
|
|
|
# Add here commands to compile the arch part of the package.
|
2010-08-20 18:04:57 +02:00
|
|
|
$(MAKE)
|
2014-01-14 20:39:51 +01:00
|
|
|
(cd ActiveSync && $(MAKE))
|
2009-07-28 21:07:51 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2010-09-09 18:04:27 +02:00
|
|
|
rm -f build-arch-stamp
|
2012-04-11 15:48:28 +02:00
|
|
|
( cd Tests/Integration; make clean )
|
|
|
|
rm -f Tests/Integration/config.py
|
|
|
|
-find Tests -name "*.pyc" -exec rm -f {} \;
|
2012-04-04 18:01:21 +02:00
|
|
|
if [ -f config.make ]; \
|
|
|
|
then \
|
2018-11-01 19:45:28 +01:00
|
|
|
$(MAKE) clean; \
|
2012-04-03 22:56:58 +02:00
|
|
|
fi
|
2012-04-11 15:48:28 +02:00
|
|
|
-rm -f config.make
|
2018-10-31 18:57:32 +01:00
|
|
|
(cd ActiveSync; $(MAKE) clean); \
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_clean
|
|
|
|
|
2009-08-12 17:25:33 +02:00
|
|
|
install: install-arch
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2012-04-04 18:01:21 +02:00
|
|
|
# dh_prep -i
|
|
|
|
# dh_installdirs -i
|
|
|
|
# dh_install -i
|
2009-07-28 21:07:51 +02:00
|
|
|
|
2009-08-12 17:25:33 +02:00
|
|
|
install-arch: build-arch
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2012-04-04 18:01:21 +02:00
|
|
|
dh_prep
|
2009-08-12 17:25:33 +02:00
|
|
|
# dh_installdirs -s
|
2009-07-28 21:07:51 +02:00
|
|
|
|
2012-04-04 18:01:21 +02:00
|
|
|
$(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
|
2014-01-14 20:39:51 +01:00
|
|
|
(cd ActiveSync; $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install)
|
2012-04-03 22:56:58 +02:00
|
|
|
|
2013-09-30 15:39:29 +02:00
|
|
|
install -D -m 644 Scripts/sogo-default debian/tmp/etc/default/sogo
|
|
|
|
install -D -m 644 debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo
|
2018-11-01 19:45:28 +01:00
|
|
|
install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf
|
2012-04-04 18:01:21 +02:00
|
|
|
install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
|
2012-07-23 19:42:45 +02:00
|
|
|
install -D -m 644 Scripts/logrotate debian/tmp/etc/logrotate.d/sogo
|
2018-11-01 19:45:28 +01:00
|
|
|
install -d -m 750 debian/tmp/etc/sogo/
|
2013-04-10 22:27:03 +02:00
|
|
|
install -D -m 640 Scripts/sogo.conf debian/tmp/etc/sogo/sogo.conf
|
2009-07-28 21:07:51 +02:00
|
|
|
|
2009-08-12 17:25:33 +02:00
|
|
|
# Build architecture dependant packages using the common target.
|
|
|
|
binary-arch: build-arch install-arch
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2012-05-24 20:09:47 +02:00
|
|
|
dh_installinit -R
|
2009-08-12 17:25:33 +02:00
|
|
|
dh_installcron
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_installchangelogs ChangeLog
|
|
|
|
dh_installdocs
|
2010-02-17 17:06:55 +01:00
|
|
|
# dh_installexamples
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_installman
|
2009-08-12 17:25:33 +02:00
|
|
|
dh_install
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_link
|
2010-09-09 18:33:12 +02:00
|
|
|
dh_strip --dbg-package=sogo-dbg
|
2012-02-23 16:35:07 +01:00
|
|
|
# workaround for http://sourceware.org/bugzilla/show_bug.cgi?id=9538
|
|
|
|
# to let gdb find the symbols for libSOGo
|
|
|
|
( cd debian/sogo-dbg/usr/lib/debug/usr/lib/; \
|
|
|
|
ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ )
|
2012-09-05 19:13:31 +02:00
|
|
|
dh_compress -X.py -X.sh
|
2012-04-04 18:01:21 +02:00
|
|
|
dh_fixperms
|
2018-11-02 16:59:29 +01:00
|
|
|
dh_makeshlibs -X/usr/lib/mapistore_backends
|
2009-08-12 17:25:33 +02:00
|
|
|
dh_shlibdeps
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_installdeb
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
2010-09-09 18:35:31 +02:00
|
|
|
binary-indep: build install
|
|
|
|
# We have nothing to do by default.
|
2010-09-09 17:51:13 +02:00
|
|
|
|
2010-09-09 18:36:56 +02:00
|
|
|
binary: binary-arch binary-indep
|
2010-09-09 18:33:12 +02:00
|
|
|
.PHONY: build clean binary-arch binary install install-arch
|