File: rules

package info (click to toggle)
wxwidgets3.0 3.0.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 120,464 kB
  • sloc: cpp: 896,633; makefile: 52,303; ansic: 21,971; sh: 5,713; python: 2,940; xml: 1,534; perl: 264; javascript: 33
file content (529 lines) | stat: -rwxr-xr-x 18,751 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
#!/usr/bin/make -f
# debian/rules file to build packages from wx source
#
# Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and
# variously stolen code :-)
# It makes copious use of the debhelper utilities written by
# Joey Hess and others.

SHELL = /bin/bash

#export DH_VERBOSE=1

export DH_OPTIONS

include /usr/share/dpkg/pkg-info.mk

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  JOB_COUNT := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  FAST_MAKE = $(MAKE) -j $(JOB_COUNT)
else
  FAST_MAKE = $(MAKE)
endif

# If another source package is to supply the common binary packages
# for a particular Debian release, then define this variable to indicate
# the $(release) that is expected to provide it.  Do not define it at
# all if this is to be the default (or only) wx source package for the
# target release.
#
# DEBIAN_WX_DEFAULT_VERSION = 2.8


# This will extract a flavour out of the changelog and flavour the
# packages and binaries with it.  'Official' builds should use a
# changelog entry with a source package of the form wxwidgets$RELEASE.
# Flavoured builds may use wxwidgets$RELEASE-$FLAVOUR, where any
# descriptive alphanumeric name will do for FLAVOUR.  This will allow
# a custom build to be installed alongside the mainline ones without
# conflict.
DEBIAN_WXFLAVOUR := $(word 2,$(subst -, ,$(DEB_SOURCE)))


wx_major_version_number := $(shell sed -n 's/^wx_major_version_number=//p' configure.in)
wx_minor_version_number := $(shell sed -n 's/^wx_minor_version_number=//p' configure.in)
wx_release_number       := $(shell sed -n 's/^wx_release_number=//p' configure.in)

release := $(wx_major_version_number).$(wx_minor_version_number)

so_cur := $(shell sed 's,<set var="WX_CURRENT">\([0-9]\+\)</set>,\1,p;d' build/bakefiles/version.bkl)
so_age := $(shell sed 's,<set var="WX_AGE">\([0-9]\+\)</set>,\1,p;d' build/bakefiles/version.bkl)
soversion := $(shell expr $(so_cur) - $(so_age))

sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR))v5
soreleasegtk3 := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-gtk3-$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR))v5

# Base value for alternative priorities.
alt_prio  := $(subst .,,$(release))


# build options
COMMON_CONFIGURE_OPTIONS := \
    --prefix=/usr \
    --with-flavour=$(DEBIAN_WXFLAVOUR) \
    --with-zlib=sys \
    --with-expat=sys \
    $(shell DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed DEB_CXXFLAGS_MAINT_APPEND=-std=gnu++98 dpkg-buildflags --export=configure)

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
COMMON_CONFIGURE_OPTIONS += --disable-optimise
endif

# Avoid /usr/bin/grep getting put in the generated wx-config when built on a
# merged-usr system (which will then fail when run on a non-merged-usr system).
COMMON_CONFIGURE_OPTIONS += GREP=/bin/grep

BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
    --disable-gui \
    --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH)

GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
    --enable-display \
    --enable-geometry \
    --enable-graphics_ctx \
    --enable-mediactrl \
    --enable-sound \
    --with-gtk \
    --with-libjpeg=sys \
    --with-libpng=sys \
    --with-libtiff=sys \
    --with-opengl \
    --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH)

GTK3_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
    --enable-display \
    --enable-geometry \
    --enable-graphics_ctx \
    --enable-mediactrl \
    --enable-sound \
    --enable-webview \
    --with-gtk=3 \
    --with-libjpeg=sys \
    --with-libpng=sys \
    --with-libtiff=sys \
    --with-opengl \
    --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH)

# Packages to build:
package_wxbase_lib      := libwxbase$(sorelease)
package_wxbase_dev      := libwxbase$(release)-dev

