blob: f893a4d6dcaf4bb6c0eef7b27bdfef291fb8362e [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001SUMMARY = "Advanced TFTP server and client"
2SECTION = "net"
3HOMEPAGE = "http://packages.debian.org/atftp"
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-only"
Andrew Geisslereff27472021-10-29 15:35:00 -05005LIC_FILES_CHKSUM = "file://LICENSE;md5=f65159f73e603f89d6867d43191900e5"
6
7SRCREV = "00921e75728e3681b051c2e48c59e36c6cfa2e97"
8
Andrew Geissler595f6302022-01-24 19:11:47 +00009SRC_URI = "git://git.code.sf.net/p/atftp/code;branch=master \
Andrew Geisslereff27472021-10-29 15:35:00 -050010 file://atftpd.init \
11 file://atftpd.service \
12"
13
14S = "${WORKDIR}/git"
15
16inherit autotools update-rc.d systemd
17
18PACKAGECONFIG ??= "tcp-wrappers"
19PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
20PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
21PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
22
23INITSCRIPT_PACKAGES = "${PN}d"
24INITSCRIPT_NAME:${PN}d = "atftpd"
25INITSCRIPT_PARAMS:${PN}d = "defaults 80"
26
27
28EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
29
30do_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
42PACKAGES =+ "${PN}d"
43
44FILES:${PN} = "${bindir}/*"
45
46FILES:${PN}d = "${sbindir}/* \
47 ${sysconfdir} \
48 /srv/tftp \
49 ${systemd_unitdir}/system/atftpd.service \
50"
51
52SYSTEMD_PACKAGES = "${PN}d"
53SYSTEMD_SERVICE:${PN}d = "atftpd.service"
54RPROVIDES:${PN}d += "${PN}d-systemd"
55RREPLACES:${PN}d += "${PN}d-systemd"
56RCONFLICTS:${PN}d += "${PN}d-systemd"