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" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | HOMEPAGE = "http://freecode.com/projects/tftp-hpa" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 11 | LICENSE = "BSD-4-Clause" |
| 12 | LIC_FILES_CHKSUM = "file://MCONFIG.in;beginline=1;endline=9;md5=c28ba5adb43041fae4629db05c83cbdd \ |
| 13 | file://tftp/tftp.c;beginline=1;endline=32;md5=988c1cba99d70858a26cd877209857f4" |
| 14 | |
| 15 | |
| 16 | SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.tar.bz2 \ |
| 17 | file://tftp-0.40-remap.patch \ |
| 18 | file://tftp-0.42-tftpboot.patch \ |
| 19 | file://tftp-0.49-chk_retcodes.patch \ |
| 20 | file://tftp-0.49-cmd_arg.patch \ |
| 21 | file://tftp-hpa-0.39-tzfix.patch \ |
| 22 | file://tftp-hpa-0.49-fortify-strcpy-crash.patch \ |
| 23 | file://tftp-hpa-0.49-stats.patch \ |
| 24 | file://tftp-hpa-5.2-pktinfo.patch \ |
| 25 | file://default \ |
| 26 | file://init \ |
| 27 | file://add-error-check-for-disk-filled-up.patch \ |
| 28 | file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \ |
| 29 | file://fix-writing-emtpy-file.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 30 | file://0001-__progname-is-provided-by-libc.patch \ |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 31 | file://0001-tftp-Mark-toplevel-definition-as-external.patch \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 32 | file://0001-tftp-Remove-double-inclusion-of-signal.h.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 33 | file://tftpd-hpa.socket \ |
| 34 | file://tftpd-hpa.service \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | " |
| 36 | |
| 37 | SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21" |
| 38 | SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269" |
| 39 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 40 | inherit autotools-brokensep update-rc.d update-alternatives systemd |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 41 | |
| 42 | export AR = "${HOST_PREFIX}ar cq" |
| 43 | |
| 44 | EXTRA_OECONF += "--disable-option-checking" |
| 45 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 47 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 48 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 49 | # configure.in has errors |
| 50 | do_configure() { |
| 51 | oe_runconf |
| 52 | } |
| 53 | |
| 54 | do_install() { |
| 55 | oe_runmake install INSTALLROOT=${D} |
| 56 | mv ${D}${bindir}/tftp ${D}${bindir}/tftp-hpa |
| 57 | mv ${D}${sbindir}/in.tftpd ${D}${sbindir}/in.tftpd-hpa |
| 58 | |
| 59 | install -m 755 -d ${D}${localstatedir}/lib/tftpboot/ |
| 60 | install -d ${D}${sysconfdir}/init.d |
| 61 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa |
| 62 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 63 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 64 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 65 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/tftpd-hpa |
| 66 | |
| 67 | install -d ${D}${sysconfdir}/default |
| 68 | install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 69 | |
| 70 | install -d ${D}${systemd_unitdir}/system |
| 71 | install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system |
| 72 | install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system |
| 73 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 74 | } |
| 75 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | FILES:${PN} = "${bindir}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 77 | |
| 78 | PACKAGES += "tftp-hpa-server" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 79 | SUMMARY:tftp-hpa-server = "Server for the Trivial File Transfer Protocol" |
| 80 | FILES:tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}" |
| 81 | CONFFILES:tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 82 | |
| 83 | INITSCRIPT_PACKAGES = "tftp-hpa-server" |
| 84 | INITSCRIPT_NAME = "tftpd-hpa" |
| 85 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ." |
| 86 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 87 | ALTERNATIVE:${PN}-doc = "tftpd.8 tftp.1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 88 | ALTERNATIVE_LINK_NAME[tftpd.8] = "${mandir}/man8/tftpd.8" |
| 89 | ALTERNATIVE_LINK_NAME[tftp.1] = "${mandir}/man1/tftp.1" |
| 90 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 91 | ALTERNATIVE:${PN} = "tftp" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 92 | ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa" |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 93 | ALTERNATIVE_PRIORITY = "100" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 94 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 95 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 96 | SYSTEMD_PACKAGES = "tftp-hpa-server" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 97 | SYSTEMD_SERVICE:tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service" |
| 98 | SYSTEMD_AUTO_ENABLE:tftp-hpa-server = "enable" |