upstream requested we use the 'official' release tarball which removes the need for autoconf

This commit is contained in:
James Hogarth 2017-04-05 22:49:06 +01:00
parent 13ff48255a
commit 7fc6e678ea
2 changed files with 15 additions and 23 deletions

8
lldpd-fedora.sysconfig Normal file
View File

@ -0,0 +1,8 @@
## Path: Network/Discovery
## Description: lldpd configuration
## Type: string(-x,-c,-s,-e,-f)
## Default: ""
## ServiceRestart: lldpd
# Parameters for lldpd. See the manual page for the
# accepted parameters.
LLDPD_OPTIONS=""

View File

@ -7,28 +7,16 @@
Name: lldpd
Version: 0.9.7
Release: 2%{?dist}
Release: 3%{?dist}
Summary: ISC-licensed implementation of LLDP
License: ISC
URL: https://%{gh_owner}.github.io/%{name}/
Source0: https://github.com/%{gh_owner}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://media.luffy.cx/files/lldpd/lldpd-%{version}.tar.gz
Source1: %{name}-fedora.service
Source2: %{name}-tmpfiles
Source3: %{name}-fedora.sysconfig
%if 0%{?with_tests}
#For tests
BuildRequires: python3-apipkg
BuildRequires: python3-execnet
BuildRequires: python3-py
BuildRequires: python3-pyroute2
BuildRequires: python3-pytest
BuildRequires: python3-pytest-xdist
BuildRequires: python3-wheel
BuildRequires: python3-devel
%endif
BuildRequires: libtool
BuildRequires: libevent-devel
BuildRequires: readline-devel
BuildRequires: check-devel
@ -59,7 +47,6 @@ Summary: %{summary}
%build
./autogen.sh
%configure --disable-static --with-snmp --disable-silent-rules \
--with-systemdsystemunitdir=%{_unitdir} --with-sysusersdir=no \
--with-privsep-user=%{name} --with-privsep-group=%{name} \
@ -72,9 +59,9 @@ make %{?_smp_mflags}
%install
%make_install
install -p -D -m644 redhat/%{name}.sysconfig %{buildroot}/etc/sysconfig/%{name}
install -p -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -p -D -m644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -p -D -m644 %{SOURCE3} %{buildroot}/etc/sysconfig/%{name}
install -d -D -m 0755 %{buildroot}/run/%{name}/chroot
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name}
# remove the docs from buildroot
@ -88,12 +75,6 @@ rm -f %{buildroot}/usr/share/zsh/vendor-completions/_lldpcli
# remove static libtool archive
rm -f %{buildroot}%{_libdir}/liblldpctl.la
%check
%if 0%{?with_tests}
cd tests/integration
%{__python3} -m pytest -n 5 -vv --boxed
%endif
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
@ -139,6 +120,9 @@ exit 0
%changelog
* Wed Apr 05 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-3
- Use the official release tarball rather than the github snapshot
* Wed Apr 05 2017 James Hogarth <james.hogarth@gmail.com> - 0.9.7-2
- Tweaks to spec requested in review