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