3 # Define with/without/bcond_without macros (needed for RHEL4)
4 %define with
() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
5 %define bcond_without
() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
6 %define bcond_with
() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
8 # Conditional build options, disable with "--without xxx"
14 %bcond_without lldpmed
18 # On RHEL < 5, disable SNMP, Net-SNMP installation seems broken
19 %if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 500 || 0%{?centos_version} > 0 && 0%{?centos_version} < 500
25 %define lldpd_user _lldpd
26 %define lldpd_group _lldpd
27 %define lldpd_chroot
/var
/run
/lldpd
29 Summary: Implementation of IEEE
802.1ab
(LLDP
)
34 Group: System Environment
/Daemons
35 URL: http
://vincentbernat.github.com
/lldpd
/
36 Source0: http
://media.luffy.cx
/files
/lldpd
/%{name}-%{version}.tar.gz
37 Source1: lldpd.init
%{?suse_version:.suse}
38 Source2: lldpd.sysconfig
40 BuildRequires
: pkgconfig
41 BuildRequires
: readline
-devel
43 BuildRequires
: net
-snmp
-devel
44 BuildRequires
: openssl
-devel
45 %{!?suse_version:BuildRequires: lm_sensors-devel}
48 BuildRequires
: libxml2
-devel
51 PreReq
: %fillup_prereq %insserv_prereq pwdutils
53 Requires(pre
): /usr
/sbin
/groupadd
/usr
/sbin
/useradd
54 Requires(post
): chkconfig
55 Requires(preun
): chkconfig
56 Requires(preun
): initscripts
57 Requires(postun
): initscripts
60 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
63 This implementation provides LLDP sending and reception
, supports VLAN
64 and includes an SNMP subagent that can interface to an SNMP agent
65 through AgentX protocol.
67 LLDP is an industry standard protocol designed to supplant proprietary
68 Link
-Layer protocols such as Extreme EDP
(Extreme Discovery Protocol
)
69 and CDP
(Cisco Discovery Protocol
). The goal of LLDP is to provide an
70 inter
-vendor compatible mechanism to deliver Link
-Layer notifications
71 to adjacent network devices.
73 This daemon is also able to deal with CDP
, FDP
, SONMP and EDP
74 protocol. It also handles LLDP
-MED extension.
77 Summary: Implementation of IEEE
802.1ab
- Tools and header files
for developers
78 Group: Development
/Libraries
79 Requires: lldpd
= %{version}-%{release}
82 This package is required to develop alternate clients
for lldpd.
129 --with
-privsep
-user
=%lldpd_user \
130 --with
-privsep
-group
=%lldpd_group \
131 --with
-privsep
-chroot
=%lldpd_chroot \
132 --with
-systemdsystemunitdir
=no \
133 --with
-sysusersdir
=no \
135 --localstatedir
=%{_localstatedir} \
136 --sysconfdir
=%{_sysconfdir} \
137 --libdir
=%{_libdir} \
138 --docdir
=%{_docdir}/lldpd
140 [ -f
%{_includedir}/net
-snmp
/agent
/struct.h
] || touch src
/struct.h
144 make install DESTDIR
=$RPM_BUILD_ROOT
145 install -d
-m770 $RPM_BUILD_ROOT
/%lldpd_chroot
146 install -d $RPM_BUILD_ROOT
/%{_initrddir}
147 install -m755
%{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/lldpd
148 %if 0%{?suse_version}
149 mkdir -p $
{RPM_BUILD_ROOT
}/var
/adm
/fillup
-templates
150 install -m700
%{SOURCE2} ${RPM_BUILD_ROOT}/var
/adm
/fillup
-templates
/sysconfig.lldpd
152 install -d $RPM_BUILD_ROOT
/etc
/sysconfig
153 install -m644
%{SOURCE2} $RPM_BUILD_ROOT
/etc
/sysconfig
/lldpd
157 # Create lldpd user/group
158 if getent group
%lldpd_group >/dev
/null
2>&1 ; then : ; else \
159 %{_sbindir}/groupadd
-r
%lldpd_group > /dev
/null
2>&1 ||
exit 1 ; fi
160 if getent passwd
%lldpd_user >/dev
/null
2>&1 ; then : ; else \
161 %{_sbindir}/useradd
-g
%lldpd_group -M
-r
-s
/bin
/false \
162 -c "LLDP daemon"
-d
%lldpd_chroot %lldpd_user 2> /dev
/null \
165 %if 0%{?suse_version}
166 # Service management for SuSE
170 %{fillup_and_insserv lldpd}
173 %restart_on_update lldpd
176 %stop_on_removal lldpd
179 # Service management for Redhat/Centos
183 /sbin
/chkconfig
--add lldpd
186 if [ "$
1"
-ge "
1"
]; then
187 /sbin
/service lldpd condrestart
>/dev
/null
2>&1 ||
:
190 if [ "$
1"
= "
0"
]; then
191 /sbin
/service lldpd stop
> /dev
/null
2>&1
192 /sbin
/chkconfig
--del lldpd
198 rm -rf $RPM_BUILD_ROOT
201 %defattr(-,root
,root
,-)
202 %dir %{_docdir}/lldpd
203 %doc %{_docdir}/lldpd
/NEWS
204 %doc %{_docdir}/lldpd
/ChangeLog
205 %doc %{_docdir}/lldpd
/README.md
206 %doc %{_docdir}/lldpd
/CONTRIBUTE.md
210 %{_libdir}/liblldpctl.so.
*
212 %{_sysconfdir}/bash_completion.d
213 %doc %{_mandir}/man8
/lldp
*
214 %dir %attr(750,root
,root
) %lldpd_chroot
215 %config %{_sysconfdir}/lldpd.d
216 %config %attr(755,root
,root
) %{_initrddir}/lldpd
217 %if 0%{?suse_version}
218 %attr(644,root
,root
) %{_var}/adm
/fillup
-templates
/sysconfig.lldpd
220 %config(noreplace
) %{_sysconfdir}/sysconfig
/lldpd
224 %defattr(-,root
,root
)
225 %{_libdir}/liblldpctl.so
226 %{_libdir}/liblldpctl.a
227 %{_libdir}/liblldpctl.la
228 %{_libdir}/pkgconfig
/lldpctl.pc
229 %{_includedir}/lldpctl.h
230 %{_includedir}/lldp
-const.h
233 * Wed Oct
08 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.11-1
234 - New upstream version.
235 - Completion
for bash and zsh.
237 * Mon Jul
21 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.10-1
238 - New upstream version.
240 * Wed May
28 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.9-1
241 - New upstream version.
243 * Sun Apr
13 2014 Vincent Bernat
<bernat@luffy.cx
> - 0.7.8-1
244 - New upstream version.
246 * Fri Nov
10 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.7-1
247 - New upstream version.
249 * Fri Jul
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.6-1
250 - New upstream version.
252 * Sat Jun
22 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.5-1
253 - New upstream version.
255 * Sun May
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.3-1
256 - New upstream version.
258 * Fri Apr
19 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.2-1
259 - New upstream version.
261 * Sat Jan
12 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.1-1
262 - New upstream version.
264 * Sun Jan
06 2013 Vincent Bernat
<bernat@luffy.cx
> - 0.7.0-1
265 - New upstream version.
266 - Requires readline
-devel.
269 * Wed Sep
27 2012 Vincent Bernat
<bernat@luffy.cx
> - 0.6.1-1
270 - New upstream version
271 - Do not require libevent
, use embedded copy.
272 - Provide a
-devel package.
274 * Fri Jun
11 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.1-1
275 - New upstream version
276 - Define bcond_without and with macros
if not defined to be compatible
278 - Requires useradd and groupadd
279 - Adapt to
make it work with SuSE
280 - Provide an init script targetted at SuSE
281 - Build require lm_sensors
-devel on RHEL
283 * Fri Mar
12 2010 Vincent Bernat
<bernat@luffy.cx
> - 0.5.0-1
284 - New upstream version
287 * Tue May
19 2009 Vincent Bernat
<bernat@luffy.cx
> - 0.4.0-1
289 - Enable SNMP support
290 - Add _lldpd user creation
292 - New upstream version
294 * Mon May
18 2009 Dean Hamstead
<dean.hamstead@optusnet.com.au
> - 0.3.3-1