Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37044202
en ru br
ALT Linux repos
S:2.89-alt2
5.0: 2.45-alt2
4.1: 2.41-alt4.M41.1
4.0: 2.38-alt1
3.0: 2.22-alt2

Group :: System/Servers
RPM: dnsmasq

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: dnsmasq
Version: 2.38

# Run 'rpmbuild --with kernel26 dnsmasq.spec',

# if your ALTLinux version is 2.4 < x < 3.1
%def_without kernel26

%define release_tag %nil
%define m4_macro M24
%define service_pkg service

Release: alt1
Summary: A lightweight caching nameserver
Copyright: GPL
Group: System/Servers
URL: http://www.thekelleys.org.uk/dnsmasq
Source0: %url/%name-%version.tar.gz
Source1: %name.init.m4
Source2: %name.sysconfig
Patch0: %name.conf.patch
Requires: %service_pkg
BuildPreReq: m4
%if_with kernel26
BuildPreReq: kernel-headers-std26-up
%else
BuildPreReq: kernel-headers-std
%endif
# Conflicts: named, bind, dhcp, dhcpd

%define init_script rpm/%name-alt.%m4_macro
%define sysconfig_file %_sysconfdir/sysconfig/%name

Summary(ru_RU.KOI8-R): Компактный сервер DNS и DHCP для локальных сетей

%description
Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. It
is designed to provide DNS and, optionally, DHCP, to a small network. It can
serve the names of local machines which are not in the global DNS. The DHCP
server integrates with the DNS server and allows machines with DHCP-allocated
addresses to appear in the DNS with names configured either in each host or
in a central configuration file. Dnsmasq supports static and dynamic DHCP
leases and BOOTP for network booting of diskless machines.

%description -l ru_RU.KOI8-R
Dnsmasq - это компактный, простой в настройке сервер DNS и DHCP,
разработанный для использования в небольших сетях.
По умолчанию он использует общесистемные файлы /etc/hosts и /etc/resolv.conf,
поэтому может использоваться без настройки сразу после установки.

Очень удобными функциями являются прозрачное переопределение внешних имён
через /etc/hosts и трансляция имени в наиболее подходящий клиенту IP-адрес,
если для имени определено несколько адресов из разных подсетей.

Dnsmasq не поддерживает пересылку DNS-зон и поэтому не может использоваться
в качестве авторитативного. Для этой цели вам понадобится PowerDNS или BIND.

%prep
%setup -q
%patch0
#patch1

%build
%make_build

%install
%__mkdir_p rpm
m4 -D%m4_macro %SOURCE1 > %init_script
install -pD -m700 src/dnsmasq        %buildroot%_sbindir/%name
install -pD -m744 %init_script       %buildroot%_initdir/%name
install -pD -m600 %SOURCE2           %buildroot%sysconfig_file
install -pD -m600 %name.conf.example %buildroot%_sysconfdir/%name.conf
install -pD -m444 man/%name.8        %buildroot%_man8dir/%name.8

%pre
# Upgrade configuration from previous versions
if egrep -q '^[^#]*ALL *=' %sysconfig_file; then
   if ! egrep -q '^[^#]*ALL_DEV *=' %sysconfig_file; then
echo 'NOTE: You should put ALL_DEV=<interface> to %sysconfig_file'
echo '      for keeping DHCP broadcasts mode.'
   fi
fi

%post
%post_service %name

%preun
%preun_service %name
%__rm -f %_sysconfdir/*.dnsmasq 2>&1   # fixme! should be more elegant..

%files
%doc CHANGELOG COPYING FAQ doc.html setup.html
%config(noreplace) %_sysconfdir/%name.conf
%config(noreplace) %_sysconfdir/sysconfig/%name
%_initdir/%name
%_sbindir/%name
%_man8dir/%{name}*
%doc contrib/dnslist contrib/dynamic-dnsmasq

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin