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
|
2013-03-20 16:51:37 +01:00
|
|
|
DIST_CODENAME=$(shell lsb_release -cs)
|
|
|
|
|
2013-04-11 16:37:34 +02:00
|
|
|
#ifeq ($(DIST_CODENAME), squeeze)
|
2014-11-30 23:35:39 +01:00
|
|
|
SAML2_CONFIG=--enable-saml2
|
2013-04-11 16:37:34 +02:00
|
|
|
#endif
|
2012-04-04 18:01:21 +02:00
|
|
|
|
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
|
2013-03-20 16:51:37 +01:00
|
|
|
./configure --prefix=$(GNUSTEP_SYSTEM_ROOT) $(SAML2_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)
|
2012-07-25 22:25:35 +02:00
|
|
|
if pkg-config --atleast-version=1.0 libmapi; \
|
|
|
|
then (cd OpenChange; $(MAKE)); \
|
|
|
|
fi
|
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-01-10 01:08:30 +01:00
|
|
|
# if pkg-config --atleast-version=1.0 libmapi; \
|
|
|
|
# then \
|
|
|
|
# (cd OpenChange; make clean); \
|
|
|
|
# fi; \
|
2014-01-14 20:39:51 +01:00
|
|
|
(cd ActiveSync; $(MAKE) clean); \
|
2012-04-04 18:01:21 +02:00
|
|
|
make clean; \
|
2012-04-03 22:56:58 +02:00
|
|
|
fi
|
2018-01-10 01:08:30 +01:00
|
|
|
# -rm -f OpenChange/MAPIStorePropertySelectors.*
|
2012-04-11 15:48:28 +02:00
|
|
|
-rm -f config.make
|
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
|
2018-01-10 01:08:30 +01:00
|
|
|
# if pkg-config --atleast-version=1.0 libmapi; \
|
|
|
|
# then \
|
|
|
|
# (cd OpenChange; \
|
|
|
|
# $(MAKE) \
|
|
|
|
# DESTDIR=$(DESTDIR) \
|
|
|
|
# GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
|
|
|
|
# install); \
|
|
|
|
# rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1; \
|
|
|
|
# rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so; \
|
|
|
|
# mv -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \
|
|
|
|
# $(DESTDIR)/usr/lib/mapistore_backends/SOGo.so; \
|
|
|
|
# fi
|
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-10-29 15:48:25 +01:00
|
|
|
install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf-available/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
|
2013-04-10 22:27:03 +02:00
|
|
|
install -d -m 750 debian/tmp/etc/sogo
|
|
|
|
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
|
|
|
|
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
|