Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "Advanced TFTP server and client" |
| 2 | SECTION = "net" |
| 3 | HOMEPAGE = "http://packages.debian.org/atftp" |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 6 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 7 | SRCREV = "52b71f0831dcbde508bd3a961d84abb80a62480f" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | |
| 9 | SRC_URI = "git://git.code.sf.net/p/atftp/code \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 10 | file://atftpd.init \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 11 | file://atftpd.service \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 12 | " |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 13 | SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ |
| 14 | file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ |
| 15 | " |
| 16 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 17 | S = "${WORKDIR}/git" |
| 18 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 19 | inherit autotools update-rc.d systemd |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | |
| 21 | PACKAGECONFIG ??= "tcp-wrappers" |
| 22 | PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre" |
| 23 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" |
| 24 | PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline" |
| 25 | |
| 26 | INITSCRIPT_PACKAGES = "${PN}d" |
| 27 | INITSCRIPT_NAME_${PN}d = "atftpd" |
| 28 | INITSCRIPT_PARAMS_${PN}d = "defaults 80" |
| 29 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 30 | |
| 31 | EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" |
| 32 | |
| 33 | do_install_append() { |
| 34 | install -d ${D}${sysconfdir}/init.d |
| 35 | install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd |
| 36 | |
| 37 | install -d ${D}/srv/tftp |
| 38 | |
| 39 | rm ${D}${sbindir}/in.tftpd |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 40 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 41 | install -d ${D}${systemd_unitdir}/system |
| 42 | install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system |
| 43 | } |
| 44 | |
| 45 | PACKAGES =+ "${PN}d" |
| 46 | |
| 47 | FILES_${PN} = "${bindir}/*" |
| 48 | |
| 49 | FILES_${PN}d = "${sbindir}/* \ |
| 50 | ${sysconfdir} \ |
| 51 | /srv/tftp \ |
| 52 | ${systemd_unitdir}/system/atftpd.service \ |
| 53 | " |
| 54 | |
| 55 | SYSTEMD_PACKAGES = "${PN}d" |
| 56 | SYSTEMD_SERVICE_${PN}d = "atftpd.service" |
| 57 | RPROVIDES_${PN}d += "${PN}d-systemd" |
| 58 | RREPLACES_${PN}d += "${PN}d-systemd" |
| 59 | RCONFLICTS_${PN}d += "${PN}d-systemd" |