# norootforbuild Name: maradns Summary: An authoritative and recursive DNS server made with security in mind Version: 3.5.0036 Release: 5.kng%{?dist} License: BSD (Two-clause) Group: Productivity/Networking/DNS/Servers Url: http://www.maradns.org/ Source: Source0: http://www.maradns.org/download/3.5/%{version}/%{name}-%{version}.tar.xz Patch0: %{name}-0001-add-systemd-unit-files.patch BuildRequires: make BuildRequires: gcc %{?systemd_requires} BuildRequires: systemd Requires(pre): shadow-utils %description MaraDNS is a package that implements the Domain Name Service (DNS), an essential internet service. MaraDNS has the following advantages: * Secure. * Supported. * Easy to use. * Small. * Open Source. %prep %setup -q -n maradns-%{version} %autopatch -p1 %build # We don't use %%configure here because this is a homebrew configure not generated by autoconf ./configure --ipv6 --libdir=%{_libdir} # recursive resolver is shipped in versioned directory # first compile Deadwood, otherwise we have no control over make flags pushd deadwood-%{version}/src make %{?_smp_mflags} FLAGS="%{optflags} -lrt" popd make %{?_smp_mflags} FLAGS="%{optflags} -DSELECT_PROBLEM -DAUTHONLY" %install # create /etc/maradns, /etc/mararc and /etc/dwood3rc first install -p -d -m 0755 %{buildroot}%{_sysconfdir}/maradns/logger/ install -p -D -m 0644 doc/en/examples/example_mararc %{buildroot}%{_sysconfdir}/mararc install -p -D -m 0644 deadwood-%{version}/doc/dwood3rc %{buildroot}%{_sysconfdir}/dwood3rc # cache dir install -p -d -m 0755 %{buildroot}/var/cache/deadwood # sbin files install -p -D -m 0755 server/maradns %{buildroot}%{_sbindir}/maradns install -p -D -m 0755 tcp/zoneserver %{buildroot}%{_sbindir}/zoneserver install -p -D -m 0755 deadwood-%{version}/src/Deadwood %{buildroot}%{_sbindir}/Deadwood # bin files install -p -D -m 0755 tcp/getzone %{buildroot}%{_bindir}/getzone install -p -D -m 0755 tcp/fetchzone %{buildroot}%{_bindir}/fetchzone install -p -D -m 0755 tools/askmara %{buildroot}%{_bindir}/askmara # man pages install -p -d -m 0755 %{buildroot}%{_mandir}/man{1,5,8} install -p -D -m 0644 -t %{buildroot}%{_mandir}/man1/ \ doc/en/man/askmara.1 \ doc/en/man/getzone.1 \ doc/en/man/fetchzone.1 install -p -D -m 0644 -t %{buildroot}%{_mandir}/man1/ \ deadwood-%{version}/doc/Deadwood.1 install -p -D -m 0644 -t %{buildroot}%{_mandir}/man5/ \ doc/en/man/csv1.5 \ doc/en/man/csv2.5 \ doc/en/man/csv2_txt.5 \ doc/en/man/mararc.5 install -p -D -m 0644 -t %{buildroot}%{_mandir}/man8/ \ doc/en/man/maradns.8 \ doc/en/man/zoneserver.8 \ # systemd units # NOTE: upstream ships slightly different named units # migration to upstream units in Fedora will be done sometime in the future mkdir -p %{buildroot}%{_unitdir} install -p -D -m 0644 -t %{buildroot}%{_unitdir}/ \ build/maradns.service \ build/maradns-zoneserver.service \ build/maradns-deadwood.service %files %doc doc/en/credits.txt doc/en/faq.txt doc/en/{examples,tutorial,html} %license COPYING %config(noreplace) %{_sysconfdir}/mararc %config(noreplace) %{_sysconfdir}/dwood3rc %attr(-,maradns,maradns) %{_sysconfdir}/maradns/ %attr(-,maradns,maradns) /var/cache/deadwood/ %{_unitdir}/%{name}.service %{_unitdir}/%{name}-zoneserver.service %{_unitdir}/%{name}-deadwood.service %{_bindir}/askmara %{_bindir}/fetchzone %{_bindir}/getzone %{_sbindir}/maradns %{_sbindir}/zoneserver %{_sbindir}/Deadwood %{_mandir}/man1/askmara.1* %{_mandir}/man1/getzone.1* %{_mandir}/man1/fetchzone.1* %{_mandir}/man1/Deadwood.1* %{_mandir}/man5/csv1.5* %{_mandir}/man5/csv2.5* %{_mandir}/man5/csv2_txt.5* %{_mandir}/man5/mararc.5* %{_mandir}/man8/maradns.8* %{_mandir}/man8/zoneserver.8* %pre if [ $1 -eq 1 ]; then getent group maradns >/dev/null || groupadd -r maradns getent passwd maradns >/dev/null || \ useradd -r -g maradns -d /etc/maradns -s /sbin/nologin \ -c "MaraDns chroot user" maradns exit 0 fi %post if [ $1 -eq 1 ]; then # correct UID/GID of maradns user sed --in-place -e "s/^maradns_uid.*/maradns_uid = $(id -u maradns)/" %{_sysconfdir}/mararc sed --in-place -e "s/^maradns_gid.*/maradns_gid = $(id -g maradns)/" %{_sysconfdir}/mararc sed --in-place -e "s/^maradns_uid.*/maradns_uid = $(id -u maradns)/" %{_sysconfdir}/dwood3rc sed --in-place -e "s/^maradns_gid.*/maradns_gid = $(id -g maradns)/" %{_sysconfdir}/dwood3rc # correct cache file directory sed --in-place -e 's@/etc/deadwood@/var/cache/deadwood@' %{_sysconfdir}/dwood3rc fi %systemd_post maradns.service maradns-zoneserver.service maradns-deadwood.service %preun %systemd_preun maradns.service maradns-zoneserver.service maradns-deadwood.service %postun %systemd_postun_with_restart maradns.service maradns-zoneserver.service maradns-deadwood.service %changelog * Thu Aug 15 2024 John Pierce - Conform to Fedora 41 3.5.0036-5 version * Wed Feb 5 2020 John Pierce - 2.0.7d-2.kng - add global debug_package directive to allow build under centos 8 - update release * Thu Jan 2 2014 Mustafa Ramadhan - 2.0.7d-1.mr - update to 2.0.7d * Wed Aug 7 2013 Mustafa Ramadhan - 2.0.7b-1.mr - update to 2.0.7b - recompile for centos (disable requires for fdupes and ps) * Tue Apr 24 2012 webcd...a@t...online.de Updated source * Wed Jun 15 2011 fwdsbs.to.11df@xoxy.net - custom package created