rules 1.76 KB
Newer Older
1 2
#!/usr/bin/make -f

3 4 5
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
6
export DEB_CFLAGS_MAINT_APPEND = $(CPPFLAGS) -Wall -Wno-deprecated-declarations -pedantic
7
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
8

9
include /usr/share/dpkg/pkg-info.mk
10
export DEB_VERSION
11 12
export FORCE_SOURCE_DATE = 1

13
MUTABLE_FILES := build.h $(wildcard locale/*.po) \
14 15
	documentation/config/version.tex \
	documentation/user-manual/manual.pdf
16
BACKUP_TAR_FILE := debian/backup.tar
17

18 19 20 21
BUILDROOT := $(CURDIR)/debian/tmp
ICONS := $(wildcard contrib/dvdisaster*.png)
ICON_SIZES := $(patsubst contrib/dvdisaster%.png,%,$(ICONS))

22 23
%:
	dh $@
24

25 26 27 28 29 30 31 32 33 34
override_dh_update_autotools_config:
	dh_update_autotools_config
	test -f $(BACKUP_TAR_FILE) || \
		tar cpf $(BACKUP_TAR_FILE) $(MUTABLE_FILES)

override_dh_clean:
	dh_clean
	test ! -f $(BACKUP_TAR_FILE) || \
		tar xpf $(BACKUP_TAR_FILE) && rm -f $(BACKUP_TAR_FILE)

35
override_dh_auto_configure:
36 37 38 39 40
	./configure \
		--prefix=/usr \
		--mandir=share/man \
		--localedir=share/locale \
		--docdir=share/doc \
41
		--docsubdir=dvdisaster-doc \
42
		--with-embedded-src-path=no
43

44 45 46 47
override_dh_auto_build-arch:
	make all

override_dh_auto_build-indep:
48
	make manual
49 50

override_dh_auto_install-arch:
51 52 53 54 55 56 57
	dh_auto_install -a -- BUILDROOT=$(BUILDROOT)
	set -e; \
	for S in $(ICON_SIZES); do \
		D="$(BUILDROOT)/usr/share/icons/hicolor/$${S}x$${S}/apps"; \
		install -d "$${D}"; \
		install -T "contrib/dvdisaster$${S}.png" "$${D}/dvdisaster.png"; \
	done
58 59

override_dh_auto_install-indep:
60
	true
61 62

# Ensure that none of the text files that the application
63
# tries to display directly are compressed, as it doesn't
64
# automatically decompress text files.
65
override_dh_compress-arch:
66
	dh_compress -p dvdisaster \
67
		-XCHANGELOG -XCREDITS -XREADME.MODIFYING -XTODO