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
18 # On RHEL <= 6, compile with oldies
19 # For SuSE, SLE11 with a recent SP comes with 3.0. SLE12 comes with 3.12.
20 %if (0%{?rhel_version} > 0 && 0%{?rhel_version} < 700) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700)
26 # On RHEL < 7, disable systemd
27 # On SuSE < 12, disable systemd
28 %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)
31 %bcond_without systemd
34 # On RHEL < 7, use embedded libevent
35 %if (0%{?rhel_version} > 0) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700) || (0%{?suse_version} > 0 && 0%{?suse_version} < 1200)
36 %bcond_with system_libevent
38 %bcond_without system_libevent
41 %define lldpd_user _lldpd
42 %define lldpd_group _lldpd
43 %define lldpd_chroot
/var
/run
/lldpd
45 Summary: Implementation of IEEE
802.1ab
(LLDP
)
50 Group: System
/Management
51 URL: http
://vincentbernat.github.com
/lldpd
/
52 Source0: http
://media.luffy.cx
/files
/lldpd
/%{name}-%{version}.tar.gz
53 Source1: lldpd.init
%{?suse_version:.suse}
54 Source2: lldpd.sysconfig
56 BuildRequires
: pkgconfig
57 %if %{with system_libevent}
58 BuildRequires
: libevent
-devel
60 BuildRequires
: readline
-devel
62 BuildRequires
: net
-snmp
-devel
63 BuildRequires
: openssl
-devel
64 %{!?suse_version:BuildRequires: lm_sensors-devel}
67 BuildRequires
: libxml2
-devel
71 BuildRequires
: systemd
-rpm
-macros
74 Requires(post
): systemd
75 Requires(preun
): systemd
76 Requires(postun
): systemd
77 BuildRequires
: systemd
-units
81 PreReq
: %fillup_prereq %insserv_prereq pwdutils
83 Requires(pre
): /usr
/sbin
/groupadd
/usr
/sbin
/useradd
84 Requires(post
): chkconfig
85 Requires(preun
): chkconfig
86 Requires(preun
): initscripts
87 Requires(postun
): initscripts
90 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
93 This implementation provides LLDP sending and reception
, supports VLAN
94 and includes an SNMP subagent that can interface to an SNMP agent
95 through AgentX protocol.
97 LLDP is an industry standard protocol designed to supplant proprietary
98 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
99 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
100 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
101 to adjacent network devices.
103 This daemon is also able to deal with CDP
, FDP
, SONMP and EDP
104 protocol. It also handles LLDP
-MED extension.
107 Summary: Implementation of IEEE
802.1ab
- Tools and header files
for developers
108 Group: Development
/Libraries
/C
109 BuildRequires
: pkgconfig
110 Requires: lldpd
= %{version}-%{release}
113 This package is required to develop alternate clients
for lldpd.
115 LLDP is an industry standard protocol designed to supplant proprietary
116 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
117 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
118 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
119 to adjacent network devices.
176 --with
-privsep
-user
=%lldpd_user \
177 --with
-privsep
-group
=%lldpd_group \
178 --with
-privsep
-chroot
=%lldpd_chroot \
179 %if %{without systemd}
180 --with
-systemdsystemunitdir
=no \
182 --with
-systemdsystemunitdir
=%{_unitdir} \
184 --with
-sysusersdir
=no \
186 --localstatedir
=%{_localstatedir} \
187 --sysconfdir
=%{_sysconfdir} \
188 --libdir
=%{_libdir} \
189 --docdir
=%{_docdir}/lldpd \
192 [ -f
%{_includedir}/net
-snmp
/agent
/struct.h
] || touch src
/struct.h
196 make install DESTDIR
=$RPM_BUILD_ROOT
197 %if %{without systemd}
198 install -d $RPM_BUILD_ROOT
/%{_initrddir}
199 install -m755
%{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/lldpd
201 %if 0%{?suse_version}
202 mkdir -p $
{RPM_BUILD_ROOT
}/var
/adm
/fillup
-templates
203 install -m700
%{SOURCE2} ${RPM_BUILD_ROOT}/var
/adm
/fillup
-templates
/sysconfig.lldpd
205 install -d $RPM_BUILD_ROOT
/etc
/sysconfig
206 install -m644
%{SOURCE2} $RPM_BUILD_ROOT
/etc
/sysconfig
/lldpd
210 # Create lldpd user/group
211 if getent group
%lldpd_group >/dev
/null
2>&1 ; then : ; else \
212 %{_sbindir}/groupadd
-r
%lldpd_group > /dev
/null
2>&1 ||
exit 1 ; fi
213 if getent passwd
%lldpd_user >/dev
/null
2>&1 ; then : ; else \
214 %{_sbindir}/useradd
-g
%lldpd_group -M
-r
-s
/sbin
/nologin \
215 -c "LLDP daemon"
-d
%lldpd_chroot %lldpd_user 2> /dev
/null \
217 %if 0%{?suse_version} >= 1210 && %{with systemd}
218 %service_add_pre lldpd.service
221 %if 0%{?suse_version}
222 # Service management for SuSE
224 %if 0%{?suse_version} >= 1210 && %{with systemd}
226 %service_add_post lldpd.service
229 %service_del_preun lldpd.service
231 %service_del_postun lldpd.service
235 %{fillup_and_insserv lldpd}
238 %restart_on_update lldpd
241 %stop_on_removal lldpd
245 %if %{without systemd}
246 # Service management for Redhat/CentOS without systemd
250 /sbin
/chkconfig
--add lldpd
253 if [ "$
1"
-ge "
1"
]; then
254 /sbin
/service lldpd condrestart
>/dev
/null
2>&1 ||
:
257 if [ "$
1"
= "
0"
]; then
258 /sbin
/service lldpd stop
> /dev
/null
2>&1
259 /sbin
/chkconfig
--del lldpd
263 # Service management for Redhat/CentOS with systemd
267 %systemd_post lldpd.service
270 %systemd_preun lldpd.service
273 %systemd_postun_with_restart lldpd.service
280 rm -rf $RPM_BUILD_ROOT
283 %defattr(-,root
,root
,-)
284 %dir %{_docdir}/lldpd
285 %doc %{_docdir}/lldpd
/NEWS
286 %doc %{_docdir}/lldpd
/LICENSE
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 * Sat Jan
21 2017 Vincent Bernat
<bernat@luffy.cx
> - 0.9.6-1
320 - New upstream version.
322 * Fri Sep
30 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.5-1
323 - New upstream version.
325 * Fri Jun
17 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.4-1
326 - New upstream version.
328 * Sat May
21 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.3-1
329 - New upstream version.
331 * Sat Mar
19 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.2-1
332 - New upstream version.
334 * Sat Feb
20 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.1-1
335 - New upstream version.
337 * Fri Jan
01 2016 Vincent Bernat
<bernat@luffy.cx
> - 0.9.0-1
338 - New upstream version.
339 - Do not rely on libnl3.
341 * Sun Dec
27 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.8.0-1
342 - New upstream version.
343 - Use system libnl3 when possible.
344 - Use system libevent when possible.
346 * Wed Sep
09 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.17-1
347 - New upstream version.
349 * Fri Aug
07 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.16-1
350 - New upstream version.
352 * Wed May
20 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.15-1
353 - New upstream version.
355 * Sat Apr
04 2015 Vincent Bernat
<bernat@luffy.cx
> - 0.7.14-1
356 - New upstream version.
358 * Tue Dec
30 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.13-1
359 - New upstream version.
361 * Sat Nov
22 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.12-1
362 - New upstream version.
363 - Completion
for bash and zsh.
365 * Wed Oct
08 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.11-1
366 - New upstream version.
367 - Completion
for bash and zsh.
369 * Mon Jul
21 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.10-1
370 - New upstream version.
372 * Wed May
28 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.9-1
373 - New upstream version.
375 * Sun Apr
13 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.8-1
376 - New upstream version.
378 * Sun Nov
10 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.7-1
379 - New upstream version.
381 * Fri Jul
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.6-1
382 - New upstream version.
384 * Sat Jun
22 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.5-1
385 - New upstream version.
387 * Sun May
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.3-1
388 - New upstream version.
390 * Fri Apr
19 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.2-1
391 - New upstream version.
393 * Sat Jan
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.1-1
394 - New upstream version.
396 * Sun Jan
06 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.0-1
397 - New upstream version.
398 - Requires readline
-devel.
401 * Thu Sep
27 2012 Vincent Bernat
<bernat@luffy.cx
> - 0.6.1-1
402 - New upstream version
403 - Do not require libevent
, use embedded copy.
404 - Provide a
-devel package.
406 * Fri Jun
11 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.1-1
407 - New upstream version
408 - Define bcond_without and with macros
if not defined to be compatible
410 - Requires useradd and groupadd
411 - Adapt to
make it work with SuSE
412 - Provide an init script targetted at SuSE
413 - Build require lm_sensors
-devel on RHEL
415 * Fri Mar
12 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.0-1
416 - New upstream version
419 * Tue May
19 2009 Vincent Bernat
<bernat@luffy.cx
> - 0.4.0-1
421 - Enable SNMP support
422 - Add _lldpd user creation
424 - New upstream version
426 * Mon May
18 2009 Dean Hamstead
<dean.hamstead@optusnet.com.au
> - 0.3.3-1