1 DESCRIPTION = "HPA's tftp server"
2 DEPENDS = "tcp-wrappers readline"
7 SRC_URI = "${KERNELORG_MIRROR}/pub/software/network/tftp/tftp-hpa-${PV}.tar.bz2 \
11 inherit autotools update-alternatives
13 # configure.in has errors
19 oe_runmake install INSTALLROOT=${D}
21 mv ${D}${bindir}/tftp ${D}${bindir}/tftp.${PN}
23 install -d ${D}${sysconfdir}/default
24 install -d ${D}${sysconfdir}/init.d
26 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
27 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftp-hpa
31 INITSCRIPT_NAME = "${PN}"
32 INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ."
34 PACKAGES += "tftpd-hpa"
36 FILES_${PN} = "${bindir}"
37 FILES_tftpd-hpa = "${sbindir} ${sysconfdir}"
38 CONFFILES_tftpd-hpa = "${sysconfdir}/default/tftpd-hpa"
40 ALTERNATIVE_NAME = "tftp"
41 ALTERNATIVE_LINK = "${bindir}/tftp"
42 ALTERNATIVE_PATH = "${bindir}/tftp.${PN}"
43 ALTERNATIVE_PRIORITY = "50"
46 # This is taken from update-rc.d.bbclass which works only for $PN package
47 # so I had to do that way
49 postinst_tftpd-hpa() {
50 if test "x$D" != "x"; then
55 update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
59 if test "x$D" = "x"; then
60 ${sysconfdir}/init.d/${INITSCRIPT_NAME} stop
65 if test "x$D" != "x"; then
70 update-rc.d $OPT ${INITSCRIPT_NAME} remove