]> git.pld-linux.org Git - packages/maradns.git/blob - maradns.spec
18e8a5e9a460b631f1b5557545c07e355bd8ce03
[packages/maradns.git] / maradns.spec
1 Summary:        A (currently) authoritative-only DNS server made with security in mind
2 Summary(pl.UTF-8):      Tylko autorytatywny (na razie) serwer DNS zrobiony z myślą o bezpieczeństwie
3 Name:           maradns
4 Version:        1.3.07.09
5 Release:        0.1
6 License:        Public Domain
7 Group:          Networking/Daemons
8 Source0:        http://www.maradns.org/download/1.3/%{version}/%{name}-%{version}.tar.bz2
9 # Source0-md5:  1d221438fb4d9317263555262b9c652c
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.268
16 Requires(post): fileutils
17 Requires(post,preun):   /sbin/chkconfig
18 Requires(postun):       /usr/sbin/groupdel
19 Requires(postun):       /usr/sbin/userdel
20 Requires(pre):  /bin/id
21 Requires(pre):  /usr/bin/getgid
22 Requires(pre):  /usr/sbin/groupadd
23 Requires(pre):  /usr/sbin/groupmod
24 Requires(pre):  /usr/sbin/useradd
25 Requires(pre):  /usr/sbin/usermod
26 Requires:       rc-scripts
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.UTF-8
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.UTF-8):      Obsługa transferów stref dla MaraDNS
44 Group:          Networking/Daemons
45 Requires(post): fileutils
46 Requires(post,preun):   /sbin/chkconfig
47 Requires:       %{name} = %{version}-%{release}
48 Requires:       rc-scripts
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.UTF-8
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 %build
67 %{__make} \
68         CC="%{__cc}" \
69         FLAGS="%{rpmcflags}"
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_mandir}/man{1,5,8}} \
74         $RPM_BUILD_ROOT{%{_sysconfdir}/maradns,/etc/rc.d/init.d} \
75         $RPM_BUILD_ROOT%{_localstatedir}/log
76
77 install server/maradns tcp/zoneserver tcp/getzone $RPM_BUILD_ROOT%{_sbindir}
78 install tools/askmara $RPM_BUILD_ROOT%{_bindir}
79 install tools/benchmark $RPM_BUILD_ROOT%{_bindir}
80 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/maradns
81 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/zoneserver
82 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mararc
83 install doc/en/examples/example_csv1 $RPM_BUILD_ROOT%{_sysconfdir}/maradns/db.example.com
84
85 > $RPM_BUILD_ROOT%{_localstatedir}/log/maradns
86 > $RPM_BUILD_ROOT%{_localstatedir}/log/zoneserver
87
88 install doc/en/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
89 install doc/en/man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
90 install doc/en/man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %pre
96 %groupadd -g 58 named
97 if [ "`/bin/id -u maradns 2>/dev/null`" = "58" ]; then
98         /usr/sbin/usermod -d /tmp -l named maradns
99 fi
100 %useradd -u 58 -g 58 -d /tmp -s /bin/false -c "maraDNS user" named
101
102 %post
103 /sbin/chkconfig --add maradns
104 %service maradns restart
105 touch %{_localstatedir}/log/maradns
106 chmod 640 %{_localstatedir}/log/maradns
107
108 %postun
109 if [ "$1" = "0" ]; then
110         %userremove named
111         %groupremove named
112 fi
113
114 %post zoneserver
115 /sbin/chkconfig --add zoneserver
116 %service zoneserver restart
117 touch %{_localstatedir}/log/zoneserver
118 chmod 640 %{_localstatedir}/log/zoneserver
119
120 %preun
121 if [ "$1" = "0" ]; then
122         %service maradns stop
123         /sbin/chkconfig --del maradns
124 fi
125
126 %preun zoneserver
127 if [ "$1" = "0" ]; then
128         %service zoneserver stop
129         /sbin/chkconfig --del zoneserver
130 fi
131
132 %files
133 %defattr(644,root,root,755)
134 %doc 0QuickStart TODO 00README.FIRST CREDITS CHANGELOG doc/{README,en}
135 %attr(754,root,root) /etc/rc.d/init.d/maradns
136 %attr(755,root,root) %{_sbindir}/getzone
137 %attr(755,root,root) %{_sbindir}/maradns
138 %attr(755,root,root) %{_bindir}/*
139 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mararc
140 %dir %{_sysconfdir}/maradns
141 %attr(640,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/maradns/db.example.com
142 %attr(640,root,root) %ghost %{_localstatedir}/log/maradns
143 %{_mandir}/man1/*
144 %{_mandir}/man5/*
145 %{_mandir}/man8/maradns*
146 %{_mandir}/man8/duende*
147
148 %files zoneserver
149 %defattr(644,root,root,755)
150 %attr(754,root,root) /etc/rc.d/init.d/zoneserver
151 %attr(755,root,root) %{_sbindir}/zoneserver
152 %attr(640,root,root) %ghost %{_localstatedir}/log/zoneserver
153 %{_mandir}/man8/zoneserver*
This page took 0.079325 seconds and 2 git commands to generate.