File: rules

package info (click to toggle)
evolution 1.0.5-1woody2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,876 kB
  • ctags: 22
  • sloc: sh: 292; makefile: 217
file content (129 lines) | stat: -rwxr-xr-x 3,916 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
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/make -f

include debian/scripts/vars
BUILD_DIR=$(SOURCE_DIR)/$(TAR_DIR)

export DH_COMPAT=3
export DH_OPTIONS

DB3_BUILD_DIR=$(SOURCE_DIR)/db-3.1.17
DB3_DIR=$(CURDIR)/$(SOURCE_DIR)/db3

VERSION = $(shell dpkg-parsechangelog | grep Version | sed -e 's/Version: //g' -e 's/-[\.A-Za-z0-9]*$$//g')
CAMEL_SONAME = 0

EXTRA_CONFIG_OPT := --with-nspr-includes=/usr/include/mozilla --with-nss-includes=/usr/include/mozilla --with-openldap --enable-nls --with-db3-includes=$(DB3_DIR)/include --with-db3-libs=$(DB3_DIR)/lib --without-openssl-includes --without-openssl-libs --disable-gtk-doc --enable-pilot-conduits --with-krb4=/usr --with-krb5=/usr

extract: $(STAMP_DIR)/extract
$(STAMP_DIR)/extract:
	dh_testdir

	$(MAKE) -f debian/sys-build.mk source.make
	cd $(SOURCE_DIR) && if [ ! -d evolution ];then ln -sf $(TAR_DIR) evolution; fi
	cd $(BUILD_DIR) && autoconf

	touch $@

build-db3: extract $(STAMP_DIR)/build-db3
$(STAMP_DIR)/build-db3:
	dh_testdir

	cd $(DB3_BUILD_DIR)/build_unix && \
	../dist/configure --disable-shared --prefix=$(DB3_DIR) && \
	$(MAKE) && $(MAKE) install

	touch $@

configure: build-db3 $(STAMP_DIR)/configure
$(STAMP_DIR)/configure:
	dh_testdir

	@echo
	@echo "*** VERSION = ${VERSION} ***"
	@echo
	@sleep 1

	cd $(BUILD_DIR) && autoconf && CC="$(CC)" ./configure --prefix=/usr \
	--mandir=\$${prefix}/share/man \
	--infodir=\$${prefix}/share/info \
	--sysconfdir=/etc \
	${EXTRA_CONFIG_OPT}

	cd $(BUILD_DIR)/libical && CC="$(CC)" ./configure  --prefix=/usr --libdir=\$${prefix}/lib/libical --mandir=\$${prefix}/share/man --sysconfdir=/etc

	touch $@

build: $(STAMP_DIR)/build
$(STAMP_DIR)/build: configure

	$(MAKE) -C $(BUILD_DIR) LDAP_LIBS=-lldap CC="$(CC)"

	touch $@

clean:
	$(MAKE) -f debian/sys-build.mk source.clean
	rm -rf $(STAMP_DIR)
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) -C $(BUILD_DIR) install \
	prefix=$(CURDIR)/debian/evolution/usr \
	sysconfdir=$(CURDIR)/debian/evolution/etc \
	KDE_APPLNK_DIR=$(CURDIR)/debian/evolution/usr/share/applnk

	dh_movefiles --sourcedir=debian/evolution -plibcamel${CAMEL_SONAME}
	dh_movefiles --sourcedir=debian/evolution -plibcamel-dev
	-rm -rf $(CURDIR)/debian/evolution/usr/include
	-cd $(CURDIR)/debian/evolution/usr/lib/ && rm -f *.la *.a

	-find debian/ -type d -empty | xargs rmdir -p 2>&1 > /dev/null
	mv debian/evolution/usr/bin/evolution-* debian/evolution/usr/bin/wombat debian/evolution/usr/lib/evolution/

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
	# nothing todo

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
#	dh_testversion 1.1.17
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installcron
	# dh_installman -pevolution
	# dh_installmanpages -plibcamel${CAMEL_SONAME} `pwd`/debian/libcamel${CAMEL_SONAME}/usr/share/man/man1/compose.1
	dh_installinfo
	dh_undocumented
	dh_installchangelogs $(BUILD_DIR)/ChangeLog
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
	chmod u+s debian/evolution/usr/sbin/camel-lock-helper	
	dh_makeshlibs -plibcamel${CAMEL_SONAME} -V'libcamel${CAMEL_SONAME} (>= ${VERSION})'
	cat debian/libcamel${CAMEL_SONAME}/DEBIAN/shlibs > debian/shlibs.local
	dh_installdeb -pevolution
	dh_shlibdeps -pevolution
	cat debian/*/DEBIAN/shlibs > debian/shlibs.local
	dh_installdeb -plibcamel${CAMEL_SONAME} -plibcamel-dev -pevolution-dev
	dh_shlibdeps -plibcamel${CAMEL_SONAME} -plibcamel-dev -pevolution-dev
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch configure
.PHONY: build clean binary-indep binary-arch binary install configure extract build-db3