blob: 0ece58f7d363ac7374e592703732696a714635e2 [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"
6PV = "0.7.1+git${SRCPV}"
7PR = "r3"
8
9SRCREV = "be3291a18c069ae23a124ffdc56d64a5ff0bbec7"
10
11SRC_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 \
15 file://atftpd.service \
16 file://atftp-0.7-sorcerers_apprentice.patch \
17"
18S = "${WORKDIR}/git"
19
20inherit autotools update-rc.d useradd systemd
21
22PACKAGECONFIG ??= "tcp-wrappers"
23PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
24PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
25PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
26
27INITSCRIPT_PACKAGES = "${PN}d"
28INITSCRIPT_NAME_${PN}d = "atftpd"
29INITSCRIPT_PARAMS_${PN}d = "defaults 80"
30
31USERADD_PACKAGES = "${PN}d"
32USERADD_PARAM_${PN}d = "--system --no-create-home --shell /bin/false \
33 --user-group nobody"
34
35EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
36
37do_install_append() {
38 install -d ${D}${sysconfdir}/init.d
39 install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
40
41 install -d ${D}/srv/tftp
42
43 rm ${D}${sbindir}/in.tftpd
44
45 install -d ${D}${systemd_unitdir}/system
46 install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system
47}
48
49PACKAGES =+ "${PN}d"
50
51FILES_${PN} = "${bindir}/*"
52
53FILES_${PN}d = "${sbindir}/* \
54 ${sysconfdir} \
55 /srv/tftp \
56 ${systemd_unitdir}/system/atftpd.service \
57"
58
59SYSTEMD_PACKAGES = "${PN}d"
60SYSTEMD_SERVICE_${PN}d = "atftpd.service"
61RPROVIDES_${PN}d += "${PN}d-systemd"
62RREPLACES_${PN}d += "${PN}d-systemd"
63RCONFLICTS_${PN}d += "${PN}d-systemd"