%global common_desc \
Dibbler is a portable DHCPv6 implementation. It supports stateful (i.e. IPv6 \
address granting and IPv6 prefix delegation) as well as stateless (i.e. option \
granting) autoconfiguration for IPv6.
%if 0%{?rhel} < 7 && 0%{?rhel} > 0
%global _pkgdocdir %{_docdir}/%{name}
%endif
Name: dibbler
Version: 1.0.1
Release: 11%{?dist}
Summary: Portable DHCPv6 implementation
License: GPLv2
URL: http://klub.com.pl/dhcpv6
Source0: http://klub.com.pl/dhcpv6/dibbler/dibbler-%{version}.tar.gz
# Needed for gcc10+ https://github.com/tomaszmrugalski/dibbler/commit/6f1578
Patch0: gcc10-no-common.patch
BuildRequires: gcc-c++
%description
%{common_desc}
%package client
Summary: Dibbler, DHCPv6 client
%description client
%{common_desc}
This package contains DHCPv6 client.
%package relay
Summary: Dibbler, DHCPv6 relay
%description relay
%{common_desc}
This package contains DHCPv6 relay.
%package requestor
Summary: Dibbler, DHCPv6 request generator
%description requestor
%{common_desc}
This package contains DHCPv6 request generator.
%package server
Summary: Dibbler, DHCPv6 server
%description server
%{common_desc}
This package contains DHCPv6 server.
%package docs
Summary: Dibbler documentation
BuildArch: noarch
%description docs
%{common_desc}
This package contains dibbler documentation.
%prep
%setup -q -n dibbler-%{version}
%patch0 -p1
%build
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# We explicitly add license file to each sub-package, so no need to install it
# as documentation
rm %{buildroot}%{_pkgdocdir}/LICENSE
# Setup directories
install -p -d -m 755 %{buildroot}%{_sharedstatedir}/dibbler
install -p -d -m 755 %{buildroot}%{_sysconfdir}/dibbler
# Install configuration files
for config in client relay server; do
cp -p doc/examples/$config.conf %{buildroot}%{_sysconfdir}/dibbler
done
# Kill example files irrelevant to Fedora Linux
for file in client-win32.conf server-win32.conf; do
rm %{buildroot}%{_pkgdocdir}/examples/$file
done
for file in client-notify-bsd.sh client-notify-macos.sh; do
rm %{buildroot}%{_pkgdocdir}/scripts/notify-scripts/$file
done
%files client
%license LICENSE
%{_sbindir}/dibbler-client
%{_mandir}/man8/dibbler-client.8*
%dir %{_sysconfdir}/dibbler
%config(noreplace) %{_sysconfdir}/dibbler/client.conf
%dir %{_sharedstatedir}/dibbler
%files relay
%license LICENSE
%{_sbindir}/dibbler-relay
%{_mandir}/man8/dibbler-relay.8*
%dir %{_sysconfdir}/dibbler
%config(noreplace) %{_sysconfdir}/dibbler/relay.conf
%dir %{_sharedstatedir}/dibbler
%files requestor
%license LICENSE
%{_sbindir}/dibbler-requestor
%dir %{_sharedstatedir}/dibbler
%files server
%license LICENSE
%{_sbindir}/dibbler-server
%{_mandir}/man8/dibbler-server.8*
%dir %{_sysconfdir}/dibbler
%config(noreplace) %{_sysconfdir}/dibbler/server.conf
%dir %{_sharedstatedir}/dibbler
%files docs
%license LICENSE
%dir %{_pkgdocdir}
%{_pkgdocdir}/CHANGELOG
%{_pkgdocdir}/RELNOTES
%{_pkgdocdir}/dibbler-user.pdf
%dir %{_pkgdocdir}/examples
%dir %{_pkgdocdir}/scripts
%{_pkgdocdir}/examples/*.conf
%{_pkgdocdir}/scripts/*
%changelog
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jun 13 2016 Ihar Hrachyshka <ihrachys@redhat.com> - 1.0.1-3.fc25
- Added missing dist macro to Release field.
* Mon Jun 13 2016 Ihar Hrachyshka <ihrachys@redhat.com> - 1.0.1-2
- Removed gtest build requirement since we don't run those tests anyway.
* Thu Feb 04 2016 Ihar Hrachyshka <ihrachys@redhat.com> - 1.0.1-1
- Bumped to 1.0.1 final.
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-0.RC1.2.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-0.RC1.2.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.1-0.RC1.2.1
- Rebuilt for GCC 5 C++11 ABI change
* Tue Apr 7 2015 Ihar Hrachyshka <ihrachys@redhat.com> - 1.0.1-0.RC1.2
- package examples and scripts directories into -docs package.
* Thu Apr 2 2015 Ihar Hrachyshka <ihrachys@redhat.com> - 1.0.1-0.RC1.1
- removed dibbler-common package, instead put _sharedstatedir in each package
that needs it.
- added check section (disabled for now due to upstream bug).
- cleaned up scripts and examples for non-Linux platforms.
- removed Group tags.
- build -docs package as noarch.
- preserve timestamps for files installed with `install` and `cp`.
* Thu Mar 26 2015 Ihar Hrachyshka <ihrachys@redhat.com> - 1.0.1-0.RC1
- Initial package build.