]> git.pld-linux.org Git - packages/maradns.git/blob - maradns.spec
- up to 1.1.30
[packages/maradns.git] / maradns.spec
1 Summary:        A (currently) authoritative-only DNS server made with security in mind
2 Summary(pl):    Tylko autorytatywny (na razie) serwer DNS zrobiony z my¶l± o bezpieczeñstwie
3 Name:           maradns
4 Version:        1.1.30
5 Release:        1
6 License:        Public Domain
7 Group:          Networking/Daemons
8 Source0:        http://www.maradns.org/download/1.1/%{name}-%{version}.tar.bz2
9 # Source0-md5:  ade9dc785711e8510d2fe3bf03aac85a
10 Source1:        %{name}.init
11 Source2:        zoneserver.init
12 Source3:        mararc
13 Patch0:         %{name}-default_uid.patch
14 URL:            http://www.maradns.org/
15 BuildRequires:  rpmbuild(macros) >= 1.159
16 PreReq:         rc-scripts
17 Requires(pre):  /bin/id
18 Requires(pre):  /usr/bin/getgid
19 Requires(pre):  /usr/sbin/groupadd
20 Requires(pre):  /usr/sbin/groupmod
21 Requires(pre):  /usr/sbin/useradd
22 Requires(pre):  /usr/sbin/usermod
23 Requires(post,preun):   /sbin/chkconfig
24 Requires(post): fileutils
25 Requires(postun):       /usr/sbin/groupdel
26 Requires(postun):       /usr/sbin/userdel
27 Provides:       group(named)
28 Provides:       nameserver
29 Provides:       user(named)
30 Obsoletes:      nameserver
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 MaraDNS is (currently) an authoritative-only DNS server made with
35 security in mind.
36
37 %description -l pl
38 MaraDNS jest (na razie) tylko autorytatywnym serwerem DNS zrobionym z
39 my¶l± o bezpieczeñstwie.
40
41 %package zoneserver
42 Summary:        Handle zone transfers for MaraDNS
43 Summary(pl):    Obs³uga transferów stref dla MaraDNS
44 Group:          Networking/Daemons
45 PreReq:         rc-scripts
46 Requires(post,preun):   /sbin/chkconfig
47 Requires(post): fileutils
48 Requires:       %{name} = %{version}-%{release}
49
50 %description zoneserver
51 zoneserver listens on port 53/tcp and handles dns zone transfers.
52 zoneserver uses a configuration file, /etc/mararc by default, to
53 determine various parameters, such as the IP to bind to, who is
54 allowed to perform zone transfers, etc.
55
56 %description zoneserver -l pl
57 zoneserver s³ucha na porcie 53/tcp i obs³uguje transfery stref DNS.
58 U¿ywa domy¶lnie pliku konfiguracyjnego /etc/mararc aby uzyskaæ
59 parametry takie jak na jakim adresie ma s³uchaæ, kto mo¿e robiæ
60 transfery stref itp.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65
66 # kill precompiled x86 objects
67 rm -f {parse,qual,tcp}/*.o
68
69 %build
70 %{__make} \
71         CC=%{__cc} \
72         FLAGS="%{rpmcflags}"
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_mandir}/{,fr/}man{1,5,8}} \
77         $RPM_BUILD_ROOT{%{_sysconfdir}/maradns,/etc/rc.d/init.d} \
78         $RPM_BUILD_ROOT%{_localstatedir}/log
79
80 install server/maradns tcp/zoneserver tcp/getzone $RPM_BUILD_ROOT%{_sbindir}
81 install tools/askmara $RPM_BUILD_ROOT%{_bindir}
82 install tools/benchmark $RPM_BUILD_ROOT%{_bindir}
83 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns
84 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/zoneserver
85 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mararc
86 install doc/en/examples/example_csv1 $RPM_BUILD_ROOT%{_sysconfdir}/maradns/db.example.com
87
88 > $RPM_BUILD_ROOT%{_localstatedir}/log/maradns
89 > $RPM_BUILD_ROOT%{_localstatedir}/log/zoneserver
90
91 install doc/en/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
92 install doc/en/man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
93 install doc/en/man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
94 install doc/fr/man/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
95 install doc/fr/man/*.5 $RPM_BUILD_ROOT%{_mandir}/fr/man5
96 install doc/fr/man/*.8 $RPM_BUILD_ROOT%{_mandir}/fr/man8
97
98 rm -rf doc/*/man
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %pre
104 if [ -n "`/usr/bin/getgid named`" ]; then
105         if [ "`/usr/bin/getgid named`" != "58" ]; then
106                 echo "Error: group named doesn't have gid=58. Correct this before installing maradns." 1>&2
107                 exit 1
108         fi
109 else
110         if [ -n "`getgid maradns`" -a "`getgid maradns`" = "58" ]; then
111                 /usr/sbin/groupmod -n named maradns
112         else
113                 /usr/sbin/groupadd -g 58 named
114         fi
115 fi
116 if [ -n "`/bin/id -u named 2>/dev/null`" ]; then
117         if [ "`/bin/id -u named`" != "58" ]; then
118                 echo "Error: user named doesn't have uid=58. Correct this before installing maradns." 1>&2
119                 exit 1
120         fi
121 else
122         if [ -n "`/bin/id -u maradns 2>/dev/null`" -a "`/bin/id -u maradns`" = "58" ]; then
123                 /usr/sbin/usermod -d /tmp -l named maradns
124         else
125                 /usr/sbin/useradd -u 58 -g 58 -d /tmp -s /bin/false -c "maraDNS user" named
126         fi
127 fi
128
129 %post
130 /sbin/chkconfig --add maradns
131 if [ -f /var/lock/subsys/maradns ]; then
132         /etc/rc.d/init.d/maradns restart 1>&2
133 else
134         echo "Type \"/etc/rc.d/init.d/maradns start\" to start maradns" 1>&2
135 fi
136 touch %{_localstatedir}/log/maradns
137 chmod 640 %{_localstatedir}/log/maradns
138
139 %postun
140 if [ "$1" = "0" ]; then
141         %userremove named
142         %groupremove named
143 fi
144
145 %post zoneserver
146 /sbin/chkconfig --add zoneserver
147 if [ -f /var/lock/subsys/zoneserver ]; then
148         /etc/rc.d/init.d/zoneserver restart 1>&2
149 else
150         echo "Type \"/etc/rc.d/init.d/zoneserver start\" to start zoneserver" 1>&2
151 fi
152 touch %{_localstatedir}/log/zoneserver
153 chmod 640 %{_localstatedir}/log/zoneserver
154
155 %preun
156 if [ "$1" = "0" ]; then
157         if [ -f /var/lock/subsys/maradns ]; then
158                 /etc/rc.d/init.d/maradns stop 1>&2
159         fi
160         /sbin/chkconfig --del maradns
161 fi
162
163 %preun zoneserver
164 if [ "$1" = "0" ]; then
165         if [ -f /var/lock/subsys/zoneserver ]; then
166                 /etc/rc.d/init.d/zoneserver stop 1>&2
167         fi
168         /sbin/chkconfig --del zoneserver
169 fi
170
171 %files
172 %defattr(644,root,root,755)
173 %doc 0QuickStart TODO 00README.FIRST CREDITS CHANGELOG doc/{README,en}
174 %lang(fr) %doc doc/fr
175 %attr(754,root,root) /etc/rc.d/init.d/maradns
176 %attr(755,root,root) %{_sbindir}/getzone
177 %attr(755,root,root) %{_sbindir}/maradns
178 %attr(755,root,root) %{_bindir}/*
179 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mararc
180 %attr(640,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/maradns/db.example.com
181 %attr(640,root,root) %ghost %{_localstatedir}/log/maradns
182 %{_mandir}/man1/*
183 %{_mandir}/man5/*
184 %{_mandir}/man8/maradns*
185 %{_mandir}/man8/duende*
186 %lang(fr) %{_mandir}/fr/man1/*
187 %lang(fr) %{_mandir}/fr/man5/*
188 %lang(fr) %{_mandir}/fr/man8/maradns*
189
190 %files zoneserver
191 %defattr(644,root,root,755)
192 %attr(754,root,root) /etc/rc.d/init.d/zoneserver
193 %attr(755,root,root) %{_sbindir}/zoneserver
194 %attr(640,root,root) %ghost %{_localstatedir}/log/zoneserver
195 %{_mandir}/man8/zoneserver*
196 %lang(fr) %{_mandir}/fr/man8/zoneserver*
This page took 0.109249 seconds and 4 git commands to generate.