Summary: Authoritative DNS Server
Name: gdnsd
Version: 1.5.2
Release: 1%{?dist}
License: GPLv3+
Group: System Environment/Daemons
URL: http://code.google.com/p/gdnsd/
Source0: http://gdnsd.googlecode.com/files/gdnsd-%{version}.tar.gz
Source2: gdnsd.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libcap-devel
# For make check
BuildRequires: perl(Test::More)
BuildRequires: perl(Net::DNS)
BuildRequires: perl(LWP)
BuildRequires: perl(Socket6)
BuildRequires: perl(IO::Socket::INET6)
Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
%description
Authoritative DNS server with a focus on high performance, low latency service.
It does not offer any form of caching or recursive service, and does not
support DNSSEC. The initial "g" stands for Geographic, as gdnsd offers a
plugin system for geographic (or other sorts of) balancing, redirection, and
service-state-conscious failover. If you don't care about that feature, you can
ignore it and gdnsd still makes a great authoritative DNS server.
%package devel
Summary: Header files and libraries needed for gdnsd plugin development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Header files and libraries needed for gdnsd plugin development.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%check
make check
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
install -D -p -m 0755 %{SOURCE2} %{buildroot}/etc/init.d/gdnsd
# Something is VERY WRONG here...
rm -f %{buildroot}%{_sbindir}/gdnsd
install -p -m 0755 gdnsd/.libs/gdnsd %{buildroot}%{_sbindir}/gdnsd
# Remove examples, we bundle them as %%doc
rm -f %{buildroot}%{_sysconfdir}/gdnsd/*
# Remove docs, we bundle them as %%doc
rm -rf %{buildroot}%{_prefix}/share/doc/gdnsd
# We ghost the configuration file
touch %{buildroot}%{_sysconfdir}/gdnsd/config
%clean
rm -rf %{buildroot}
%pre
if [ $1 -eq 1 ]; then
/usr/sbin/useradd -c "gdnsd user" -s /sbin/nologin -r -d %{_var}/gdnsd gdnsd &>/dev/null || :
fi
%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add gdnsd
fi
%preun
if [ $1 -eq 0 ]; then
/sbin/service gdnsd stop &>/dev/null || :
/sbin/chkconfig --del gdnsd
fi
%postun
if [ $1 -ge 1 ]; then
/sbin/service gdnsd condrestart &>/dev/null || :
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%doc docs/gdnsd_manual.html docs/gdnsd_manual.txt
%doc example/config.example example/example.com
%dir %{_sysconfdir}/gdnsd/
/etc/init.d/gdnsd
%{_libdir}/*.so
%exclude %{_libdir}/*.la
%dir %{_libdir}/gdnsd/
%ghost %config(noreplace) %{_sysconfdir}/gdnsd/config
%{_libdir}/gdnsd/*.so
%exclude %{_libdir}/gdnsd/*.la
%{_sbindir}/gdnsd
%{_mandir}/man5/*
%{_mandir}/man8/*
%dir %{_var}/gdnsd/
%files devel
%defattr(-,root,root,-)
%{_includedir}/gdnsd-*.h
%{_mandir}/man3/*
%changelog
* Thu May 19 2011 Matthias Saou 1.5.2-1
- Update to 1.5.2.
- Add new libpcap-devel BR for the late_bind_secs feature.
* Thu Apr 14 2011 Matthias Saou 1.4.4-1
- Update to 1.4.4.
* Sun Jan 30 2011 Matthias Saou 1.4.1-1
- Update to 1.4.1.
* Mon Jan 10 2011 Matthias Saou 1.3.6-1
- Initial RPM release.