1 ###############################################################################
5 ###############################################################################
11 Group: System Environment
/Daemons
13 Packager: Simon Kelley
14 Distribution: Red Hat Linux
15 URL: http
://www.thekelleys.org.uk
/dnsmasq
16 Source0: %{name}-%{version}.tar.gz
18 BuildRoot: /var
/tmp
/%{name}-%{version}
19 Summary: A lightweight caching nameserver
22 Dnsmasq is lightweight
, easy to configure DNS forwarder and DHCP server. It
23 is designed to provide DNS and
, optionally
, DHCP
, to a small network. It can
24 serve the names of
local machines which are not
in the global DNS. The DHCP
25 server integrates with the DNS server and allows machines with DHCP
-allocated
26 addresses to appear
in the DNS with names configured either
in each host or
27 in a central configuration file. Dnsmasq supports static and dynamic DHCP
28 leases and BOOTP
for network booting of diskless machines.
32 ###############################################################################
36 ###############################################################################
44 ###############################################################################
48 ###############################################################################
51 rm -rf $RPM_BUILD_ROOT
53 mkdir -p
-m
755 $RPM_BUILD_ROOT
/usr
/sbin
54 mkdir -p
-m
755 $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
55 mkdir -p
-m
755 $RPM_BUILD_ROOT
/usr
/share
/man
/man8
57 cp rpm
/dnsmasq.rh $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
/dnsmasq
59 cp src
/dnsmasq $RPM_BUILD_ROOT
/usr
/sbin
60 cp dnsmasq
.8 $RPM_BUILD_ROOT
/usr
/share
/man
/man8
61 gzip $RPM_BUILD_ROOT
/usr
/share
/man
/man8
/dnsmasq
.8
62 cp dnsmasq.conf.example $RPM_BUILD_ROOT
/etc
/dnsmasq.conf
64 ###############################################################################
68 ###############################################################################
71 rm -rf $RPM_BUILD_ROOT
74 ###############################################################################
76 # Post-install scriptlet
78 ###############################################################################
81 /sbin
/chkconfig
--add dnsmasq
84 ###############################################################################
86 # Pre-uninstall scriptlet
88 # If there's a time when your package needs to have one last look around before
89 # the user erases it, the place to do it is in the %preun script. Anything that
90 # a package needs to do immediately prior to RPM taking any action to erase the
91 # package, can be done here.
93 ###############################################################################
96 if [ $
1 = 0 ]; then # execute this only if we are NOT doing an upgrade
97 service dnsmasq stop
>/dev
/null
2>&1
98 /sbin
/chkconfig
--del dnsmasq
102 ###############################################################################
104 # Post-uninstall scriptlet
106 # The %postun script executes after the package has been removed. It is the
107 # last chance for a package to clean up after itself.
109 ###############################################################################
112 if [ "$
1"
-ge "
1"
]; then
113 service dnsmasq restart
>/dev
/null
2>&1
117 ###############################################################################
121 ###############################################################################
124 %defattr(-,root
,root
)
125 %doc CHANGELOG COPYING FAQ doc.html setup.html UPGRADING_to_2.0
126 %config /etc
/rc.d
/init.d
/dnsmasq
127 %config /etc
/dnsmasq.conf
128 %attr(0755,root
,root
) /etc
/rc.d
/init.d
/dnsmasq
129 %attr(0664,root
,root
) /etc
/dnsmasq.conf
130 %attr(0755,root
,root
) /usr
/sbin
/dnsmasq
131 %attr(0644,root
,root
) /usr
/share
/man
/man8
/dnsmasq
.8.gz