File: rules

package info (click to toggle)
sogo 2.2.9%2Bgit20141017-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 43,812 kB
  • sloc: objc: 115,592; python: 5,696; sh: 1,380; perl: 861; makefile: 240; xml: 114; sql: 53; php: 43
file content (116 lines) | stat: -rwxr-xr-x 3,407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
# export DH_OPTIONS="-p sogo"

DESTDIR=$(CURDIR)/debian/tmp
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

include /etc/GNUstep/GNUstep.conf
include /usr/share/GNUstep/Makefiles/common.make

config.make: configure
	dh_testdir
	./configure --prefix=$(GNUSTEP_SYSTEM_ROOT)

#Architecture
build: build-arch

build-arch: build-arch-stamp
build-arch-stamp:  config.make 
#	 Add here commands to compile the arch part of the package.
	$(MAKE)
	if pkg-config --atleast-version=1.0 libmapi; \
	then (cd OpenChange; $(MAKE));  \
	fi
	(cd ActiveSync && $(MAKE))
	touch $@

clean: 
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp
	( cd Tests/Integration; make clean )
	rm -f Tests/Integration/config.py
	-find Tests -name "*.pyc" -exec rm -f {} \;
	if [ -f config.make ]; \
	then \
	  if pkg-config --atleast-version=1.0 libmapi; \
	  then \
	    (cd OpenChange; make clean); \
	  fi; \
	  make clean; \
	fi
	-rm -f OpenChange/MAPIStorePropertySelectors.*
	-rm -f config.make
	(cd ActiveSync; make clean); \
	dh_clean 

install: install-arch
	dh_testdir
	dh_testroot
#	dh_prep -i
#	dh_installdirs -i
#	dh_install -i

install-arch: build-arch
	dh_testdir
	dh_testroot
	dh_prep
#	dh_installdirs -s

	$(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
	if pkg-config --atleast-version=1.0 libmapi; \
	then \
	  (cd OpenChange; \
	   $(MAKE) \
	       DESTDIR=$(DESTDIR) \
	       GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
	     install); \
	  rm -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so.1; \
	  rm -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so; \
	  mv -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \
	           $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/SOGo.so; \
	fi
	(cd ActiveSync; $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install)

	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
	install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf
	install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
	install -D -m 644 Scripts/logrotate debian/tmp/etc/logrotate.d/sogo
	install -d -m 750 debian/tmp/etc/sogo/
	install -D -m 640 Scripts/sogo.conf debian/tmp/etc/sogo/sogo.conf
	install -D -m 755 Scripts/openchange_user_cleanup debian/tmp/usr/sbin/openchange_user_cleanup

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
	dh_testdir
	dh_testroot
	dh_installinit -R
	dh_installcron
	dh_installchangelogs ChangeLog
	dh_installdocs
#	dh_installexamples
	dh_installman
	dh_install
	dh_link
	dh_strip --dbg-package=sogo-dbg
#	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* ./ )
	dh_compress -X.py -X.sh
	dh_fixperms
	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep: build install
# We have nothing to do by default.

binary: binary-arch binary-indep
.PHONY: build clean binary-arch binary install install-arch