blob: ff9084dbf6e23c8d80ac61f8fbe40751ec0dec21 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "Advanced TFTP server and client"
2SECTION = "net"
3HOMEPAGE = "http://packages.debian.org/atftp"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05006
Brad Bishop15ae2502019-06-18 21:44:24 -04007SRCREV = "52b71f0831dcbde508bd3a961d84abb80a62480f"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05008
9SRC_URI = "git://git.code.sf.net/p/atftp/code \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010 file://atftpd.init \
Patrick Williamsddad1a12017-02-23 20:36:32 -060011 file://atftpd.service \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050012"
Patrick Williamsddad1a12017-02-23 20:36:32 -060013SRC_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 Williamsb48b7b42016-08-17 15:04:38 -050017S = "${WORKDIR}/git"
18
Patrick Williamsddad1a12017-02-23 20:36:32 -060019inherit autotools update-rc.d systemd
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020
21PACKAGECONFIG ??= "tcp-wrappers"
22PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
23PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
24PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
25
26INITSCRIPT_PACKAGES = "${PN}d"
27INITSCRIPT_NAME_${PN}d = "atftpd"
28INITSCRIPT_PARAMS_${PN}d = "defaults 80"
29
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030
31EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
32
33do_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 Williamsddad1a12017-02-23 20:36:32 -060040
Patrick Williamsb48b7b42016-08-17 15:04:38 -050041 install -d ${D}${systemd_unitdir}/system
42 install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system
43}
44
45PACKAGES =+ "${PN}d"
46
47FILES_${PN} = "${bindir}/*"
48
49FILES_${PN}d = "${sbindir}/* \
50 ${sysconfdir} \
51 /srv/tftp \
52 ${systemd_unitdir}/system/atftpd.service \
53"
54
55SYSTEMD_PACKAGES = "${PN}d"
56SYSTEMD_SERVICE_${PN}d = "atftpd.service"
57RPROVIDES_${PN}d += "${PN}d-systemd"
58RREPLACES_${PN}d += "${PN}d-systemd"
59RCONFLICTS_${PN}d += "${PN}d-systemd"