Name: resolv_wrapper
Version: 1.1.0
Release: 3%{?dist}
Summary: A wrapper for dns name resolving or dns faking
License: BSD
Url: http://cwrap.org/
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: libcmocka-devel
Requires: cmake
Requires: pkgconfig
%description
It is likely that if you have a server/client architecture, you need to do DNS
queries or a third party library, like Kerberos needs to be able to do queries.
In the case of Kerberos the client needs to look the address of the KDC up via a
SRV record. resolv_wrapper is able to either redirect all DNS queries to your
DNS server implementation, or fake DNS replies!
To use it set the following environment variables:
LD_PRELOAD=libresolv_wrapper.so
RESOLV_WRAPPER_CONF=./my_resolv.conf
This package doesn't have a devel package because this project is for
development/testing.
%prep
%setup -q
%build
if test ! -e "obj"; then
mkdir obj
fi
pushd obj
%cmake \
-DUNIT_TESTING=ON \
%{_builddir}/%{name}-%{version}
make %{?_smp_mflags} VERBOSE=1
popd
%install
pushd obj
make DESTDIR=%{buildroot} install
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%check
pushd obj
make test
popd
%files
%doc AUTHORS README ChangeLog COPYING
%{_libdir}/libresolv_wrapper.so*
%dir %{_libdir}/cmake/resolv_wrapper
%{_libdir}/cmake/resolv_wrapper/resolv_wrapper-config-version.cmake
%{_libdir}/cmake/resolv_wrapper/resolv_wrapper-config.cmake
%{_libdir}/pkgconfig/resolv_wrapper.pc
%{_mandir}/man1/resolv_wrapper.1*
%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Dec 16 2014 Andreas Schneider <asn@redhat.com> - 1.1.0-2
- Add Requires for pkgconfig and cmake.
* Wed Dec 10 2014 Andreas Schneider <asn@redhat.com> - 1.1.0-1
- resolves: #1172534 - Initial package.