]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - pdns-recursor/pdns-recursor.nm
pdns: Update to 3.3.1.
[people/ms/ipfire-3.x.git] / pdns-recursor / pdns-recursor.nm
index 80f295211fcba26cc143cc97f624b01c0f34a120..cbcaa2ebea6905b1ffbb2e8b5184cd992027fb18 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pdns-recursor
 version    = 3.3
-release    = 5
+release    = 9
 
 groups     = Networking/DNS
 url        = http://powerdns.com/
@@ -17,7 +17,7 @@ description
        package if you need a dns cache for your network.
 end
 
-source_dl  =
+source_dl  = http://downloads.powerdns.com/releases/
 sources    = %{thisapp}.tar.bz2
 
 build
@@ -25,6 +25,11 @@ build
                gcc-c++
                boost-devel
                lua-devel
+               shadow-utils
+       end
+
+       prepare_cmds
+               %{create_user}
        end
 
        build
@@ -34,35 +39,47 @@ build
 
        install
                make install DESTDIR=%{BUILDROOT} \
-                       CONFIGDIR=/etc/%{name}
+                       CONFIGDIR="%{sysconfdir}/pdns"
 
                # Remove sysvinit file
                rm -rf %{BUILDROOT}/etc/init.d
 
                # Remove shipped config file
-               rm -rf %{BUILDROOT}/etc/%{name}/recursor.conf-dist
+               rm -rf %{BUILDROOT}%{sysconfdir}/pdns/recursor.conf-dist
 
                # Install our default config file
-               cp -vf %{DIR_SOURCE}/recursor.conf %{BUILDROOT}/etc/%{name}/recursor.conf
+               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
-                       /etc/%{name}/recursor.conf
+                       %{sysconfdir}/pdns/recursor.conf
                end
 
-               prerequires = shadow-utils systemd-units
+               prerequires
+                       shadow-utils
+                       systemd-units
+               end
 
                script prein
-                       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
+                       %{create_user}
                end
 
                script postin
@@ -84,4 +101,8 @@ packages
                        /bin/systemctl try-restart pdns-recursor.service >/dev/null 2>&1 || :
                end
        end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
 end