package_gtk3_lib         := libwxgtk$(soreleasegtk3)
package_gtk3_dev         := libwxgtk$(release)-gtk3-dev

package_gtk3media_lib    := libwxgtk-media$(soreleasegtk3)
package_gtk3media_dev    := libwxgtk-media$(release)-gtk3-dev

package_gtk3webview_lib    := libwxgtk-webview$(soreleasegtk3)
package_gtk3webview_dev    := libwxgtk-webview$(release)-gtk3-dev

package_headers         := wx$(release)-headers
package_i18n            := wx$(release)-i18n
package_doc             := wx$(release)-doc
package_examples        := wx$(release)-examples
package_common           = wx-common

# The packages listed here are common to all wx versions, and may be provided
# by another source package if more than one is in the release simultaneously.
common_packages	:= $(package_common)


# The packages listed here will not be built by default.
do_not_build_packages :=
ifdef DEBIAN_WX_DEFAULT_VERSION
do_not_build_packages += $(common_packages)
endif


# Build directories:
objdir_wxbase_shared       = objs_wxbase_sh
objdir_gtk3_shared         = objs_gtk3_sh
objdir_gtk3_install        = objs_gtk3_install

objdir_doc                 = docs/doxygen/out
objdir_examples            = docs/examples
objdir_i18n                = locale

objdirs := $(objdir_wxbase_shared) \
	   $(objdir_gtk3_shared) $(objdir_gtk3_install) \
	   $(objdir_doc) $(objdir_examples)

#	note that the i18n package is actually arch indep (once built)
#	but must be built (and installed) during the arch any phase as
#	it's pulled out of the wxGTK shared lib package.


# Build stamps:
build_arch_stamps = build-wxbase-shared-stamp \
                    build-gtk3-shared-stamp \
                    build-gtk3-shared-contrib-stamp \
                    build-i18n-stamp

build_indep_stamps = build-doc-stamp build-examples-stamp

build_stamps := $(build_arch_stamps) $(build_indep_stamps)


# Install targets:
install_all_arch = install-wxbase-lib install-wxbase-dev \
                   install-gtk3-lib install-gtk3-dev        \
		   install-gtk3media-lib install-gtk3media-dev \
		   install-gtk3webview-lib install-gtk3webview-dev \
                   install-headers install-i18n

ifndef DEBIAN_WX_DEFAULT_VERSION
  install_all_arch += install-common
endif

install_all_indep = install-doc install-examples

install_all := $(install_all_arch) $(install_all_indep)


# The Rules:

debian/control: debian/control.in
	sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=SOG3V/$(soreleasegtk3)/g'\
		< debian/control.in > debian/control

control-files-stamp: debian/control
	dh_testdir
	@for f in postinst prerm; do                                         \
		echo "generating control file $(package_wxbase_dev).$$f";    \
		sed -e  's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g;s/=MA/$(DEB_HOST_MULTIARCH)/g' \
			< debian/libwxbase-dev.$$f                           \
			> debian/$(package_wxbase_dev).$$f;                  \
	done
	@for f in postinst prerm; do                                         \
		echo "generating control file $(package_gtk3_dev).$$f";      \
		sed -e  's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g;s/=MA/$(DEB_HOST_MULTIARCH)/g' \
			< debian/libwxgtk-gtk3-dev.$$f                       \
			> debian/$(package_gtk3_dev).$$f;                    \
	done
	@for f in doc-base; do                                               \
		echo "generating control file $(package_doc).$$f";           \
		sed -e 's/=V/$(release)/g' < debian/wx-doc.$$f               \
			> debian/$(package_doc).$$f;                         \
	done
	@for f in examples; do                                               \
		echo "generating control file $(package_examples).$$f";      \
		cp debian/wx-examples.$$f debian/$(package_examples).$$f;    \
	done
	@echo "generating control file lintian-override";                    \
		sed -e  's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=SOG3V/$(soreleasegtk3)/g'            \
			< debian/lintian-override.in                         \
			> debian/lintian-override;                           \
	touch $@

