Sisyphus repository
Last update: 6 june 2023 | SRPMs: 18458 | Visits: 27949874
en ru br
ALT Linux repos
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.22

# Handle initscript style change between ALTLinux Master 2.2

# (classic RedHat initscripts with daemon and killproc functions)
# and ALTLinux Master 2.4 (start_daemon and stop_daemon functions).
# Build for M22 works well under M24, but cannot be delivered
# to official ALTLinux Sisyphus repository.

%define dist_tag %nil

%if_with Master22
%define dist_tag master22

%if_with Master24
%define dist_tag master24

%if "%dist_tag" == ""
%if "%(test -e %_initdir/functions-compat && echo M24)" == ""
%define dist_tag master22
%define dist_tag master24

%if "%dist_tag" == "master22"
%define release_tag .M22
%define m4_macro M22
%define service_pkg initscripts
%define release_tag %nil
%define m4_macro M24
%define service_pkg service

Release: alt2%release_tag
Summary: A lightweight caching nameserver
Copyright: GPL
Group: System/Servers
Source0: %url/%name-%version.tar.gz
Source1: %name.init.m4
Source2: %name.sysconfig
Patch0: %name.conf.patch
Patch1: %name-2.21-alt-includes.patch
Requires: %service_pkg
BuildPreReq: m4
# 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 для локальных сетей

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,
разработанный для использования в небольших сетях.

%setup -q


echo Initialization script style: %dist_tag
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 %name.8            %buildroot%_man8dir/%name.8

# 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.'

%post_service %name

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

%doc CHANGELOG COPYING FAQ doc.html setup.html UPGRADING_to_2.0
%config(noreplace) %_sysconfdir/%name.conf
%config(noreplace) %_sysconfdir/sysconfig/%name


Full changelog you can see here

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