############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = pdns-recursor version = 3.3 release = 9 groups = Networking/DNS url = http://powerdns.com/ license = GPLv2 summary = A modern, advanced and high performance recursing nameserver. description PowerDNS Recursor is a non authoritative/recursing DNS server. Use this package if you need a dns cache for your network. end source_dl = http://downloads.powerdns.com/releases/ sources = %{thisapp}.tar.bz2 build requires gcc-c++ boost-devel lua-devel shadow-utils end prepare_cmds %{create_user} end build LUA=1 LUA_CPPFLAGS_CONFIG= LUA_LIBS_CONFIG=-llua \ make OPTFLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS} end install make install DESTDIR=%{BUILDROOT} \ CONFIGDIR="%{sysconfdir}/pdns" # Remove sysvinit file rm -rf %{BUILDROOT}/etc/init.d # Remove shipped config file rm -rf %{BUILDROOT}%{sysconfdir}/pdns/recursor.conf-dist # Install our default config file cp -vf %{DIR_SOURCE}/recursor.conf \ %{BUILDROOT}%{sysconfdir}/pdns/recursor.conf # Create folder for chroot mkdir -pv %{BUILDROOT}/var/lib/pdns-recursor # Create directory for socket and stuff. mkdir -pv %{BUILDROOT}/run/pdns-recursor chown -v pdns-recursor.pdns-recursor %{BUILDROOT}/run/pdns-recursor end end create_user getent group pdns-recursor >/dev/null || groupadd -r pdns-recursor getent passwd pdns-recursor >/dev/null || \ useradd -r -g pdns-recursor -d /var/lib/pdns-recursor -s /sbin/nologin \ pdns-recursor end packages package %{name} configfiles %{sysconfdir}/pdns/recursor.conf end prerequires shadow-utils systemd-units end script prein %{create_user} end script postin /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl --no-reload enable pdns-recursor.service >/dev/null 2>&1 || : end script preun /bin/systemctl --no-reload disable pdns-recursor.service >/dev/null 2>&1 || : /bin/systemctl stop pdns-recursor.service >/dev/null 2>&1 || : end script postun /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script postup /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl try-restart pdns-recursor.service >/dev/null 2>&1 || : end end package %{name}-debuginfo template DEBUGINFO end end