xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.8.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "A 802.1ab implementation (LLDP) to help you locate neighbors of all your equipments"
2*4882a593SmuzhiyunSECTION = "net/misc"
3*4882a593SmuzhiyunLICENSE = "ISC"
4*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunDEPENDS = "libbsd libevent"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSRC_URI = "\
9*4882a593Smuzhiyun    http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \
10*4882a593Smuzhiyun    file://lldpd.init.d \
11*4882a593Smuzhiyun    file://lldpd.default \
12*4882a593Smuzhiyun    "
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSRC_URI[md5sum] = "000042dbf5b445f750b5ba01ab25c8ba"
15*4882a593SmuzhiyunSRC_URI[sha256sum] = "98d200e76e30f6262c4a4493148c1840827898329146a57a34f8f0f928ca3def"
16*4882a593Smuzhiyun
17*4882a593Smuzhiyuninherit autotools update-rc.d useradd systemd pkgconfig bash-completion
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunUSERADD_PACKAGES = "${PN}"
20*4882a593SmuzhiyunUSERADD_PARAM:${PN} = "--system -g lldpd --shell /bin/false lldpd"
21*4882a593SmuzhiyunGROUPADD_PARAM:${PN} = "--system lldpd"
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunEXTRA_OECONF += "--without-embedded-libevent \
24*4882a593Smuzhiyun                 --disable-oldies \
25*4882a593Smuzhiyun                 --with-privsep-user=lldpd \
26*4882a593Smuzhiyun                 --with-privsep-group=lldpd \
27*4882a593Smuzhiyun                 --with-systemdsystemunitdir=${systemd_system_unitdir} \
28*4882a593Smuzhiyun                 --without-sysusersdir \
29*4882a593Smuzhiyun"
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunPACKAGECONFIG ??= "cdp fdp edp sonmp lldpmed dot1 dot3"
32*4882a593SmuzhiyunPACKAGECONFIG[xml] = "--with-xml,--without-xml,libxm2"
33*4882a593SmuzhiyunPACKAGECONFIG[snmp] = "--with-snmp,--without-snmp,net-snmp"
34*4882a593SmuzhiyunPACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
35*4882a593SmuzhiyunPACKAGECONFIG[seccomp] = "--with-seccomp,--without-seccomp,libseccomp"
36*4882a593SmuzhiyunPACKAGECONFIG[cdp] = "--enable-cdp,--disable-cdp"
37*4882a593SmuzhiyunPACKAGECONFIG[fdp] = "--enable-fdp,--disable-fdp"
38*4882a593SmuzhiyunPACKAGECONFIG[edp] = "--enable-edp,--disable-edp"
39*4882a593SmuzhiyunPACKAGECONFIG[sonmp] = "--enable-sonmp,--disable-sonmp"
40*4882a593SmuzhiyunPACKAGECONFIG[lldpmed] = "--enable-lldpmed,--disable-lldpmed"
41*4882a593SmuzhiyunPACKAGECONFIG[dot1] = "--enable-dot1,--disable-dot1"
42*4882a593SmuzhiyunPACKAGECONFIG[dot3] = "--enable-dot3,--disable-dot3"
43*4882a593SmuzhiyunPACKAGECONFIG[custom] = "--enable-custom,--disable-custom"
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunINITSCRIPT_NAME = "lldpd"
46*4882a593SmuzhiyunINITSCRIPT_PARAMS = "defaults"
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "lldpd.service"
49*4882a593Smuzhiyun
50*4882a593Smuzhiyundo_install:append() {
51*4882a593Smuzhiyun    install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd
52*4882a593Smuzhiyun    install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd
53*4882a593Smuzhiyun    # Make an empty configuration file
54*4882a593Smuzhiyun    touch ${D}${sysconfdir}/lldpd.conf
55*4882a593Smuzhiyun}
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunPACKAGES =+ "${PN}-zsh-completion"
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunFILES:${PN} += "${libdir}/sysusers.d"
60*4882a593SmuzhiyunRDEPENDS:${PN} += "os-release"
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunFILES:${PN}-zsh-completion += "${datadir}/zsh/"
63*4882a593Smuzhiyun# FIXME: zsh is broken in meta-oe so this cannot be enabled for now
64*4882a593Smuzhiyun#RDEPENDS:${PN}-zsh-completion += "zsh"
65