diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2009-05-19 21:45:49 +0200 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2009-05-19 21:46:46 +0200 |
commit | 9fb58d79a6a5d96af251ace28669243ba37d77e0 (patch) | |
tree | 4e457388575974665c7898f5a291033815ca71c9 /recipes/tftp-hpa/tftp-hpa_5.0.bb | |
parent | 1e0d96b7d4e6b2643e2551fa8dcebd4df2045fda (diff) |
tftp-hpa: added 5.0 version of HPA tftp client/daemon
Diffstat (limited to 'recipes/tftp-hpa/tftp-hpa_5.0.bb')
-rw-r--r-- | recipes/tftp-hpa/tftp-hpa_5.0.bb | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/recipes/tftp-hpa/tftp-hpa_5.0.bb b/recipes/tftp-hpa/tftp-hpa_5.0.bb new file mode 100644 index 0000000000..4137bf0bab --- /dev/null +++ b/recipes/tftp-hpa/tftp-hpa_5.0.bb @@ -0,0 +1,71 @@ +DESCRIPTION = "HPA's tftp server" +DEPENDS = "tcp-wrappers readline" +SECTION = "network" +LICENSE = "BSD" + +SRC_URI = "${KERNELORG_MIRROR}/pub/software/network/tftp/tftp-hpa-${PV}.tar.bz2 \ + file://default \ + file://init" + +inherit autotools update-alternatives + +# configure.in has errors +do_configure() { + oe_runconf +} + +do_install() { + oe_runmake install INSTALLROOT=${D} + + mv ${D}${bindir}/tftp ${D}${bindir}/tftp.${PN} + + install -d ${D}${sysconfdir}/default + install -d ${D}${sysconfdir}/init.d + + install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftp-hpa + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftp-hpa +} + + +INITSCRIPT_NAME = "${PN}" +INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ." + +PACKAGES += "tftpd-hpa" + +FILES_${PN} = "${bindir}" +FILES_tftpd-hpa = "${sbindir} ${sysconfdir}" +CONFFILES_tftpd-hpa = "${sysconfdir}/default/${PN}" + +ALTERNATIVE_NAME = "tftp" +ALTERNATIVE_LINK = "${bindir}/tftp" +ALTERNATIVE_PATH = "${bindir}/tftp.${PN}" +ALTERNATIVE_PRIORITY = "50" + + +# This is taken from update-rc.d.bbclass which works only for $PN package +# so I had to do that way + +postinst_tftpd-hpa() { +if test "x$D" != "x"; then + OPT="-r $D" +else + OPT="-s" +fi +update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} +} + +prerm_tftpd-hpa() { +if test "x$D" = "x"; then + ${sysconfdir}/init.d/${INITSCRIPT_NAME} stop +fi +} + +postrm_tftpd-hpa() { +if test "x$D" != "x"; then + OPT="-r $D" +else + OPT="" +fi +update-rc.d $OPT ${INITSCRIPT_NAME} remove +} + |