OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | # |
2 | # Copyright (C) 2008-2015 OpenWrt.org |
||
3 | # |
||
4 | # This is free software, licensed under the GNU General Public License v2. |
||
5 | # See /LICENSE for more information. |
||
6 | # |
||
7 | |||
8 | include $(TOPDIR)/rules.mk |
||
9 | |||
10 | PKG_NAME:=lldpd |
||
11 | PKG_VERSION:=1.0.1 |
||
3 | office | 12 | PKG_RELEASE:=1 |
1 | office | 13 | |
14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
||
3 | office | 15 | PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd |
1 | office | 16 | PKG_HASH:=450b622aac7ae1758f1ef82f3b7b94ec47f2ff33abfb0e6ac82555b9ee55f151 |
17 | |||
18 | PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be> |
||
19 | PKG_LICENSE:=ISC |
||
20 | |||
21 | PKG_FIXUP:=autoreconf |
||
22 | PKG_INSTALL:=1 |
||
23 | |||
3 | office | 24 | TARGET_CFLAGS+=--std=c99 |
25 | |||
1 | office | 26 | include $(INCLUDE_DIR)/package.mk |
27 | |||
28 | define Package/lldpd |
||
29 | SECTION:=net |
||
30 | CATEGORY:=Network |
||
31 | SUBMENU:=Routing and Redirection |
||
32 | TITLE:=Link Layer Discovery Protocol daemon |
||
3 | office | 33 | URL:=https://github.com/vincentbernat/lldpd/wiki |
1 | office | 34 | DEPENDS:=+libevent2 +USE_GLIBC:libbsd +LLDPD_WITH_JSON:libjson-c +LLDPD_WITH_SNMP:libnetsnmp |
35 | USERID:=lldp=121:lldp=129 |
||
36 | MENU:=1 |
||
37 | endef |
||
38 | |||
39 | define Package/lldpd/config |
||
40 | source "$(SOURCE)/Config.in" |
||
41 | endef |
||
42 | |||
43 | define Package/lldpd/description |
||
44 | LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed |
||
45 | to supplant proprietary Link-Layer protocols such as |
||
46 | Extreme's EDP (Extreme Discovery Protocol) and |
||
47 | CDP (Cisco Discovery Protocol). |
||
48 | The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver |
||
49 | Link-Layer notifications to adjacent network devices. |
||
50 | endef |
||
51 | |||
52 | define Build/InstallDev |
||
53 | $(INSTALL_DIR) $(1)/usr/lib |
||
54 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblldpctl.so* $(1)/usr/lib/ |
||
55 | $(INSTALL_DIR) $(1)/usr/include |
||
56 | $(CP) $(PKG_INSTALL_DIR)/usr/include/lldpctl.h $(1)/usr/include/lldpctl.h |
||
57 | $(CP) $(PKG_INSTALL_DIR)/usr/include/lldp-const.h $(1)/usr/include/lldp-const.h |
||
58 | endef |
||
59 | |||
60 | define Package/lldpd/install |
||
61 | $(INSTALL_DIR) $(1)/etc/init.d |
||
62 | $(INSTALL_DIR) $(1)/etc/lldpd.d |
||
63 | $(INSTALL_DIR) $(1)/etc/config |
||
64 | $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/sbin |
||
65 | $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lldp{cli,ctl,d} $(1)/usr/sbin/ |
||
66 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblldpctl.so* $(1)/usr/lib/ |
||
67 | $(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd |
||
3 | office | 68 | $(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd |
1 | office | 69 | ifneq ($(CONFIG_LLDPD_WITH_CDP),y) |
70 | sed -i -e '/cdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd |
||
71 | endif |
||
72 | ifneq ($(CONFIG_LLDPD_WITH_FDP),y) |
||
73 | sed -i -e '/fdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd |
||
74 | endif |
||
75 | ifneq ($(CONFIG_LLDPD_WITH_EDP),y) |
||
76 | sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd |
||
77 | endif |
||
78 | ifneq ($(CONFIG_LLDPD_WITH_SONMP),y) |
||
79 | sed -i -e '/sonmp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd |
||
80 | endif |
||
81 | ifneq ($(CONFIG_LLDPD_WITH_SNMP),y) |
||
82 | sed -i -e '/agentxsocket/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd |
||
83 | endif |
||
84 | endef |
||
85 | |||
86 | define Package/lldpd/conffiles |
||
87 | /etc/config/lldpd |
||
88 | endef |
||
89 | |||
90 | CONFIGURE_ARGS += \ |
||
91 | $(if $(CONFIG_LLDPD_WITH_PRIVSEP), \ |
||
92 | --with-privsep-user=lldp \ |
||
93 | --with-privsep-group=lldp \ |
||
94 | --with-privsep-chroot=/var/run/lldp \ |
||
95 | ,--disable-privsep) \ |
||
96 | --with-readline=no \ |
||
97 | --with-embedded-libevent=no \ |
||
98 | --disable-hardening \ |
||
99 | --without-xml \ |
||
100 | --sysconfdir=/tmp \ |
||
101 | $(if $(CONFIG_LLDPD_WITH_CDP),,--disable-cdp) \ |
||
102 | $(if $(CONFIG_LLDPD_WITH_FDP),,--disable-fdp) \ |
||
103 | $(if $(CONFIG_LLDPD_WITH_EDP),,--disable-edp) \ |
||
104 | $(if $(CONFIG_LLDPD_WITH_LLDPMED),,--disable-lldpmed) \ |
||
105 | $(if $(CONFIG_LLDPD_WITH_DOT1),,--disable-dot1) \ |
||
106 | $(if $(CONFIG_LLDPD_WITH_DOT3),,--disable-dot3) \ |
||
107 | $(if $(CONFIG_LLDPD_WITH_CUSTOM),,--disable-custom) \ |
||
108 | $(if $(CONFIG_LLDPD_WITH_SONMP),,--disable-sonmp) \ |
||
109 | $(if $(CONFIG_LLDPD_WITH_JSON),--with-json=json-c,--with-json=no) \ |
||
110 | $(if $(CONFIG_LLDPD_WITH_SNMP),--with-snmp,) |
||
111 | |||
112 | |||
113 | $(eval $(call BuildPackage,lldpd)) |