summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/netbase/netbase_5.5.bb
blob: 8099de9fec85fffbf80b407c874b47b57e414c2c (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
SUMMARY = "Basic TCP/IP networking support"
DESCRIPTION = "This package provides the necessary infrastructure for basic TCP/IP based networking"
HOMEPAGE = "http://packages.debian.org/netbase"
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
PE = "1"

SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz \
           file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch \
           file://hosts"

SRC_URI[md5sum] = "15f2d9b3783802f7f48f6734b6540ac4"
SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be98f88b"

UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/"
do_install () {
	install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
	install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
	install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
	install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
	install -m 0644 etc-services ${D}${sysconfdir}/services
}

CONFFILES_${PN} = "${sysconfdir}/hosts"

RDEPENDS_${PN} += "base-files"

pkg_postinst_${PN} () {
	if [ -s $D${sysconfdir}/hostname ]; then
		hostname=`cat $D${sysconfdir}/hostname`
		if ! grep -q "[[:space:]]$hostname[[:space:]]*" $D${sysconfdir}/hosts; then
			echo "127.0.1.1 $hostname" >> $D${sysconfdir}/hosts
		fi
	fi
}