File: rules

package info (click to toggle)
zapping 0.10~cvs6-11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,004 kB
  • ctags: 13,302
  • sloc: ansic: 111,145; asm: 11,770; sh: 9,816; xml: 2,742; makefile: 1,255; perl: 488
file content (94 lines) | stat: -rwxr-xr-x 2,597 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export BDIR             := BUILD
export CFLAGS           := $(shell dpkg-buildflags --get CFLAGS) -Wall -I$(CURDIR)
export QTDIR            := /usr
export DESTDIR          := debian/tmp
DH_AUTO_OPTIONS         := -v -Sautoconf -B$(BDIR) --parallel

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

%: force
	dh "$@" 


override_dh_auto_build:   $(BDIR)/build-arch-stamp

override_dh_auto_install: install-into-pkgdir

override_dh_auto_configure: $(BDIR)/configure-stamp


override_dh_auto_clean:
	rm -f $(BDIR)/build-arch-stamp $(BDIR)/build-indep-stamp $(BDIR)/configure-stamp
	dh_autoreconf_clean
	dh_auto_clean  $(DH_AUTO_OPTIONS)

override_dh_installdocs:
	dh_installdocs --link-doc=zapping
	dh_buildinfo


override_dh_fixperms:
	dh_fixperms -Xzapping_setup_fb

override_dh_strip:
	dh_strip --dbg-package=zapping-dbg



$(BDIR)/configure-stamp:
	rm -f .pc/.*unapply # see bug#649521
	
	dh_autoreconf -v
	dh_auto_configure $(DH_AUTO_OPTIONS) --                 \
	                   $(CONFIGFLAG)                        \
	                   --x-libraries=/usr/X11R6/lib         \
	                   --x-includes=/usr/X11R6/include      \
	                   --enable-pam                         \
	                   --enable-compile-warnings=maximum    \
	                   --disable-schemas-install            \
	                   --with-gconf-schema-file-dir=\$${prefix}/share/gconf/schemas
	
	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
	touch "$@"

$(BDIR)/build-arch-stamp: $(BDIR)/configure-stamp
	dh_auto_build $(DH_AUTO_OPTIONS)
	touch "$@"
	

install-into-pkgdir: $(BDIR)/build-arch-stamp
	dh_auto_install $(DH_AUTO_OPTIONS) -- LDFLAGS+="$(LDFLAGS)"  \
	                                      MKINSTALLDIRS="install -d" 
	
	rm -f $(DESTDIR)/usr/lib/zapping/plugins/*.la
	
	# Install xpm icon
	cp -a debian/gnome-television.xpm $(DESTDIR)/usr/share/pixmaps/zapping
	
	# Install the schemas file
	# cp zapping.schemas $(DESTDIR)/usr/share/gconf/schemas


force debian/rules:



.PHONY: force debian/rules \
	override_dh_auto_build override_dh_auto_clean                  \
	override_dh_auto_configure override_dh_auto_install            \
	override_dh_strip override_dh_installdocs override_dh_fixperms \
	install-into-pkgdir

.DEFAULT_GOAL := binary