]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pdns-recursor/pdns-recursor.nm
Merge remote-tracking branch 'maniacikarus/samba'
[people/ms/ipfire-3.x.git] / pdns-recursor / pdns-recursor.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = pdns-recursor
7 version = 3.3
8 release = 5
9
10 groups = Networking/DNS
11 url = http://powerdns.com/
12 license = GPLv2
13 summary = A modern, advanced and high performance recursing nameserver.
14
15 description
16 PowerDNS Recursor is a non authoritative/recursing DNS server. Use this
17 package if you need a dns cache for your network.
18 end
19
20 source_dl =
21 sources = %{thisapp}.tar.bz2
22
23 build
24 requires
25 gcc-c++
26 boost-devel
27 lua-devel
28 end
29
30 build
31 LUA=1 LUA_CPPFLAGS_CONFIG= LUA_LIBS_CONFIG=-llua \
32 make OPTFLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
33 end
34
35 install
36 make install DESTDIR=%{BUILDROOT} \
37 CONFIGDIR=/etc/%{name}
38
39 # Remove sysvinit file
40 rm -rf %{BUILDROOT}/etc/init.d
41
42 # Remove shipped config file
43 rm -rf %{BUILDROOT}/etc/%{name}/recursor.conf-dist
44
45 # Install our default config file
46 cp -vf %{DIR_SOURCE}/recursor.conf %{BUILDROOT}/etc/%{name}/recursor.conf
47
48 # Create folder for chroot
49 mkdir -pv %{BUILDROOT}/var/lib/pdns-recursor
50 end
51 end
52
53 packages
54 package %{name}
55 configfiles
56 /etc/%{name}/recursor.conf
57 end
58
59 prerequires = shadow-utils systemd-units
60
61 script prein
62 getent group pdns-recursor >/dev/null || groupadd -r pdns-recursor
63 getent passwd pdns-recursor >/dev/null || \
64 useradd -r -g pdns-recursor -d /var/lib/pdns-recursor -s /sbin/nologin \
65 pdns-recursor
66 end
67
68 script postin
69 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
70 /bin/systemctl --no-reload enable pdns-recursor.service >/dev/null 2>&1 || :
71 end
72
73 script preun
74 /bin/systemctl --no-reload disable pdns-recursor.service >/dev/null 2>&1 || :
75 /bin/systemctl stop pdns-recursor.service >/dev/null 2>&1 || :
76 end
77
78 script postun
79 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
80 end
81
82 script postup
83 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
84 /bin/systemctl try-restart pdns-recursor.service >/dev/null 2>&1 || :
85 end
86 end
87 end