summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/atftp/atftp_0.7.bb
blob: ab14a28427e15ba4d1d7760ff19ea8fd6c919f8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
DESCRIPTION = "Advanced TFTP server and client"
SECTION = "network"
HOMEPAGE = "http://packages.debian.org/atftp"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
PR = "r1"

SRC_URI = "${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg.orig.tar.gz;name=archive \
           ${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg-11.diff.gz;name=patch \
           file://atftpd.init \
           file://atftpd.service"

S = "${WORKDIR}/atftp-${PV}.dfsg"

inherit autotools update-rc.d systemd useradd

SYSTEMD_PACKAGES = "atftpd-systemd"
SYSTEMD_SERVICE_atftpd-systemd = "atftpd.service"

INITSCRIPT_PACKAGES = "${PN}d"
INITSCRIPT_NAME_${PN}d = "atftpd"
INITSCRIPT_PARAMS_${PN}d = "defaults 80"

USERADD_PACKAGES = "${PN}d"
USERADD_PARAM_${PN}d = "--system --no-create-home --shell /bin/false \
                        --user-group nobody"

do_install_append() {
    install -d ${D}${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd

    install -d ${D}${base_libdir}/systemd/system
    install -m 644 ${WORKDIR}/atftpd.service ${D}${base_libdir}/systemd/system

    install -d ${D}/srv/tftp

    rm ${D}${sbindir}/in.tftpd
}

PACKAGES =+ "atftpd-systemd atftpd"

FILES_${PN} = "${bindir}/*"

FILES_${PN}d = "${sbindir}/* ${sysconfdir}/init.d/* /srv/tftp"

FILES_atftpd-systemd += "${base_libdir}/systemd"
RDEPENDS_atftpd-systemd += "atftpd"

SRC_URI[archive.md5sum] = "aa269044a6f992eca78fee2f6119643c"
SRC_URI[archive.sha256sum] = "18815f5b67290fac087c6b9da28dfa5e0feb722096f5c5de52e59b46026da559"
SRC_URI[patch.md5sum] = "1636f199bf32c754a7bf34a5c647d138"
SRC_URI[patch.sha256sum] = "0df33f6c09c2b2de58a84d7bb757844fc9538cd4d6c8d9c463da5270ebc2e41d"