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