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" |
| 6 | PV = "0.7.1+git${SRCPV}" |
| 7 | PR = "r3" |
| 8 | |
| 9 | SRCREV = "be3291a18c069ae23a124ffdc56d64a5ff0bbec7" |
| 10 | |
| 11 | SRC_URI = "git://git.code.sf.net/p/atftp/code \ |
| 12 | file://atftpd-0.7_circumvent_tftp_size_restrictions.patch \ |
| 13 | file://atftpd-0.7_unprotected_assignments_crash.patch \ |
| 14 | file://atftpd.init \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 15 | file://atftpd.service \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 16 | file://atftp-0.7-sorcerers_apprentice.patch \ |
| 17 | " |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 18 | SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ |
| 19 | file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ |
| 20 | " |
| 21 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 22 | S = "${WORKDIR}/git" |
| 23 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 24 | inherit autotools update-rc.d systemd |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 25 | |
| 26 | PACKAGECONFIG ??= "tcp-wrappers" |
| 27 | PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre" |
| 28 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" |
| 29 | PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline" |
| 30 | |
| 31 | INITSCRIPT_PACKAGES = "${PN}d" |
| 32 | INITSCRIPT_NAME_${PN}d = "atftpd" |
| 33 | INITSCRIPT_PARAMS_${PN}d = "defaults 80" |
| 34 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | |
| 36 | EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" |
| 37 | |
| 38 | do_install_append() { |
| 39 | install -d ${D}${sysconfdir}/init.d |
| 40 | install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd |
| 41 | |
| 42 | install -d ${D}/srv/tftp |
| 43 | |
| 44 | rm ${D}${sbindir}/in.tftpd |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 45 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 46 | install -d ${D}${systemd_unitdir}/system |
| 47 | install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system |
| 48 | } |
| 49 | |
| 50 | PACKAGES =+ "${PN}d" |
| 51 | |
| 52 | FILES_${PN} = "${bindir}/*" |
| 53 | |
| 54 | FILES_${PN}d = "${sbindir}/* \ |
| 55 | ${sysconfdir} \ |
| 56 | /srv/tftp \ |
| 57 | ${systemd_unitdir}/system/atftpd.service \ |
| 58 | " |
| 59 | |
| 60 | SYSTEMD_PACKAGES = "${PN}d" |
| 61 | SYSTEMD_SERVICE_${PN}d = "atftpd.service" |
| 62 | RPROVIDES_${PN}d += "${PN}d-systemd" |
| 63 | RREPLACES_${PN}d += "${PN}d-systemd" |
| 64 | RCONFLICTS_${PN}d += "${PN}d-systemd" |