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