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
|
|
|
|
|
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
|
2012-04-11 15:48:28 +02:00
|
|
|
./configure --prefix=$(GNUSTEP_SYSTEM_ROOT)
|
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-04-03 22:56:58 +02:00
|
|
|
if pkg-config --atleast-version=1.0 libmapi; \
|
|
|
|
then (cd OpenChange; $(MAKE)); \
|
|
|
|
fi
|
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 \
|
|
|
|
if pkg-config --atleast-version=1.0 libmapi; \
|
|
|
|
then \
|
|
|
|
(cd OpenChange; make clean); \
|
|
|
|
fi; \
|
|
|
|
make clean; \
|
2012-04-03 22:56:58 +02:00
|
|
|
fi
|
2012-04-11 15:48:28 +02:00
|
|
|
-rm -f OpenChange/MAPIStorePropertySelectors.*
|
|
|
|
-find OpenChange -type d -name "unrtf-*" -exec rm -rf {} \;
|
|
|
|
-rm -f OpenChange/unrtf*-stamp
|
|
|
|
-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
|
2012-04-03 22:56:58 +02:00
|
|
|
if pkg-config --atleast-version=1.0 libmapi; \
|
2012-04-04 18:01:21 +02:00
|
|
|
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; \
|
2012-04-03 22:56:58 +02:00
|
|
|
fi
|
|
|
|
|
2009-07-28 21:07:51 +02:00
|
|
|
mkdir -p debian/tmp/etc/default
|
2009-08-12 17:25:33 +02:00
|
|
|
cp Scripts/sogo-default debian/tmp/etc/default/sogo
|
|
|
|
mkdir -p debian/tmp/usr/share/lintian/overrides
|
|
|
|
cp debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo
|
2009-08-18 19:41:14 +02:00
|
|
|
mkdir -p debian/tmp/etc/apache2/conf.d
|
2011-10-17 21:02:12 +02:00
|
|
|
cp 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
|
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_installlogrotate
|
|
|
|
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* ./ )
|
2009-07-28 21:07:51 +02:00
|
|
|
dh_compress
|
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
|