1###############################################################################
2#
3# General
4#
5###############################################################################
6
7Name: dnsmasq
8Version: 2.15
9Release: 1
10Copyright: GPL
11Group: Productivity/Networking/DNS/Servers
12Vendor: Simon Kelley
13Packager: Simon Kelley
14URL: http://www.thekelleys.org.uk/dnsmasq
15Provides: dns_daemon
16Conflicts: bind bind8 bind9
17PreReq: %fillup_prereq %insserv_prereq
18Autoreqprov: on
19Source0: %{name}-%{version}.tar.bz2
20BuildRoot: /var/tmp/%{name}-%{version}
21Summary: A lightweight caching nameserver
22
23%description
24Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. It 
25is designed to provide DNS and, optionally, DHCP, to a small network. It can
26serve the names of local machines which are not in the global DNS. The DHCP 
27server integrates with the DNS server and allows machines with DHCP-allocated
28addresses to appear in the DNS with names configured either in each host or 
29in a central configuration file. Dnsmasq supports static and dynamic DHCP 
30leases and BOOTP for network booting of diskless machines.
31
32
33
34###############################################################################
35#
36# Build
37#
38###############################################################################
39
40%prep
41%setup -q
42patch -p0 <rpm/%{name}-SuSE.patch
43
44%build
45%{?suse_update_config:%{suse_update_config -f}}
46make
47
48###############################################################################
49#
50# Install
51#
52###############################################################################
53
54%install
55rm -rf $RPM_BUILD_ROOT
56mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
57mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
58mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
59install -o root -g root -m 755 rpm/rc.dnsmasq-suse $RPM_BUILD_ROOT/etc/init.d/dnsmasq
60install -o root -g root -m 644 dnsmasq.conf.example $RPM_BUILD_ROOT/etc/dnsmasq.conf
61strip src/dnsmasq
62install -o root -g root -m 755 src/dnsmasq $RPM_BUILD_ROOT/usr/sbin
63ln -sf ../../etc/init.d/dnsmasq $RPM_BUILD_ROOT/usr/sbin/rcdnsmasq
64gzip -9 dnsmasq.8
65install -o root -g root -m 644 dnsmasq.8.gz $RPM_BUILD_ROOT%{_mandir}/man8
66
67###############################################################################
68#
69# Clean up
70#
71###############################################################################
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76###############################################################################
77#
78# Post-install scriptlet
79#
80###############################################################################
81
82%post
83%{fillup_and_insserv dnsmasq}
84
85###############################################################################
86#
87# Post-uninstall scriptlet
88#
89# The %postun script executes after the package has been removed. It is the
90# last chance for a package to clean up after itself.
91#
92###############################################################################
93
94%postun
95%{insserv_cleanup}
96
97###############################################################################
98#
99# File list
100#
101###############################################################################
102
103%files
104%defattr(-,root,root)
105%doc CHANGELOG COPYING FAQ doc.html setup.html UPGRADING_to_2.0 rpm/README.susefirewall
106%doc contrib
107%config /etc/init.d/dnsmasq
108%config /etc/dnsmasq.conf
109/usr/sbin/rcdnsmasq
110/usr/sbin/dnsmasq
111%doc %{_mandir}/man8/dnsmasq.8.gz
112
113
114
115