# norootforbuild Name: unbound Version: 1.0.0 Release: 1 # Group: Productivity/Networking/DNS/Servers License: BSD 3-Clause # BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: openssl-devel BuildRequires: ldns-devel > 1.2.9 PreReq: pwdutils # Url: http://www.unbound.net/ Source: http://www.unbound.net/downloads/unbound-%{version}.tar.gz Patch: unbound-1.0.0_stupid_rpath.patch Patch1: unbound-1.0.0_preserve_cflags.patch Patch2: unbound-1.0.0_buffer_overflow.patch # Summary: Validating, recursive, and caching DNS resolver %description Unbound is a validating, recursive, and caching DNS resolver. %package -n libunbound0 Group: Development/Libraries/C and C++ # Summary: Shared library from unbound %description -n libunbound0 A validating, recursive, and caching DNS resolver %package devel Group: Development/Libraries/C and C++ Requires: libunbound0 = %{version} # Summary: Development files for libunbound %description devel A validating, recursive, and caching DNS resolver %prep %setup %patch %patch1 %patch2 %{__rm} ldns-src.tar.gz %build %configure --disable-rpath --with-ldns=%{_prefix} %{__make} %install %makeinstall %{__install} -d -m 0750 %{buildroot}/var/lib/unbound %{__rm} -v %{buildroot}%{_libdir}/libunbound.*a %clean %{__rm} -rf %{buildroot} %pre /usr/sbin/groupadd -r unbound &>/dev/null || : /usr/sbin/useradd -o -g unbound -s /bin/false -r -c "unbound caching dns server" -d /var/lib/unbound unbound &>/dev/null || : %post -n libunbound0 -p /sbin/ldconfig %postun -n libunbound0 -p /sbin/ldconfig %files %defattr(-,root,root,-) %config(noreplace) %attr(-,root,unbound) %{_sysconfdir}/unbound/ %{_sbindir}/unbound %{_sbindir}/unbound-checkconf %{_sbindir}/unbound-host %{_mandir}/man1/unbound-host.1* %{_mandir}/man5/unbound.conf.5* %{_mandir}/man8/unbound-checkconf.8* %{_mandir}/man8/unbound.8* %dir %attr(-,unbound,unbound) /var/lib/unbound %files -n libunbound0 %defattr(-,root,root,-) %{_libdir}/libunbound.so.0 %{_libdir}/libunbound.so.0.12.0 %files devel %defattr(-,root,root,-) %{_includedir}/unbound.h %{_libdir}/libunbound.so %{_mandir}/man3/libunbound.3* %changelog