summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 5bcbb83588bceca95bc7de51338ec4e9269970ef (plain)
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
#!/usr/bin/make -f
# This file is PUBLIC DOMAIN.

DEB_TAR_SRCDIR := inetutils-1.4.2+20040207
DEB_BUILDDIR = $(DEB_SRCDIR)/build

# ping is setuid
DEB_FIXPERMS_EXCLUDE = bin/ping bin/ping6

DEB_AUTO_UPDATE_AUTOMAKE = 1.8
DEB_AUTO_UPDATE_ACLOCAL = $(DEB_AUTO_UPDATE_AUTOMAKE)
DEB_AUTO_UPDATE_AUTOCONF = 2.50

mandir = usr/share/man
man1dir = $(mandir)/man1
man8dir = $(mandir)/man8

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

# Needs to be after the includes
DEB_CONFIGURE_LIBEXECDIR = "\$${prefix}/sbin"

# Set proper Priority and Section
clean ::
ifeq ($(DEB_HOST_ARCH_OS),linux)
	cat debian/control.in \
	| sed \
	  -e 's/@inetutils:Priority@/optional/g' \
	  -e 's/@syslogd:Priority@/optional/g' \
	  -e 's/@syslogd:Section@/net/g' \
	  -e '/@tools:Provides@/d' \
	> debian/control
else
	cat debian/control.in \
	| sed \
	  -e 's/@inetutils:Priority@/standard/g' \
	  -e 's/@syslogd:Priority@/required/g' \
	  -e 's/@syslogd:Section@/base/g' \
	  -e 's/@tools:Provides@/Provides: net-tools/g' \
	> debian/control
endif

# Move ping to /bin
install/inetutils-ping ::
	mkdir debian/tmp/bin
	mv debian/tmp/usr/bin/ping debian/tmp/bin/

binary-install/inetutils-ping ::
	if [ -x $(CURDIR)/debian/tmp/usr/bin/ping6 ]; then \
	  mv $(CURDIR)/debian/tmp/usr/bin/ping6 \
	     $(CURDIR)/debian/$(cdbs_curpkg)/bin/; \
	fi

# Rename ifconfig to not break existing systems using net-tools
install/inetutils-tools ::
	mv debian/tmp/usr/bin/ifconfig debian/tmp/usr/bin/inetutils-ifconfig

# Rename inetd to be able to coexist with not purged netkit-inetd
install/inetutils-inetd ::
	mv debian/tmp/usr/sbin/inetd debian/tmp/usr/sbin/inetutils-inetd
	mv debian/tmp/$(man8dir)/inetd.8 debian/tmp/$(man8dir)/inetutils-inetd.8

# Needed to enable alternatives
install/inetutils-telnet ::
	mv debian/tmp/usr/bin/telnet debian/tmp/usr/bin/inetutils-telnet
	mv debian/tmp/$(man1dir)/telnet.1 debian/tmp/$(man1dir)/inetutils-telnet.1

install/inetutils-ftp ::
	mv debian/tmp/usr/bin/ftp debian/tmp/usr/bin/inetutils-ftp
	mv debian/tmp/$(man1dir)/ftp.1 debian/tmp/$(man1dir)/inetutils-ftp.1

install/inetutils-talk ::
	mv debian/tmp/usr/bin/talk debian/tmp/usr/bin/inetutils-talk
	mv debian/tmp/$(man1dir)/talk.1 debian/tmp/$(man1dir)/inetutils-talk.1