3 # Define with/without/bcond_without macros (needed for RHEL4)
4 %define with
() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
5 %define without
() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
6 %define bcond_with
() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
7 %define bcond_without
() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
9 # Conditional build options, disable with "--without xxx"
15 %bcond_without lldpmed
21 # On RHEL < 5, disable SNMP, Net-SNMP installation seems broken
22 %if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 500 || 0%{?centos_version} > 0 && 0%{?centos_version} < 500
28 # On RHEL <= 6, compile with oldies
29 # For SuSE, SLE11 with a recent SP comes with 3.0. SLE12 comes with 3.12.
30 %if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700
36 # On RHEL < 7, disable systemd
37 # On SuSE < 12, disable systemd
38 %if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200
41 %bcond_without systemd
44 # On RHEL < 7, use embedded libevent
45 %if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200
46 %bcond_with system_libevent
48 %bcond_without system_libevent
51 # On RHEL < 6, use embedded libnl
52 %if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 600 || 0%{?centos_version} > 0 && 0%{?centos_version} < 600 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200
53 %bcond_with system_libnl
55 %bcond_without system_libnl
58 %define lldpd_user _lldpd
59 %define lldpd_group _lldpd
60 %define lldpd_chroot
/var
/run
/lldpd
62 Summary: Implementation of IEEE
802.1ab
(LLDP
)
67 Group: System
/Management
68 URL: http
://vincentbernat.github.com
/lldpd
/
69 Source0: http
://media.luffy.cx
/files
/lldpd
/%{name}-%{version}.tar.gz
70 Source1: lldpd.init
%{?suse_version:.suse}
71 Source2: lldpd.sysconfig
73 BuildRequires
: pkgconfig
74 %if %{with system_libevent}
75 BuildRequires
: libevent
-devel
77 %if %{with system_libnl}
78 BuildRequires
: libnl3
-devel
80 BuildRequires
: readline
-devel
82 BuildRequires
: net
-snmp
-devel
83 BuildRequires
: openssl
-devel
84 %{!?suse_version:BuildRequires: lm_sensors-devel}
87 BuildRequires
: libxml2
-devel
90 BuildRequires
: json
-c
-devel
93 Requires(post
): systemd
94 Requires(preun
): systemd
95 Requires(postun
): systemd
96 BuildRequires
: systemd
97 BuildRequires
: systemd
-units
100 PreReq
: %fillup_prereq %insserv_prereq pwdutils
102 Requires(pre
): /usr
/sbin
/groupadd
/usr
/sbin
/useradd
103 Requires(post
): chkconfig
104 Requires(preun
): chkconfig
105 Requires(preun
): initscripts
106 Requires(postun
): initscripts
109 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
112 This implementation provides LLDP sending and reception
, supports VLAN
113 and includes an SNMP subagent that can interface to an SNMP agent
114 through AgentX protocol.
116 LLDP is an industry standard protocol designed to supplant proprietary
117 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
118 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
119 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
120 to adjacent network devices.
122 This daemon is also able to deal with CDP
, FDP
, SONMP and EDP
123 protocol. It also handles LLDP
-MED extension.
126 Summary: Implementation of IEEE
802.1ab
- Tools and header files
for developers
127 Group: Development
/Libraries
/C
128 BuildRequires
: pkgconfig
129 Requires: lldpd
= %{version}-%{release}
132 This package is required to develop alternate clients
for lldpd.
134 LLDP is an industry standard protocol designed to supplant proprietary
135 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
136 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
137 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
138 to adjacent network devices.
195 --with
-privsep
-user
=%lldpd_user \
196 --with
-privsep
-group
=%lldpd_group \
197 --with
-privsep
-chroot
=%lldpd_chroot \
198 %if %{without systemd}
199 --with
-systemdsystemunitdir
=no \
201 --with
-sysusersdir
=no \
203 --localstatedir
=%{_localstatedir} \
204 --sysconfdir
=%{_sysconfdir} \
205 --libdir
=%{_libdir} \
206 --docdir
=%{_docdir}/lldpd
208 [ -f
%{_includedir}/net
-snmp
/agent
/struct.h
] || touch src
/struct.h
212 make install DESTDIR
=$RPM_BUILD_ROOT
213 %if %{without systemd}
214 install -d $RPM_BUILD_ROOT
/%{_initrddir}
215 install -m755
%{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/lldpd
217 %if 0%{?suse_version}
218 mkdir -p $
{RPM_BUILD_ROOT
}/var
/adm
/fillup
-templates
219 install -m700
%{SOURCE2} ${RPM_BUILD_ROOT}/var
/adm
/fillup
-templates
/sysconfig.lldpd
221 install -d $RPM_BUILD_ROOT
/etc
/sysconfig
222 install -m644
%{SOURCE2} $RPM_BUILD_ROOT
/etc
/sysconfig
/lldpd
226 # Create lldpd user/group
227 if getent group
%lldpd_group >/dev
/null
2>&1 ; then : ; else \
228 %{_sbindir}/groupadd
-r
%lldpd_group > /dev
/null
2>&1 ||
exit 1 ; fi
229 if getent passwd
%lldpd_user >/dev
/null
2>&1 ; then : ; else \
230 %{_sbindir}/useradd
-g
%lldpd_group -M
-r
-s
/sbin
/nologin \
231 -c "LLDP daemon"
-d
%lldpd_chroot %lldpd_user 2> /dev
/null \
234 %if 0%{?suse_version}
235 # Service management for SuSE
239 %{fillup_and_insserv lldpd}
242 %restart_on_update lldpd
245 %stop_on_removal lldpd
247 %elseif %{without systemd}
248 # Service management for Redhat/CentOS without systemd
252 /sbin
/chkconfig
--add lldpd
255 if [ "$
1"
-ge "
1"
]; then
256 /sbin
/service lldpd condrestart
>/dev
/null
2>&1 ||
:
259 if [ "$
1"
= "
0"
]; then
260 /sbin
/service lldpd stop
> /dev
/null
2>&1
261 /sbin
/chkconfig
--del lldpd
265 # Service management for Redhat/CentOS with systemd
269 %systemd_post lldpd.service
272 %systemd_preun lldpd.service
275 %systemd_postun_with_restart lldpd.service
281 rm -rf $RPM_BUILD_ROOT
284 %defattr(-,root
,root
,-)
285 %dir %{_docdir}/lldpd
286 %doc %{_docdir}/lldpd
/NEWS
287 %doc %{_docdir}/lldpd
/ChangeLog
288 %doc %{_docdir}/lldpd
/README.md
289 %doc %{_docdir}/lldpd
/CONTRIBUTE.md
293 %{_libdir}/liblldpctl.so.
*
295 %{_datadir}/bash
-completion
296 %doc %{_mandir}/man8
/lldp
*
297 %config %{_sysconfdir}/lldpd.d
298 %if %{without systemd}
299 %config %attr(755,root
,root
) %{_initrddir}/lldpd
301 %{_unitdir}/lldpd.service
303 %if 0%{?suse_version}
304 %attr(644,root
,root
) %{_var}/adm
/fillup
-templates
/sysconfig.lldpd
306 %config(noreplace
) %{_sysconfdir}/sysconfig
/lldpd
310 %defattr(-,root
,root
)
311 %{_libdir}/liblldpctl.so
312 %{_libdir}/liblldpctl.a
313 %{_libdir}/liblldpctl.la
314 %{_libdir}/pkgconfig
/lldpctl.pc
315 %{_includedir}/lldpctl.h
316 %{_includedir}/lldp
-const.h
319 * Sun Nov
22 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.8.0-1
320 - New upstream version.
321 - Use system libnl3 when possible.
322 - Use system libevent when possible.
324 * Wed Sep
09 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.17-1
325 - New upstream version.
327 * Fri Aug
07 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.16-1
328 - New upstream version.
330 * Wed May
20 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.15-1
331 - New upstream version.
333 * Sat Apr
04 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.14-1
334 - New upstream version.
336 * Tue Dec
30 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.13-1
337 - New upstream version.
339 * Sat Nov
22 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.12-1
340 - New upstream version.
341 - Completion
for bash and zsh.
343 * Wed Oct
08 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.11-1
344 - New upstream version.
345 - Completion
for bash and zsh.
347 * Mon Jul
21 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.10-1
348 - New upstream version.
350 * Wed May
28 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.9-1
351 - New upstream version.
353 * Sun Apr
13 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.8-1
354 - New upstream version.
356 * Sun Nov
10 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.7-1
357 - New upstream version.
359 * Fri Jul
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.6-1
360 - New upstream version.
362 * Sat Jun
22 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.5-1
363 - New upstream version.
365 * Sun May
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.3-1
366 - New upstream version.
368 * Fri Apr
19 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.2-1
369 - New upstream version.
371 * Sat Jan
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.1-1
372 - New upstream version.
374 * Sun Jan
06 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.0-1
375 - New upstream version.
376 - Requires readline
-devel.
379 * Thu Sep
27 2012 Vincent Bernat
<bernat@luffy.cx
> - 0.6.1-1
380 - New upstream version
381 - Do not require libevent
, use embedded copy.
382 - Provide a
-devel package.
384 * Fri Jun
11 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.1-1
385 - New upstream version
386 - Define bcond_without and with macros
if not defined to be compatible
388 - Requires useradd and groupadd
389 - Adapt to
make it work with SuSE
390 - Provide an init script targetted at SuSE
391 - Build require lm_sensors
-devel on RHEL
393 * Fri Mar
12 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.0-1
394 - New upstream version
397 * Tue May
19 2009 Vincent Bernat
<bernat@luffy.cx
> - 0.4.0-1
399 - Enable SNMP support
400 - Add _lldpd user creation
402 - New upstream version
404 * Mon May
18 2009 Dean Hamstead
<dean.hamstead@optusnet.com.au
> - 0.3.3-1