build-arch: control-files-stamp $(build_arch_stamps)
build-indep: control-files-stamp $(build_indep_stamps)
build_all: control-files-stamp $(build_stamps)

# Really we should probably do nothing here until we know which
# binary target is being called, but alpha builds were exploding
# (compiler segfaults) in random places when building under fakeroot
# from the binary-arch target.  Build all -arch files here then, and
# let the -indep stuff fend for itself later.

build: build-stamp build-arch
build-stamp:


# Building wxgtk produces the wxbase libraries too, but we also need
# the config files for wxbase, so we configure a wxbase tree to get
# these (but we don't need to actually build it).

configure-wxbase-shared-stamp:
	dh_testdir
	autoconf -f -B build/autoconf_prepend-include
	dh_update_autotools_config
	mkdir -p $(objdir_wxbase_shared)
	cd $(objdir_wxbase_shared) \
	    && ../configure $(BASE_CONFIGURE_OPTIONS)
	touch $@

build-wxbase-shared-stamp: configure-wxbase-shared-stamp
	dh_testdir
	# Nothing to build here, move along...
	#$(FAST_MAKE) -C $(objdir_wxbase_shared)
	touch $@

configure-gtk3-shared-stamp:
	dh_testdir
	autoconf -f -B build/autoconf_prepend-include
	dh_update_autotools_config
	mkdir -p $(objdir_gtk3_shared)
	cd $(objdir_gtk3_shared) \
	    && ../configure $(GTK3_CONFIGURE_OPTIONS)
	touch $@

build-gtk3-shared-stamp: configure-gtk3-shared-stamp
	dh_testdir
	$(FAST_MAKE) -C $(objdir_gtk3_shared)
	cd $(objdir_gtk3_shared)/lib && ln -s . $(DEB_HOST_MULTIARCH)
	touch $@

build-gtk3-shared-contrib-stamp: build-gtk3-shared-stamp
	dh_testdir
	$(FAST_MAKE) -C $(objdir_gtk3_shared)/utils/wxrc
	touch $@

build-doc-stamp:
	dh_testdir
	# 3.0.3 and 3.0.3.1 lacked execute bit on this script
	WX_SKIP_DOXYGEN_VERSION_CHECK=1	/bin/bash docs/doxygen/regen.sh html
	# Delete intermediate .dot and .md5 files.
	find $(objdir_doc) \( -name '*.dot' -o -name '*.md5' \) -delete
	touch $@

build-examples-stamp: build-gtk3-shared-stamp
	dh_testdir
	mkdir -p $(objdir_examples)

	# copy all samples and the Makefile generated for libwxgtk.
	# In the past, some files in the sources were randomly executable, so
	# don't just use cp -a here in case that recurs.
	cp -dR --preserve=timestamps samples $(objdir_examples)
	rm -f $(objdir_examples)/samples/Makefile
	cp -a $(objdir_gtk3_shared)/samples/Makefile $(objdir_examples)/samples

	for f in `find $(objdir_examples)/samples -name makefile.unx` ; do \
		mv $$f `dirname $$f`/Makefile ; \
	done

	# don't install files from the examples which are only useful on other
	# platforms (the "horse*" files are a special case, as the image sample
	# uses various foreign image formats as data).
	find $(objdir_examples)/samples \( \
		-name 'Makefile.in' -o \
		-name 'Info*.plist*' -o \
		-name 'makefile.*' -o \
		-name '*.bat' -o \
		-name '*.bdsproj' -o \
		-name '*.cur' -o \
		-name '*.dsp' -o \
		-name '*.dsw' -o \
		-name '*.icc' -o \
		-name '*.icns' -o \
		-name '*.ico' -o \
		-name '*.mms' -o \
		-name '*.pbxproj' -o \
		-name '*.plc' -o \
		-name '*.r' -o \
		-name '*.rc' -o \
		-name '*.rc?' -o \
		-name '*.vcproj' \
	    \) \! -name 'horse*' -delete

	# We end up with some empty directories which only had OS X build stuff
	# in, at least in 3.0.2.
	find $(objdir_examples)/samples -type d -empty -delete

	touch $@

