lldpd: upgrade to 0.7.1
[15.05/openwrt.git] / package / network / services / lldpd / Makefile
1 #
2 # Copyright (C) 2008-2012 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:=0.7.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
16 PKG_MD5SUM:=cee0e2ae7d4b8bf25ae234d9536052b8
17
18 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
19
20 PKG_FIXUP:=autoreconf
21 PKG_INSTALL:=1
22
23 TARGET_CFLAGS+=--std=c99
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/lldpd
28   SECTION:=net
29   CATEGORY:=Network
30   SUBMENU:=Routing and Redirection
31   TITLE:=Link Layer Discovery Protocol daemon
32   URL:=https://github.com/vincentbernat/lldpd/wiki
33   DEPENDS:=+libevent2
34 endef
35
36 define Package/lldpd/description
37         LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed
38         to supplant proprietary Link-Layer protocols such as
39         Extreme's EDP (Extreme Discovery Protocol) and
40         CDP (Cisco Discovery Protocol).
41         The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver
42         Link-Layer notifications to adjacent network devices.
43 endef
44
45 define Package/lldpd/install
46         $(INSTALL_DIR) $(1)/etc/init.d
47         $(INSTALL_DIR) $(1)/etc/config
48         $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/sbin
49         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lldp{ctl,d} $(1)/usr/sbin/
50         $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblldpctl.so* $(1)/usr/lib/
51         $(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd
52         $(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd
53 endef
54
55 define Package/lldpd/conffiles
56 /etc/config/lldpd
57 endef
58
59 CONFIGURE_ARGS += \
60         --with-privsep-user=lldp \
61         --with-privsep-group=lldp \
62         --with-privsep-chroot=/var/run/lldp
63
64 $(eval $(call BuildPackage,lldpd))