File: rules

package info (click to toggle)
dictd 1.12.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,220 kB
  • sloc: ansic: 13,043; sh: 4,057; yacc: 497; makefile: 434; cpp: 277; lex: 255; perl: 175; awk: 12
file content (58 lines) | stat: -rwxr-xr-x 2,094 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
#!/usr/bin/make -f

export BDIR             := BUILD
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export LDFLAGS          := $(shell dpkg-buildflags --get LDFLAGS)  -Wl,--as-needed -Wl,-z,defs
export CFLAGS           := $(shell dpkg-buildflags --get CFLAGS)   -Wall
export CPPFLAGS         := $(shell dpkg-buildflags --get CPPFLAGS) $(shell getconf LFS_CFLAGS)
export DESTDIR          := debian/tmp
DH_AUTO_OPTIONS         := -v -Sautoconf -B$(BDIR) --parallel
MAKEARGS                := JUDYLIB= DBILIB=

%:
	dh "$@"

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

override_dh_auto_install:   $(BDIR)/build-arch-stamp
	dh_auto_install $(DH_AUTO_OPTIONS)  -- $(MAKEARGS)
	rm  $(DESTDIR)/usr/include/dictdplugin.h
	rm  $(DESTDIR)/usr/bin/dictdplugin-config

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_auto_clean  $(DH_AUTO_OPTIONS)
	
	rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
	        -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' -o -name 'config.log' \
	        -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
	

$(BDIR)/configure-stamp:
	dh_auto_configure $(DH_AUTO_OPTIONS) --     \
	                --verbose                   \
	                --libexecdir=/usr/lib/dictd \
	                --datadir=/usr/share/dictd  \
	                --sysconfdir=/etc/dictd	    \
	                -- CFLAGS='$(CFLAGS)'       \
	                   CPPFLAGS='$(CPPFLAGS)'   \
	                   LDFLAGS='$(LDFLAGS)'     \
	                   AWK=awk
	
	touch "$@"

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

override_dh_installchangelogs:
	dh_installchangelogs -k NEWS

override_dh_fixperms:
	dh_fixperms
	find debian -mindepth 6 -maxdepth 7 -path "*/usr/share/doc/*" \
	        '!' -name "*.gz" -name "README.*" -exec gzip -9n {} \;
	find debian -mindepth 4 -maxdepth 5 -path "*/dictd/etc/dictd/*" \
	        -name dictdconfig.alias -exec chmod 755 {} \;