summaryrefslogtreecommitdiff
path: root/recipes/netkit-tftp/netkit-tftpd_0.17.bb
blob: 44f29a1b6b892f3e738f458c9f6592cb399a75f1 (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
SECTION = "console/network"
DESCRIPTION = "netkit-tftpd includes a tftp server."
DEPENDS = "netkit-base"
RDEPENDS_${PN} = "netkit-base"
LICENSE = "BSD"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/netkit-tftp-${PV}"

SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-tftp-${PV}.tar.gz \
	   file://mconfig.patch \
           file://tftpd_add_debug.patch \
	   file://pack_tftphdr.patch"

S = "${WORKDIR}/netkit-tftp-${PV}"

PR = "r8"

EXTRA_OEMAKE = ""
do_compile () {
	oe_runmake 'CC=${CC}' 'LD=${LD}' all
}

do_install () {
	install -d ${D}${sbindir}
	install -m 0755 tftpd/tftpd ${D}${sbindir}/tftpd
}

pkg_postinst () {
	#only run on the device
	if [ -n "$D" ]; then exit 1; fi

	#install inetd.conf line to run tftpd
	echo "tftp    dgram   udp     wait    root    ${sbindir}/tftpd tftpd" >> /etc/inetd.conf

	#force inetd to reload settings
	kill -SIGHUP `cat /var/run/inetd.pid`
}

SRC_URI[md5sum] = "b7262c798e2ff50e29c2ff50dfd8d6a8"
SRC_URI[sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d"