* Wed Oct 26 2016 Ilya Evseev <evseev.i@cdnnow.ru> - 1.5.10-2

- Bugfix building without python2 and python3
- Fixup streamtcp build (Paul)

Signed-off-by: Paul Wouters <pwouters@redhat.com>
This commit is contained in:
Paul Wouters 2016-11-04 10:32:18 +05:30
parent 9c5452fa42
commit 83df90d678

View File

@ -21,7 +21,7 @@
Summary: Validating, recursive, and caching DNS(SEC) resolver Summary: Validating, recursive, and caching DNS(SEC) resolver
Name: unbound Name: unbound
Version: 1.5.10 Version: 1.5.10
Release: 1%{?extra_version:.%{extra_version}}%{?dist} Release: 2%{?extra_version:.%{extra_version}}%{?dist}
License: BSD License: BSD
Url: http://www.nlnetlabs.nl/unbound/ Url: http://www.nlnetlabs.nl/unbound/
Source: http://www.unbound.net/downloads/%{name}-%{version}%{?extra_version}.tar.gz Source: http://www.unbound.net/downloads/%{name}-%{version}%{?extra_version}.tar.gz
@ -141,16 +141,16 @@ Python 3 modules and extensions for unbound
%if 0%{with_python} %if 0%{with_python}
mv %{pkgname} %{pkgname}_python2 mv %{pkgname} %{pkgname}_python2
pushd %{pkgname}_python2 pushd %{pkgname}_python2
%else
pushd %{pkgname}
%endif # with_python %endif # with_python
# only for snapshots # only for snapshots
# autoreconf -iv # autoreconf -iv
%if 0%{with_python}
# copy common doc files - after here, since it may be patched # copy common doc files - after here, since it may be patched
cp -pr doc pythonmod libunbound ../ cp -pr doc pythonmod libunbound ../
popd popd
%endif # with_python
%if 0%{?with_python3} %if 0%{?with_python3}
cp -a %{pkgname}_python2 %{pkgname}_python3 cp -a %{pkgname}_python2 %{pkgname}_python3
@ -174,6 +174,8 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fPIE -pie"
%if 0%{with_python} %if 0%{with_python}
pushd %{pkgname}_python2 pushd %{pkgname}_python2
%else
pushd %{pkgname}
%endif # with_python %endif # with_python
%configure \ %configure \
@ -183,6 +185,7 @@ pushd %{pkgname}_python2
%{configure_args} %{configure_args}
%{__make} %{?_smp_mflags} %{__make} %{?_smp_mflags}
%{__make} %{?_smp_mflags} streamtcp
%if 0%{with_python} %if 0%{with_python}
popd popd
@ -201,10 +204,14 @@ popd
%install %install
install -p -m 0644 %{SOURCE16} .
%if 0%{with_python} %if 0%{with_python}
pushd %{pkgname}_python2 pushd %{pkgname}_python2
%else
pushd %{pkgname}
%endif # with_python %endif # with_python
%{__make} DESTDIR=%{buildroot} install %{__make} DESTDIR=%{buildroot} install
install -m 0755 streamtcp %{buildroot}%{_sbindir}/unbound-streamtcp
%if 0%{with_python} %if 0%{with_python}
popd popd
%endif # with_python %endif # with_python
@ -212,7 +219,6 @@ popd
%if 0%{with_python3} %if 0%{with_python3}
pushd %{pkgname}_python3 pushd %{pkgname}_python3
%{__make} DESTDIR=%{buildroot} install %{__make} DESTDIR=%{buildroot} install
# install streamtcp used for monitoring / debugging unbound's port 80/443 modes
install -m 0755 streamtcp %{buildroot}%{_sbindir}/unbound-streamtcp install -m 0755 streamtcp %{buildroot}%{_sbindir}/unbound-streamtcp
popd popd
%endif # with_python3 %endif # with_python3
@ -225,7 +231,6 @@ install -p -m 0644 %{SOURCE17} %{buildroot}%{_unitdir}/unbound-anchor.service
install -p -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound install -p -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound
install -p -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/unbound install -p -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/unbound
install -p -m 0644 %{SOURCE14} %{buildroot}%{_sysconfdir}/sysconfig/unbound install -p -m 0644 %{SOURCE14} %{buildroot}%{_sysconfdir}/sysconfig/unbound
install -p -m 0644 %{SOURCE16} .
%if %{with_munin} %if %{with_munin}
# Install munin plugin and its softlinks # Install munin plugin and its softlinks
install -d -m 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d install -d -m 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d
@ -241,8 +246,10 @@ done
pushd %{pkgname}_python2 pushd %{pkgname}_python2
%endif # with_python %endif # with_python
%if 0%{with_python3}
# install streamtcp man page # install streamtcp man page
install -m 0644 testcode/streamtcp.1 %{buildroot}/%{_mandir}/man1/unbound-streamtcp.1 install -m 0644 testcode/streamtcp.1 %{buildroot}/%{_mandir}/man1/unbound-streamtcp.1
%endif
install -D -m 0644 contrib/libunbound.pc %{buildroot}/%{_libdir}/pkgconfig/libunbound.pc install -D -m 0644 contrib/libunbound.pc %{buildroot}/%{_libdir}/pkgconfig/libunbound.pc
@ -342,13 +349,13 @@ pushd %{pkgname}_python2
#pushd pythonmod #pushd pythonmod
#make test #make test
#popd #popd
%else
pushd %{pkgname}
%endif # with_python %endif # with_python
make check make check
%if 0%{with_python}
popd popd
%endif # with_python
%if 0%{with_python3} %if 0%{with_python3}
pushd %{pkgname}_python3 pushd %{pkgname}_python3
@ -379,7 +386,9 @@ popd
%{_sbindir}/unbound-control %{_sbindir}/unbound-control
%{_sbindir}/unbound-control-setup %{_sbindir}/unbound-control-setup
%{_sbindir}/unbound-host %{_sbindir}/unbound-host
#%if 0%{with_python3}
%{_sbindir}/unbound-streamtcp %{_sbindir}/unbound-streamtcp
#%endif
%{_mandir}/man1/* %{_mandir}/man1/*
%{_mandir}/man5/* %{_mandir}/man5/*
%exclude %{_mandir}/man8/unbound-anchor* %exclude %{_mandir}/man8/unbound-anchor*
@ -432,6 +441,10 @@ popd
%changelog %changelog
* Wed Oct 26 2016 Ilya Evseev <evseev.i@cdnnow.ru> - 1.5.10-2
- Bugfix building without python2 and python3
- Fixup streamtcp build (Paul)
* Tue Sep 27 2016 Paul Wouters <pwouters@redhat.com> - 1.5.10-1 * Tue Sep 27 2016 Paul Wouters <pwouters@redhat.com> - 1.5.10-1
- Updated to 1.5.10 (better TCP handling, bugfixes) - Updated to 1.5.10 (better TCP handling, bugfixes)
- Install pkgconfig file in -devel package - Install pkgconfig file in -devel package