Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "Client for the Trivial File Transfer Protocol" |
| 2 | DESCRIPTION = \ |
| 3 | "The Trivial File Transfer Protocol (TFTP) is normally used only for \ |
| 4 | booting diskless workstations. The tftp package provides the user \ |
| 5 | interface for TFTP, which allows users to transfer files to and from a \ |
| 6 | remote machine. This program and TFTP provide very little security, \ |
| 7 | and should not be enabled unless it is expressly needed." |
| 8 | DEPENDS = "tcp-wrappers readline" |
| 9 | SECTION = "net" |
| 10 | LICENSE = "BSD-4-Clause" |
| 11 | LIC_FILES_CHKSUM = "file://MCONFIG.in;beginline=1;endline=9;md5=c28ba5adb43041fae4629db05c83cbdd \ |
| 12 | file://tftp/tftp.c;beginline=1;endline=32;md5=988c1cba99d70858a26cd877209857f4" |
| 13 | |
| 14 | |
| 15 | SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.tar.bz2 \ |
| 16 | file://tftp-0.40-remap.patch \ |
| 17 | file://tftp-0.42-tftpboot.patch \ |
| 18 | file://tftp-0.49-chk_retcodes.patch \ |
| 19 | file://tftp-0.49-cmd_arg.patch \ |
| 20 | file://tftp-hpa-0.39-tzfix.patch \ |
| 21 | file://tftp-hpa-0.49-fortify-strcpy-crash.patch \ |
| 22 | file://tftp-hpa-0.49-stats.patch \ |
| 23 | file://tftp-hpa-5.2-pktinfo.patch \ |
| 24 | file://default \ |
| 25 | file://init \ |
| 26 | file://add-error-check-for-disk-filled-up.patch \ |
| 27 | file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \ |
| 28 | file://fix-writing-emtpy-file.patch \ |
| 29 | " |
| 30 | |
| 31 | SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21" |
| 32 | SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269" |
| 33 | |
| 34 | inherit autotools-brokensep update-rc.d update-alternatives |
| 35 | |
| 36 | export AR = "${HOST_PREFIX}ar cq" |
| 37 | |
| 38 | EXTRA_OECONF += "--disable-option-checking" |
| 39 | |
| 40 | # configure.in has errors |
| 41 | do_configure() { |
| 42 | oe_runconf |
| 43 | } |
| 44 | |
| 45 | do_install() { |
| 46 | oe_runmake install INSTALLROOT=${D} |
| 47 | mv ${D}${bindir}/tftp ${D}${bindir}/tftp-hpa |
| 48 | mv ${D}${sbindir}/in.tftpd ${D}${sbindir}/in.tftpd-hpa |
| 49 | |
| 50 | install -m 755 -d ${D}${localstatedir}/lib/tftpboot/ |
| 51 | install -d ${D}${sysconfdir}/init.d |
| 52 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa |
| 53 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 54 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 55 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 56 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 57 | |
| 58 | install -d ${D}${sysconfdir}/default |
| 59 | install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa |
| 60 | } |
| 61 | |
| 62 | FILES_${PN} = "${bindir}" |
| 63 | |
| 64 | PACKAGES += "tftp-hpa-server" |
| 65 | SUMMARY_tftp-hpa-server = "Server for the Trivial File Transfer Protocol" |
| 66 | FILES_tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}" |
| 67 | CONFFILES_tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa" |
| 68 | |
| 69 | INITSCRIPT_PACKAGES = "tftp-hpa-server" |
| 70 | INITSCRIPT_NAME = "tftpd-hpa" |
| 71 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ." |
| 72 | |
| 73 | ALTERNATIVE_${PN} = "tftp" |
| 74 | ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa" |
| 75 | ALTERNATIVE_PRIORITY = "50" |
| 76 | |