]> git.pld-linux.org Git - packages/lldpd.git/blob - lldpd.spec
Release 1
[packages/lldpd.git] / lldpd.spec
1 ## TODO:
2 # - separate package with client and daemon (possible?)
3
4 Summary:        Implementation of IEEE 802.1AB, EDP and CDP
5 Summary(pl.UTF-8):      Implementacja IEEE 802.1AB, EDP oraz CDP
6 Name:           lldpd
7 Version:        0.5.7
8 Release:        1
9 License:        MIT
10 Group:          Networking
11 Source0:        http://media.luffy.cx/files/lldpd/%{name}-%{version}.tar.gz
12 # Source0-md5:  3db3a80fa6a384cd59e9d6a42ce7b630
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 #Source3:       %{name}-lldpd.service
16 URL:            https://github.com/vincentbernat/lldpd/wiki
17 BuildRequires:  autoconf >= 1.5
18 BuildRequires:  automake
19 Requires(post,preun,postun):    systemd-units >= 38
20 Requires:       systemd-units >= 38
21 Conflicts:      openlldp
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 LLDP (Link Layer Discovery Protocol) (also known as 802.1ab) is an
26 industry standard protocol designed to supplant proprietary Link-Layer
27 protocols such as Extreme's EDP (Extreme Discovery Protocol) and CDP
28 (Cisco Discovery Protocol). The goal of LLDP is to provide an
29 inter-vendor compatible mechanism to deliver Link-Layer notifications
30 to adjacent network devices.
31
32 lldpd is a lldp daemon for GNU/Linux and implements both reception and
33 sending. It supports both LLDP and LLDP-MED (contributed by Michael
34 Hanig). It also implements an SNMP subagent for net-snmp to get local
35 and remote LLDP information. The LLDP MIB is partially implemented but
36 the most useful tables are here.
37
38 lldpd supports bridge, vlan and bonding. bonding need to be done on
39 real physical devices, not on bridges, vlans, etc. However, vlans can
40 be mapped on the bonding device. You can bridge vlan but not add vlans
41 on bridges. More complex setups may give false results.
42
43 %prep
44 %setup -q
45
46 %build
47 %configure \
48         --with-privsep-user=daemon \
49         --with-privsep-group=daemon \
50         --with-privsep-chroot=/usr/share/empty
51
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{systemdunitdir}} 
57
58 %{__make} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/lldpd
62 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lldpd
63 #install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/lldpd.service
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 /sbin/chkconfig --add lldpd
70 %service lldpd restart "LLDP Daemon"
71 #systemd_post lldpd.service
72
73 %preun
74 if [ "$1" = "0" ]; then
75         %service lldpd stop
76         /sbin/chkconfig --del lldpd
77 fi
78 %systemd_preun lldpd.service
79
80 %postun
81 %systemd_reload
82
83 %triggerpostun -- lldpd < 0.4
84 %systemd_trigger lldpd.service
85
86 %files
87 %defattr(644,root,root,755)
88 %doc CHANGELOG README.md
89 %attr(754,root,root) /etc/rc.d/init.d/lldpd
90 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lldpd
91 #%{systemdunitdir}/lldpd.service
92 %attr(755,root,root) %{_sbindir}/lldpd
93 %attr(755,root,root) %{_sbindir}/lldpctl
94 %{_mandir}/man8/lldpd.8*
95 %{_mandir}/man8/lldpctl.8*
96
This page took 0.106193 seconds and 3 git commands to generate.