-
Notifications
You must be signed in to change notification settings - Fork 43
/
lldpad.spec.in
107 lines (86 loc) · 2.49 KB
/
lldpad.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Name: lldpad
Version: @VERSION@
Release: 1%{?dist}
Summary: Intel LLDP Agent
Group: System Environment/Daemons
License: GPLv2
URL: http://e1000.sourceforge.net
Source0: http://downloads.sourceforge.net/e1000/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# BuildRequires:
Requires(post): @SPEC_BUILD_REQUIRES_POST@
Requires(preun): @SPEC_BUILD_REQUIRES_PREUN@
Requires(postun): @SPEC_BUILD_REQUIRES_POSTUN@
%description
This package contains the Linux user space daemon and configuration tool for
Intel LLDP Agent with Enhanced Ethernet support for the Data Center.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains header files for developing applications
that use %{name}.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ -e /etc/init.d/%{name} ] && [ -e /sbin/chkconfig ]; then
/sbin/chkconfig --add %{name}
fi
if type systemctl >/dev/null 2>&1; then
# Scriplet only runs preset. Run enable/start manually
%systemd_post %{name}.socket %{name}.service
fi
%preun
if [ $1 = 0 ]; then
if [ -e /etc/init.d/%{name} ] && [ -e /sbin/chkconfig ]; then
/sbin/service %{name} stop
/sbin/chkconfig --del %{name}
fi
if type systemctl >/dev/null 2>&1; then
%systemd_preun %{name}.service %{name}.socket
fi
fi
%postun
if [ $1 = 1 ]; then
# Package upgrade, not uninstall
if [ -e /etc/init.d/%{name} ] && [ -e /sbin/chkconfig ]; then
/sbin/service %{name} condrestart
fi
if type systemctl >/dev/null 2>&1; then
%systemd_postun_with_restart %{name}.socket %{name}.service
fi
fi
%files
%defattr(-,root,root,-)
%doc COPYING
%doc README
%doc ChangeLog
%{_sbindir}/*
%dir /var/lib/lldpad
@SPEC_FILE_LLDPAD_SERVICE@
@SPEC_FILE_LLDPAD_SOCKET@
%{_sysconfdir}/bash_completion.d/lldpad
%{_sysconfdir}/bash_completion.d/lldptool
%{_mandir}/man8/*
%{_libdir}/liblldp_clif.*
%{_mandir}/man3/liblldp_clif-vdp22.*
%files devel
%defattr(-,root,root,-)
%doc COPYING
%doc README
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
%changelog
* Mon Feb 22 2010 John Fastabend <[email protected]> - 0.9.22
- initial generic lldp support
* Thu Feb 26 2009 Chris Leech <[email protected]> - 0.9.5-1
- initial RPM packaging