build-i18n-stamp: build-gtk3-shared-stamp
	dh_testdir

	# touch .po files first, since if they are not already up
	# to date then _now_ is not the time to fix it.
	# That should have been been done before the release was tagged.
	touch $(objdir_i18n)/*.po
	$(MAKE) -C $(objdir_i18n) allmo
	touch $@

clean: debian/control
	dh_testdir
	dh_testroot

	rm -rf $(objdirs)

	dh_clean
	rm -f debian/{$(package_wxbase_lib),$(package_wxbase_dev),$(package_gtk3_lib),$(package_gtk3_dev),$(package_headers),$(package_i18n),$(package_doc),$(package_examples)},{postinst,prerm,doc-base,examples,lintian-override} \
	      debian/lintian-override \
	      docs/doxygen/doxygen.log


install_arch: build-arch $(install_all_arch)

install: build_all $(install_all)

install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib)
install-wxbase-lib: build-wxbase-shared-stamp install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	@# No, this is not a typo, we steal these libs from the gtk build.
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_base*.so.*	usr/lib/$(DEB_HOST_MULTIARCH)
	dh_installdirs usr/share/lintian/overrides
	grep ^$(package_wxbase_lib): debian/lintian-override > debian/$(package_wxbase_lib)/usr/share/lintian/overrides/$(package_wxbase_lib)

install-wxbase-dev: DH_OPTIONS=-p$(package_wxbase_dev)
install-wxbase-dev: build-wxbase-shared-stamp install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	@# No, this is not a typo, we steal these libs from the gtk build.
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_base*.so	usr/lib/$(DEB_HOST_MULTIARCH)
	# Strip the kernel version of build machine from WXWIN_OS_DESCRIPTION
	# as it isn't useful information and makes the build less reproducible.
	sed -i 's/^\(#define WXWIN_OS_DESCRIPTION "[^ ]*\).*/\1"/' $(objdir_wxbase_shared)/lib/wx/include/*/wx/setup.h
	dh_install $(objdir_wxbase_shared)/lib/wx/include	usr/lib/$(DEB_HOST_MULTIARCH)/wx
	dh_install $(objdir_wxbase_shared)/lib/wx/config/base*	usr/lib/$(DEB_HOST_MULTIARCH)/wx/config

install-gtk3-shared-stamp: build-gtk3-shared-stamp
	dh_testdir
	mkdir -p $(objdir_gtk3_install)
	$(MAKE) -C $(objdir_gtk3_shared) install prefix=`pwd`/$(objdir_gtk3_install)
	# Strip the kernel version of build machine from WXWIN_OS_DESCRIPTION
	# as it isn't useful information and makes the build less reproducible.
	sed -i 's/^\(#define WXWIN_OS_DESCRIPTION "[^ ]*\).*/\1"/' $(objdir_gtk3_install)/lib/*/wx/include/*/wx/setup.h
	touch $@

install-gtk3-lib: DH_OPTIONS=-p$(package_gtk3_lib)
install-gtk3-lib: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install -Xmedia -Xwebview $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*.so.*	usr/lib/$(DEB_HOST_MULTIARCH)
	dh_installdirs usr/share/lintian/overrides
	grep ^$(package_gtk3_lib): debian/lintian-override > debian/$(package_gtk3_lib)/usr/share/lintian/overrides/$(package_gtk3_lib)

install-gtk3-dev: DH_OPTIONS=-p$(package_gtk3_dev)
install-gtk3-dev: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install -Xmedia -Xwebview $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*.so	usr/lib/$(DEB_HOST_MULTIARCH)
	dh_install -Xmediactrl $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/wx/include	usr/lib/$(DEB_HOST_MULTIARCH)/wx
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/wx/config/gtk*	usr/lib/$(DEB_HOST_MULTIARCH)/wx/config

