File: rules

package info (click to toggle)
rlinetd 0.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,896 kB
  • sloc: sh: 5,175; ansic: 3,212; yacc: 1,585; makefile: 169; lex: 131; sed: 16; perl: 4
file content (58 lines) | stat: -rwxr-xr-x 1,569 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
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

BUILD_DIR       := BUILD
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
DH_AUTO_OPTIONS := -v -Sautoconf --parallel -B$(BUILD_DIR)
DESTDIR         := $(CURDIR)/debian/$(shell dh_listpackages)
include /usr/share/dpkg/pkg-info.mk

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CC := $(DEB_HOST_GNU_TYPE)-gcc
else
  CC := gcc
endif

# check for maintainer mode
ifneq (,$(findstring maintainer,$(DEB_BUILD_OPTIONS)))
  MAINTAINER_MODE := yes
else
  MAINTAINER_MODE := no
  ifeq (,$(findstring debian/gcc-wrapper,$(CC)))
    CC            := $(CURDIR)/debian/gcc-wrapper $(CC)
  endif
endif


%:
	dh ${@}

override_dh_auto_configure:
	dh_auto_configure $(DH_AUTO_OPTIONS) -- \
	                  --with-libwrap        \
	                  --with-libcap         \
	                  --without-lsf         \
	                  --without-libnsl      \
	                  --disable-silent-rules \
	                  --enable-warnings      \
	                  --enable-maintainer-mode=$(MAINTAINER_MODE) \
	                  CC="$(CC)"


override_dh_auto_build:
	dh_auto_build  $(DH_AUTO_OPTIONS)

override_dh_auto_clean:
	dh_auto_clean $(DH_AUTO_OPTIONS)

override_dh_auto_install:
	dh_auto_install $(DH_AUTO_OPTIONS)

	cp -a debian/rlinetd.conf $(DESTDIR)/etc
	find $(DESTDIR)/usr/lib -name '*.la' -delete

	sed -e 's/#VERSION#/$(DEB_VERSION)/g'      \
	        <debian/update-inetd.sh            \
	        > $(DESTDIR)/usr/sbin/update-inetd
	chmod 755 $(DESTDIR)/usr/sbin/update-inetd