2 # - fix configure patch to change source file instead of generated configure
5 %bcond_with mysql # enable MySQL support
6 %bcond_with pgsql # enable PostgreSQL support
7 %bcond_with ssl # enable TLS/SSL support
9 Summary: MyDNS - a free Database Driven Nameserver
10 Summary(pl.UTF-8): MyDNS - darmowy serwer nazw wykorzystujący relacyjne bazy danych
15 Group: Networking/Daemons
16 Source0: http://mydns.bboy.net/download/%{name}-%{version}.tar.gz
19 Source3: %{name}.sysconfig
20 Patch0: %{name}-configure.patch
21 URL: http://mydns.bboy.net/
22 BuildRequires: autoconf >= 2.59
23 BuildRequires: automake >= 1:1.9.6
24 %{?with_mysql:BuildRequires: mysql-devel}
25 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7i}
26 %{?with_pgsql:BuildRequires: postgresql-devel}
27 BuildRequires: rpmbuild(macros) >= 1.310
28 BuildRequires: texinfo
29 BuildRequires: zlib-devel
30 Requires(post,preun): /sbin/chkconfig
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 MyDNS is a free DNS server implemented from scratch and is designed to
37 serve records directly from an SQL database, either MySQL or
40 %description -l pl.UTF-8
41 MyDNS to darmowy serwer nazw zaimplementowany od podstaw i
42 zaprojektowany aby udostępniać rekordy bezpośrednio z bazy SQL -
43 obecnie MySQL lub PostgreSQL.
52 --with-confdir=%{_sysconfdir}/%{name} \
53 --with%{?with_mysql:out}-pgsql \
54 --with%{?with_pgsql:out}-mysql \
55 --with%{!?with_ssl:out}-openssl
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
64 DESTDIR=$RPM_BUILD_ROOT
66 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
67 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
68 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mydns
70 rm -f $RPM_BUILD_ROOT%{_infodir}/dir*
73 rm -rf $RPM_BUILD_ROOT
76 /sbin/chkconfig --add %{name}
77 %service %{name} restart
78 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
81 if [ "$1" = "0" ]; then
82 %service -q %{name} stop
83 /sbin/chkconfig --del %{name}
86 %postun -p /sbin/postshell
87 -/usr/sbin/fix-info-dir -c %{_infodir}
90 %defattr(644,root,root,755)
91 %doc ChangeLog AUTHORS BUGS README README.mysql INSTALL NEWS TODO QUICKSTART.*
92 %attr(754,root,root) /etc/rc.d/init.d/%{name}
93 %dir %{_sysconfdir}/%{name}
94 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mydns
96 %attr(755,root,root) %{_sbindir}/*
97 %attr(755,root,root) %{_bindir}/*