install-gtk3media-lib: DH_OPTIONS=-p$(package_gtk3media_lib)
install-gtk3media-lib: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*media*.so.*	usr/lib/$(DEB_HOST_MULTIARCH)
	dh_installdirs usr/share/lintian/overrides
	grep ^$(package_gtk3media_lib): debian/lintian-override > debian/$(package_gtk3media_lib)/usr/share/lintian/overrides/$(package_gtk3media_lib)

install-gtk3media-dev: DH_OPTIONS=-p$(package_gtk3media_dev)
install-gtk3media-dev: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*media*.so	usr/lib/$(DEB_HOST_MULTIARCH)

install-gtk3webview-lib: DH_OPTIONS=-p$(package_gtk3webview_lib)
install-gtk3webview-lib: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*webview*.so.*        usr/lib/$(DEB_HOST_MULTIARCH)
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/wx/$(release)/web-extensions/*        usr/lib/$(DEB_HOST_MULTIARCH)/wx/$(release)/web-extensions
	dh_installdirs usr/share/lintian/overrides
	grep ^$(package_gtk3webview_lib): debian/lintian-override > debian/$(package_gtk3webview_lib)/usr/share/lintian/overrides/$(package_gtk3webview_lib)

install-gtk3webview-dev: DH_OPTIONS=-p$(package_gtk3webview_dev)
install-gtk3webview-dev: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install $(objdir_gtk3_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*webview*.so  usr/lib/$(DEB_HOST_MULTIARCH)

install-common: DH_OPTIONS=-p$(package_common)
install-common: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep

	dh_install $(objdir_gtk3_install)/share/bakefile/presets usr/share/bakefile
	dh_install $(objdir_gtk3_install)/share/bakefile/presets/wx*.bkl usr/share/bakefile/presets

	dh_install $(objdir_gtk3_install)/share/aclocal usr/share
	dh_installman debian/wx-config.1

	dh_install $(objdir_gtk3_shared)/utils/wxrc/wxrc usr/bin
	dh_installman debian/wxrc-tools.1
	dh_link usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrc.1


install-headers: DH_OPTIONS=-p$(package_headers)
install-headers: install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep

	dh_install $(objdir_gtk3_install)/include	usr

install-i18n: DH_OPTIONS=-p$(package_i18n)
install-i18n: build-i18n-stamp install-gtk3-shared-stamp
	dh_testdir
	dh_testroot
	dh_prep
	# We end up with usr/share/locale/zh/LC_MESSAGES/ empty in 2.8.12.1.
	find $(objdir_gtk3_install)/share/locale -type d -empty -delete
	dh_install $(objdir_gtk3_install)/share/locale	usr/share

install-doc: DH_OPTIONS=-p$(package_doc)
install-doc: build-doc-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_install $(objdir_doc)/html usr/share/doc/$(package_doc)/

install-examples: DH_OPTIONS=-p$(package_examples)
install-examples: build-examples-stamp
	dh_testdir
	dh_testroot
	dh_prep

binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs docs/changes.txt
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_link
	dh_strip
	dh_compress
	dh_fixperms

	dh_makeshlibs -V

	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-independent files here.
# Note that you currently can't build the indep packages without first
# building the arch specific package files needed to create them.
binary-indep: build_all install
	$(MAKE) -f debian/rules \
		DH_OPTIONS="-i $(addprefix -N,$(do_not_build_packages))" \
		binary-common

# Build just the architecture-dependent files here.
binary-arch: build-arch install_arch
	$(MAKE) -f debian/rules \
		DH_OPTIONS="-a $(addprefix -N,$(do_not_build_packages))" \
		binary-common

# Build all packages target.
binary: binary-arch binary-indep


.PHONY: build build_all build-arch build-indep				\
	clean \
	binary-indep binary-arch binary binary-common			\
	binary-wxbase binary-wxbase-dev		\
	install install_arch                            \
	install-gtk3-lib install-gtk3-dev		\
	install-gtk3media-lib install-gtk3media-dev	\
	install-gtk3webview-lib install-gtk3webview-dev	\
	install-common install-headers install-i18n         \
	install-examples