File: rules

package info (click to toggle)
beagle 0.2.12-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,204 kB
  • ctags: 16,188
  • sloc: cs: 91,628; sh: 27,627; ansic: 10,646; makefile: 2,248; xml: 15
file content (138 lines) | stat: -rwxr-xr-x 3,394 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
130
131
132
133
134
135
136
137
138
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export MONO_SHARED_DIR=$(CURDIR)

include /usr/share/dpatch/dpatch.make

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

PYVERS=$(shell pyversions -vs)

configure: configure-stamp
configure-stamp: patch
	dh_testdir
	
	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man \
		--sysconfdir=/etc --localstatedir=/var \
		--infodir=\$${prefix}/share/info --enable-libbeagle --enable-python --enable-webservices=no

	touch configure-stamp

build: build-stamp

build-stamp:  configure-stamp
	dh_testdir
	$(MAKE)
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	-$(MAKE) clean
	
	rm -rf $(MONO_SHARED_DIR)/.wapi

	rm -rf debian/patched

	dh_clean 

install: build-stamp install-arch install-indep

install-arch:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs -a

	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

	dh_install -a --sourcedir=debian/tmp
	
	# Install autostart desktop file for beagled
	cp $(CURDIR)/debian/beagled.desktop $(CURDIR)/debian/beagle/etc/xdg/autostart
	cp $(CURDIR)/debian/beagled-kde.desktop $(CURDIR)/debian/beagle/usr/share/autostart


	find debian/beagle debian/python-beagle -name '*.a' -delete
	find debian/beagle debian/python-beagle debian/libbeagle-dev -name '*.la' -delete
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
		find debian/ -type f -name "*.mdb" -delete
endif

#	Don't remove .so links until we discover how to map to .so.0 files.
#	find . -name '*.so' -exec rm -f {} \;
	cp mozilla-extension/beagle.xpi $(CURDIR)/debian/beagle/usr/share/doc/beagle/mozilla-extension
	cp mozilla-extension/README	$(CURDIR)/debian/beagle/usr/share/doc/beagle/mozilla-extension

#	Adjust permissions
	find debian/ -type f -name "*.dll" -or -name "*.mdb" -or -name "*.cs" -or -name "*.config" | xargs chmod -x
	find debian/ -type f -name "*.exe" | xargs chmod +x

install-indep:
	dh_testdir
	dh_testroot
	dh_installdirs -i
	dh_install -i --sourcedir=debian/tmp

	mv debian/beagle/usr/lib/beagle/Backends/Evolution* debian/beagle-backend-evolution/usr/lib/beagle/Backends/


binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -i ChangeLog
	dh_installdocs -i
#	dh_makeshlibs
#	dh_makeclilibs -m 1.0 -i
	dh_link -i
	dh_strip -i
	dh_compress -i -X.xpi
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_clideps -i -d
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i
	
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -a ChangeLog
	dh_installdocs -a
	dh_installexamples -a
	dh_installman -a
	dh_makeshlibs -plibbeagle0 -V
	dh_pysupport -ppython-beagle
	dh_makeclilibs -a -V
	dh_link -a
	dh_strip -a
	dh_compress -a -X.xpi
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_clideps -a -d
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch