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