Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1 | SUMMARY = "Advanced TFTP server and client" |
| 2 | SECTION = "net" |
| 3 | HOMEPAGE = "http://packages.debian.org/atftp" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f65159f73e603f89d6867d43191900e5" |
| 6 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 7 | SRCREV = "d5c27eb7a9695d83569767e27ef69674173db39a" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 8 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 9 | SRC_URI = "git://git.code.sf.net/p/atftp/code;branch=master;protocol=https \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 10 | file://atftpd.init \ |
| 11 | file://atftpd.service \ |
| 12 | " |
| 13 | |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
| 16 | inherit autotools update-rc.d systemd |
| 17 | |
| 18 | PACKAGECONFIG ??= "tcp-wrappers" |
| 19 | PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre" |
| 20 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" |
| 21 | PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline" |
| 22 | |
| 23 | INITSCRIPT_PACKAGES = "${PN}d" |
| 24 | INITSCRIPT_NAME:${PN}d = "atftpd" |
| 25 | INITSCRIPT_PARAMS:${PN}d = "defaults 80" |
| 26 | |
| 27 | |
| 28 | EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" |
| 29 | |
| 30 | do_install:append() { |
| 31 | install -d ${D}${sysconfdir}/init.d |
| 32 | install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd |
| 33 | |
| 34 | install -d ${D}/srv/tftp |
| 35 | |
| 36 | rm ${D}${sbindir}/in.tftpd |
| 37 | |
| 38 | install -d ${D}${systemd_unitdir}/system |
| 39 | install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system |
| 40 | } |
| 41 | |
| 42 | PACKAGES =+ "${PN}d" |
| 43 | |
| 44 | FILES:${PN} = "${bindir}/*" |
| 45 | |
| 46 | FILES:${PN}d = "${sbindir}/* \ |
| 47 | ${sysconfdir} \ |
| 48 | /srv/tftp \ |
| 49 | ${systemd_unitdir}/system/atftpd.service \ |
| 50 | " |
| 51 | |
| 52 | SYSTEMD_PACKAGES = "${PN}d" |
| 53 | SYSTEMD_SERVICE:${PN}d = "atftpd.service" |
| 54 | RPROVIDES:${PN}d += "${PN}d-systemd" |
| 55 | RREPLACES:${PN}d += "${PN}d-systemd" |
| 56 | RCONFLICTS:${PN}d += "${PN}d-systemd" |