File: rules

package info (click to toggle)
welcome2l 3.04-26
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 724 kB
  • ctags: 378
  • sloc: ansic: 1,469; makefile: 125; sh: 47
file content (41 lines) | stat: -rwxr-xr-x 1,302 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
#!/usr/bin/make -f

DH_AUTO_OPTIONS := -v -Smakefile --parallel
TDIR            := debian/_tmp_
DEFFILE         := debian/default
export CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)   \
                   $(shell dpkg-buildflags --get CPPFLAGS) \
                   $(shell getconf LFS_CFLAGS)             \
                   -Wall -Wextra

%:
	dh "$@"

$(DEFFILE): $(DEFFILE).in debian/rules
	@set -e; rm -f "$@";                     \
	distro="`lsb_release -is`" || :;         \
	echo "Setting $$distro in $@";           \
	sed -e "s/#DISTRO#/$${distro:-Debian}/g" \
	        < "$<" > "$@";                   \
	chmod 444 "$@"

override_dh_auto_build: $(DEFFILE)
	dh_auto_build $(DH_AUTO_OPTIONS) -- STRIP=:

override_dh_auto_install:
	dh_auto_install $(DH_AUTO_OPTIONS) --destdir=$(CURDIR)/debian/$(shell dh_listpackages)/usr -- \
	                STRIP=:         \
	                INSTALL_MANPATH='$$(DESTDIR)/share/man'
	
	@test -d $(TDIR) || mkdir $(TDIR)
	# make sure that INSTALL file wasn't changed
	echo '36cfee5f23009eb94f9fdd62ed767599  INSTALL' | md5sum -c
	@sed -e '14,140d' -e 's|/usr/local|/usr|g' < INSTALL > $(TDIR)/INSTALL

override_dh_auto_clean:
	dh_auto_clean $(DH_AUTO_OPTIONS)
	
	rm -rf $(TDIR) $(DEFFILE)

override_dh_installinit:	
	dh_installinit -- start 20 2 3 4 5 .