1############################################################################### 2# 3# General mumbojumbo 4# 5############################################################################### 6 7Name: dnsmasq 8Version: 1.10 9Release: 1 10Copyright: GPL 11Provides: dns_daemon 12Group: System Environment/Daemons 13Vendor: N/A 14Packager: J�rg Mayer 15Distribution: SuSE Linux 7.3 16URL: http://www.thekelleys.org.uk/dnsmasq 17Source0: %{name}-%{version}.tar.gz 18BuildRoot: /var/tmp/%{name}-%{version} 19Summary: A lightweight caching nameserver 20 21%description 22Dnsmasq is lightweight, easy to configure DNS forwarder designed to provide 23DNS (domain name) services to a small network where using BIND would be 24overkill. It can be have its DNS servers automatically configured by PPP 25or DHCP, and it can serve the names of local machines which are not in the 26global DNS. It is ideal for networks behind NAT routers and connected via 27modem, ISDN, ADSL, or cable-modem connections. 28 29 30############################################################################### 31# 32# Build 33# 34############################################################################### 35 36%prep 37%setup -q 38%build 39make 40 41 42############################################################################### 43# 44# Install 45# 46############################################################################### 47 48%install 49rm -rf $RPM_BUILD_ROOT 50 51mkdir -p -m 755 $RPM_BUILD_ROOT%{_sbindir} 52mkdir -p -m 755 $RPM_BUILD_ROOT/etc/init.d 53mkdir -p -m 755 $RPM_BUILD_ROOT%{_mandir}/man8 54mkdir -p -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates 55 56cp rc.config.dnsmasq $RPM_BUILD_ROOT/var/adm/fillup-templates/rc.config.dnsmasq 57cp dnsmasq.suse $RPM_BUILD_ROOT/etc/init.d/dnsmasq 58strip dnsmasq 59cp dnsmasq $RPM_BUILD_ROOT%{_sbindir} 60cp dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8 61gzip -9 $RPM_BUILD_ROOT%{_mandir}/man8/dnsmasq.8 62ln -s /etc/init.d/dnsmasq $RPM_BUILD_ROOT%{_sbindir}/rcdnsmasq 63 64############################################################################### 65# 66# Clean up 67# 68############################################################################### 69 70%clean 71rm -rf $RPM_BUILD_ROOT 72 73 74############################################################################### 75# 76# Post-install scriptlet 77# 78############################################################################### 79 80%post 81echo "Updating etc/rc.config..." 82if [ -x bin/fillup ] ; then 83 bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.dnsmasq 84else 85 echo "ERROR: fillup not found. This should not happen. Please compare" 86 echo "etc/rc.config and var/adm/fillup-templates/rc.config.dnsmasq and" 87 echo "update by hand." 88fi 89sbin/insserv dnsmasq 90 91 92############################################################################### 93# 94# Pre-uninstall scriptlet 95# 96# If there's a time when your package needs to have one last look around before 97# the user erases it, the place to do it is in the %preun script. Anything that 98# a package needs to do immediately prior to RPM taking any action to erase the 99# package, can be done here. 100# 101############################################################################### 102 103%preun 104if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade 105 %{_sbindir}rcdnsmasq stop >/dev/null 2>&1 106 sbin/insserv -d dnsmasq 107fi 108 109 110############################################################################### 111# 112# Post-uninstall scriptlet 113# 114# The %postun script executes after the package has been removed. It is the 115# last chance for a package to clean up after itself. 116# 117############################################################################### 118 119#%postun 120#if [ "$1" -ge "1" ]; then 121# rcdnsmasq restart >/dev/null 2>&1 122#fi 123 124 125############################################################################### 126# 127# File list 128# 129############################################################################### 130 131%files 132%defattr(-,root,root) 133%doc CHANGELOG COPYING doc.html setup.html 134%config(noreplace) %attr(0755,root,root) /etc/init.d/dnsmasq 135%attr(0755,root,root) %{_sbindir}/dnsmasq 136%attr(0755,root,root) %{_sbindir}/rcdnsmasq 137%attr(0644,root,root) %{_mandir}/man8/dnsmasq.8.gz 138%attr(0644,root,root) /var/adm/fillup-templates/rc.config.dnsmasq 139 140%changelog 141* Mon Nov 11 2001 - jmayer@loplof.de 142- Initial rpm for use with SuSE (7.3) 143 144