File: rules

package info (click to toggle)
zapping 0.10~cvs6-16
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,008 kB
  • sloc: ansic: 110,600; asm: 11,770; sh: 9,809; xml: 3,186; makefile: 1,227; perl: 488
file content (54 lines) | stat: -rwxr-xr-x 1,846 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Suppress some warnings as a temporary measure.  See the description
# of debian/patches/22-gnome-common-deprecated.patch for details.
export DEB_CFLAGS_MAINT_APPEND = -Wno-redundant-decls -Wno-clobbered \
				 -Wno-strict-prototypes -Wno-shadow \
				 -Wno-suggest-attribute=noreturn \
				 -Wno-suggest-attribute=format -Wno-undef \
				 -Wno-implicit-fallthrough -Wno-switch-enum \
				 -Wno-switch-default
BDIR := BUILD

ifeq ($(DEB_BUILD_ARCH_OS),linux)
	CONFIGFLAG += --enable-v4l
else ifeq ($(DEB_BUILD_ARCH_OS),hurd)
	CONFIGFLAG += --disable-v4l --disable-bktr
else
	CONFIGFLAG += --enable-bktr
endif

%:
	dh $@ --builddirectory=$(BDIR)

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGFLAG)                      \
	  ac_cv_path_CONSOLEHELPER_LOCATION=/usr/bin/consolehelper \
			   --enable-pam                         \
			   --enable-compile-warnings=yes

	mv $(BDIR)/libtool $(BDIR)/libtool.old
	sed -e '/^archive_cmds/{ s/="\\$$CC -shared /&$${wl}--as-needed /;s/ [^ ]*soname[^ ]*/ /g; }' < \
		 $(BDIR)/libtool.old >  $(BDIR)/libtool
	chmod 755  $(BDIR)/libtool

	@echo "Config variables:"
	sed -ne "s/^#define \(.*\) 1 *$$/ \1/p" $(BDIR)/config.h

# The testsuite has to be fixed in order to remove the override.
override_dh_auto_test: ;

override_dh_auto_install:
	dh_auto_install -- MKINSTALLDIRS="install -d"
	$(RM) debian/zapping/usr/lib/zapping/plugins/*.la
# Upstream's build system assumes that consolehelper is used but that
# is no longer necessary.  Note that zapping_setup_fb is built only on
# GNU/Linux architectures.
ifeq ($(DEB_BUILD_ARCH_OS),linux)
	mv debian/zapping/usr/sbin/zapping_setup_fb debian/zapping/usr/bin
	rmdir debian/zapping/usr/sbin
endif

override_dh_strip:
	dh_strip --dbgsym-migration='zapping-dbg (<< 0.10~cvs6-12~)'