Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > a09b1d8be58a7a1f734687bc52590df0 > files > 3

mydns-0.9.2-1mdk.src.rpm

%define name		mydns
%define version		0.9.2
%define release		1mdk
%define webadminroot	/var/www/html/admin

Summary:		A MySQL-based Internet DNS server.
Name:			%{name}
Version:		%{version}
Release:		%{release}
License:		GPL
Group:			System/Servers
URL:			http://mydns.bboy.net/
Source0:		%{name}-%{version}.tar.bz2
Source1:		%{name}.init.bz2
PreReq:			rpm-helper
Prereq: 	/sbin/install-info
Requires:		mysqlserver
BuildRequires:		libmysql10-devel
BuildRoot:		%{_tmppath}/%{name}-%{version}-buildroot

%description
MyDNS is a free DNS server for UNIX implemented from scratch and
designed to utilize the MySQL database for data storage.

Its primary objectives are stability, security, interoperability,
and speed, though not necessarily in that order.

MyDNS does not include recursive name service, nor a resolver
library. It is primarily designed for organizations with many
zones and/or resource records who desire the ability to perform
real-time dynamic updates on their DNS data via MySQL.

MyDNS starts and is ready to answer questions immediately, no
matter how much DNS data you have in the database. It is extremely
fast and memory-efficient. It includes complete documentation,
including a manual and a FAQ. It supports a few frills, including
round robin DNS, dynamic load balancing, and outgoing AXFR for
non-MyDNS nameservers.

%package		admin
Summary:		Web admin GUI written in php for %{name}
Group:          	System/Servers
Requires:		webserver mysqlserver mod_php php-common php-mysql
Requires:		%{name} = %{version}
Prefix:			%{webadminroot}

%description		admin
This package contains a web admin GUI written in php for %{name}

%prep

%setup -q

%build

%configure

pushd contrib
    patch -p0 < alias.patch
popd

%make

mv contrib/README README.contrib


%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

# don't fiddle with the initscript!
export DONT_GPRINTIFY=1

%makeinstall

install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{webadminroot}/%{name}

install -m644 contrib/admin.php %{buildroot}%{webadminroot}/%{name}/index.php

%{buildroot}%{_sbindir}/mydns --dump-config > %{buildroot}%{_sysconfdir}/%{name}.conf

bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/%{name}

%post
%_post_service %{name}
%_install_info %{name}.info

%preun
%_preun_service %{name}
%_remove_install_info %{name}.info

%clean
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc ChangeLog NEWS QUICKSTART README TODO doc/html
%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}.conf
%config(noreplace) %attr(0755,root,root) %{_initrddir}/%{name}
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/man?/*
%{_infodir}/*

%files admin
%defattr(-, root, root)
%doc README.contrib
%config(noreplace) %attr(0644,root,root) %{webadminroot}/%{name}/index.php

%changelog
* Thu Sep 19 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.9.2-1mdk
- initial cooker contrib
- install web admin stuff in common %%{webadminroot}/ directory
- added a simple init script