diff --git a/lldpad.spec b/lldpad.spec new file mode 100644 index 0000000000000000000000000000000000000000..2bf4c7e2b16e6908948a3720e9a7056bb5c048d5 --- /dev/null +++ b/lldpad.spec @@ -0,0 +1,85 @@ +%define anolis_release 1 +%global _default_patch_fuzz 2 + +%global _hardened_build 1 + +Name: lldpad +Version: 1.1 +Release: %{anolis_release}%{?dist} +Summary: Intel LLDP Agent +License: GPLv2 +URL: http://open-lldp.org/ +Source0: https://github.com/intel/openlldp/archive/refs/tags/v%{version}.tar.gz + +BuildRequires: automake autoconf libtool +BuildRequires: flex >= 2.5.33 +BuildRequires: kernel-headers >= 2.6.32 +BuildRequires: libconfig-devel >= 1.3.2 +BuildRequires: libnl3-devel +BuildRequires: readline-devel +BuildRequires: systemd +BuildRequires: make +Requires: readline + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%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} +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: dcbd-devel = %{version}-%{release} +Obsoletes: dcbd-devel < 0.9.26 + +%description devel +The %{name}-devel package contains header files for developing applications +that use %{name}. + +%prep +%autosetup -p1 -n openlldp-%{version} + +%build +./bootstrap.sh +CFLAGS=${CFLAGS:-%optflags -Wno-error -fcommon}; export CFLAGS; +%configure --disable-static +# fix the hardened build flags +sed -i -e 's! \\\$compiler_flags !&\\\$CFLAGS \\\$LDFLAGS !' libtool +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}%{_sharedstatedir}/%{name} +rm -f %{buildroot}%{_libdir}/liblldp_clif.la + +%post +%systemd_post %{name}.service %{name}.socket + +%preun +%systemd_preun %{name}.service %{name}.socket + +%postun +%systemd_postun_with_restart %{name}.service %{name}.socket + +%files +%doc COPYING README ChangeLog +%{_sbindir}/* +%{_libdir}/liblldp_clif.so.* +%dir %{_sharedstatedir}/%{name} +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}.socket +%{_sysconfdir}/bash_completion.d/* +%{_mandir}/man3/* +%{_mandir}/man8/* + +%files devel +%{_includedir}/* +%{_libdir}/pkgconfig/*.pc +%{_libdir}/liblldp_clif.so + +%changelog +* Wed Apr 13 2022 Chunmei Xu - 1.1-1 +- init from upstream diff --git a/v1.1.tar.gz b/v1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..996709a5c9e81a5fe7982754a2716b8536c11797 Binary files /dev/null and b/v1.1.tar.gz differ