1 # This .spec file is targeted for SuSE OBS. It relies on macro that
2 # are not available on regular distributions. If you use directly
3 # rpmbuild, be sure to use something like `--define 'rhel_version
6 # Conditional build options, disable with "--without xxx"
12 %bcond_without lldpmed
19 # On RHEL <= 6, compile with oldies
20 # For SuSE, SLE11 with a recent SP comes with 3.0. SLE12 comes with 3.12.
21 %if (0%{?rhel_version} > 0 && 0%{?rhel_version} < 700) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700)
27 # On RHEL < 7, disable systemd
28 # On SuSE < 12, disable systemd
29 %if (0%{?rhel_version} > 0 && 0%{?rhel_version} < 700) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700) || (0%{?suse_version} > 0 && 0%{?suse_version} < 1210)
32 %bcond_without systemd
35 # On RHEL < 7, use embedded libevent
36 %if (0%{?rhel_version} > 0) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700) || (0%{?suse_version} > 0 && 0%{?suse_version} < 1200)
37 %bcond_with system_libevent
39 %bcond_without system_libevent
42 %define lldpd_user _lldpd
43 %define lldpd_group _lldpd
44 %define lldpd_chroot
/var
/run
/lldpd
46 Summary: Implementation of IEEE
802.1ab
(LLDP
)
51 Group: System
/Management
52 URL: http
://vincentbernat.github.com
/lldpd
/
53 Source0: http
://media.luffy.cx
/files
/lldpd
/%{name}-%{version}.tar.gz
54 Source1: lldpd.init
%{?suse_version:.suse}
55 Source2: lldpd.sysconfig
57 BuildRequires
: pkgconfig
58 %if %{with system_libevent}
59 BuildRequires
: libevent
-devel
61 BuildRequires
: readline
-devel
63 BuildRequires
: net
-snmp
-devel
64 BuildRequires
: openssl
-devel
65 %{!?suse_version:BuildRequires: lm_sensors-devel}
68 BuildRequires
: libxml2
-devel
71 BuildRequires
: json
-c
-devel
75 BuildRequires
: systemd
-rpm
-macros
78 Requires(post
): systemd
79 Requires(preun
): systemd
80 Requires(postun
): systemd
81 BuildRequires
: systemd
-units
85 PreReq
: %fillup_prereq %insserv_prereq pwdutils
87 Requires(pre
): /usr
/sbin
/groupadd
/usr
/sbin
/useradd
88 Requires(post
): chkconfig
89 Requires(preun
): chkconfig
90 Requires(preun
): initscripts
91 Requires(postun
): initscripts
94 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
97 This implementation provides LLDP sending and reception
, supports VLAN
98 and includes an SNMP subagent that can interface to an SNMP agent
99 through AgentX protocol.
101 LLDP is an industry standard protocol designed to supplant proprietary
102 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
103 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
104 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
105 to adjacent network devices.
107 This daemon is also able to deal with CDP
, FDP
, SONMP and EDP
108 protocol. It also handles LLDP
-MED extension.
111 Summary: Implementation of IEEE
802.1ab
- Tools and header files
for developers
112 Group: Development
/Libraries
/C
113 BuildRequires
: pkgconfig
114 Requires: lldpd
= %{version}-%{release}
117 This package is required to develop alternate clients
for lldpd.
119 LLDP is an industry standard protocol designed to supplant proprietary
120 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
121 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
122 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
123 to adjacent network devices.
180 --with
-privsep
-user
=%lldpd_user \
181 --with
-privsep
-group
=%lldpd_group \
182 --with
-privsep
-chroot
=%lldpd_chroot \
183 %if %{without systemd}
184 --with
-systemdsystemunitdir
=no \
186 --with
-systemdsystemunitdir
=%{_unitdir} \
188 --with
-sysusersdir
=no \
190 --localstatedir
=%{_localstatedir} \
191 --sysconfdir
=%{_sysconfdir} \
192 --libdir
=%{_libdir} \
193 --docdir
=%{_docdir}/lldpd \
196 [ -f
%{_includedir}/net
-snmp
/agent
/struct.h
] || touch src
/struct.h
200 make install DESTDIR
=$RPM_BUILD_ROOT
201 %if %{without systemd}
202 install -d $RPM_BUILD_ROOT
/%{_initrddir}
203 install -m755
%{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/lldpd
205 %if 0%{?suse_version}
206 mkdir -p $
{RPM_BUILD_ROOT
}/var
/adm
/fillup
-templates
207 install -m700
%{SOURCE2} ${RPM_BUILD_ROOT}/var
/adm
/fillup
-templates
/sysconfig.lldpd
209 install -d $RPM_BUILD_ROOT
/etc
/sysconfig
210 install -m644
%{SOURCE2} $RPM_BUILD_ROOT
/etc
/sysconfig
/lldpd
214 # Create lldpd user/group
215 if getent group
%lldpd_group >/dev
/null
2>&1 ; then : ; else \
216 %{_sbindir}/groupadd
-r
%lldpd_group > /dev
/null
2>&1 ||
exit 1 ; fi
217 if getent passwd
%lldpd_user >/dev
/null
2>&1 ; then : ; else \
218 %{_sbindir}/useradd
-g
%lldpd_group -M
-r
-s
/sbin
/nologin \
219 -c "LLDP daemon"
-d
%lldpd_chroot %lldpd_user 2> /dev
/null \
221 %if 0%{?suse_version} >= 1210 && %{with systemd}
222 %service_add_pre lldpd.service
225 %if 0%{?suse_version}
226 # Service management for SuSE
228 %if 0%{?suse_version} >= 1210 && %{with systemd}
230 %service_add_post lldpd.service
232 %service_del_preun lldpd.service
234 %service_del_postun lldpd.service
238 %{fillup_and_insserv lldpd}
241 %restart_on_update lldpd
244 %stop_on_removal lldpd
248 %if %{without systemd}
249 # Service management for Redhat/CentOS without systemd
253 /sbin
/chkconfig
--add lldpd
256 if [ "$
1"
-ge "
1"
]; then
257 /sbin
/service lldpd condrestart
>/dev
/null
2>&1 ||
:
260 if [ "$
1"
= "
0"
]; then
261 /sbin
/service lldpd stop
> /dev
/null
2>&1
262 /sbin
/chkconfig
--del lldpd
266 # Service management for Redhat/CentOS with systemd
270 %systemd_post lldpd.service
273 %systemd_preun lldpd.service
276 %systemd_postun_with_restart lldpd.service
283 rm -rf $RPM_BUILD_ROOT
286 %defattr(-,root
,root
,-)
287 %dir %{_docdir}/lldpd
288 %doc %{_docdir}/lldpd
/NEWS
289 %doc %{_docdir}/lldpd
/ChangeLog
290 %doc %{_docdir}/lldpd
/README.md
291 %doc %{_docdir}/lldpd
/CONTRIBUTE.md
295 %{_libdir}/liblldpctl.so.
*
297 %{_datadir}/bash
-completion
298 %doc %{_mandir}/man8
/lldp
*
299 %config %{_sysconfdir}/lldpd.d
300 %if %{without systemd}
301 %config %attr(755,root
,root
) %{_initrddir}/lldpd
303 %{_unitdir}/lldpd.service
305 %if 0%{?suse_version}
306 %attr(644,root
,root
) %{_var}/adm
/fillup
-templates
/sysconfig.lldpd
308 %config(noreplace
) %{_sysconfdir}/sysconfig
/lldpd
312 %defattr(-,root
,root
)
313 %{_libdir}/liblldpctl.so
314 %{_libdir}/liblldpctl.a
315 %{_libdir}/liblldpctl.la
316 %{_libdir}/pkgconfig
/lldpctl.pc
317 %{_includedir}/lldpctl.h
318 %{_includedir}/lldp
-const.h
321 * Sat May
21 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.3-1
322 - New upstream version.
324 * Sat Mar
19 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.2-1
325 - New upstream version.
327 * Sat Feb
20 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.1-1
328 - New upstream version.
330 * Fri Jan
01 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.0-1
331 - New upstream version.
332 - Do not rely on libnl3.
334 * Sun Dec
27 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.8.0-1
335 - New upstream version.
336 - Use system libnl3 when possible.
337 - Use system libevent when possible.
339 * Wed Sep
09 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.17-1
340 - New upstream version.
342 * Fri Aug
07 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.16-1
343 - New upstream version.
345 * Wed May
20 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.15-1
346 - New upstream version.
348 * Sat Apr
04 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.14-1
349 - New upstream version.
351 * Tue Dec
30 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.13-1
352 - New upstream version.
354 * Sat Nov
22 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.12-1
355 - New upstream version.
356 - Completion
for bash and zsh.
358 * Wed Oct
08 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.11-1
359 - New upstream version.
360 - Completion
for bash and zsh.
362 * Mon Jul
21 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.10-1
363 - New upstream version.
365 * Wed May
28 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.9-1
366 - New upstream version.
368 * Sun Apr
13 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.8-1
369 - New upstream version.
371 * Sun Nov
10 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.7-1
372 - New upstream version.
374 * Fri Jul
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.6-1
375 - New upstream version.
377 * Sat Jun
22 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.5-1
378 - New upstream version.
380 * Sun May
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.3-1
381 - New upstream version.
383 * Fri Apr
19 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.2-1
384 - New upstream version.
386 * Sat Jan
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.1-1
387 - New upstream version.
389 * Sun Jan
06 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.0-1
390 - New upstream version.
391 - Requires readline
-devel.
394 * Thu Sep
27 2012 Vincent Bernat
<bernat@luffy.cx
> - 0.6.1-1
395 - New upstream version
396 - Do not require libevent
, use embedded copy.
397 - Provide a
-devel package.
399 * Fri Jun
11 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.1-1
400 - New upstream version
401 - Define bcond_without and with macros
if not defined to be compatible
403 - Requires useradd and groupadd
404 - Adapt to
make it work with SuSE
405 - Provide an init script targetted at SuSE
406 - Build require lm_sensors
-devel on RHEL
408 * Fri Mar
12 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.0-1
409 - New upstream version
412 * Tue May
19 2009 Vincent Bernat
<bernat@luffy.cx
> - 0.4.0-1
414 - Enable SNMP support
415 - Add _lldpd user creation
417 - New upstream version
419 * Mon May
18 2009 Dean Hamstead
<dean.hamstead@optusnet.com.au
> - 0.3.3-1