zbyszek / rpms / dnsmasq

Forked from rpms/dnsmasq 6 years ago
Clone
b0365fb
Name:           dnsmasq
9877aaa
Version:        2.38
d0923ed
Release:        1%{?dist}
b0365fb
Summary:        A lightweight DHCP/caching DNS server
b0365fb
b0365fb
Group:          System Environment/Daemons
b0365fb
License:        GPL
b0365fb
URL:            http://www.thekelleys.org.uk/dnsmasq/
b0365fb
Source0:        http://www.thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.gz
c99b31e
Patch0:         http://beer.tclug.org/fedora-extras/dnsmasq/%{name}-2.33-initscript.patch
c99b31e
Patch1:         http://beer.tclug.org/fedora-extras/dnsmasq/%{name}-2.33-enable-dbus.patch
fe55c77
Patch2:         http://beer.tclug.org/fedora-extras/dnsmasq/%{name}-2.35-conf-dir.patch
b0365fb
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b0365fb
bc74c1b
%if "%fedora" > "3" || "%aurora" > "2"
b0365fb
BuildRequires:  dbus-devel
9433ece
%endif
b0365fb
c81c9a2
BuildRequires:  pkgconfig
cc527ef
c81c9a2
Requires(post):  /sbin/chkconfig
b0365fb
Requires(post):  /sbin/service
b0365fb
Requires(preun): /sbin/chkconfig
b0365fb
Requires(preun): /sbin/service
b0365fb
b0365fb
%description
b0365fb
Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. 
b0365fb
It is designed to provide DNS and, optionally, DHCP, to a small network. 
b0365fb
It can serve the names of local machines which are not in the global 
b0365fb
DNS. The DHCP server integrates with the DNS server and allows machines 
b0365fb
with DHCP-allocated addresses to appear in the DNS with names configured 
b0365fb
either in each host or in a central configuration file. Dnsmasq supports 
b0365fb
static and dynamic DHCP leases and BOOTP for network booting of diskless 
b0365fb
machines.
b0365fb
b0365fb
b0365fb
%prep
b0365fb
%setup -q
5275092
%patch0 -p1
bc74c1b
%if "%fedora" > "3" || "%aurora" > "2"
5275092
%patch1 -p1
9433ece
%endif
fe55c77
%patch2 -p1
b0365fb
b0365fb
%build
b0365fb
make %{?_smp_mflags}
b0365fb
b0365fb
b0365fb
%install
b0365fb
rm -rf $RPM_BUILD_ROOT
b0365fb
# normally i'd do 'make install'...it's a bit messy, though
b0365fb
mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_initrddir} \
c81c9a2
        $RPM_BUILD_ROOT%{_mandir}/man8 \
fe55c77
        $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.d \
c81c9a2
        $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d
b0365fb
install src/dnsmasq $RPM_BUILD_ROOT%{_sbindir}/dnsmasq
b0365fb
install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf
bc74c1b
%if "%fedora" > "3" || "%aurora" > "2"
aa950b3
install dbus/dnsmasq.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/
60068e4
%endif
60068e4
install rpm/dnsmasq.init $RPM_BUILD_ROOT%{_initrddir}/dnsmasq
b0365fb
install man/dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8/
b0365fb
b0365fb
%clean
b0365fb
rm -rf $RPM_BUILD_ROOT
b0365fb
b0365fb
%post
67f02bc
if [ "$1" = "2" ]; then # if we're being upgraded
67f02bc
    /sbin/service dnsmasq condrestart >/dev/null 2>&1 || :
67f02bc
else # if we're being installed
67f02bc
    /sbin/chkconfig --add dnsmasq
67f02bc
fi
b0365fb
b0365fb
%preun
67f02bc
if [ "$1" = "0" ]; then     # execute this only if we are NOT doing an upgrade
67f02bc
    /sbin/service dnsmasq stop >/dev/null 2>&1 || :
b0365fb
    /sbin/chkconfig --del dnsmasq
b0365fb
fi
b0365fb
b0365fb
b0365fb
%files
b0365fb
%defattr(-,root,root,-)
fe55c77
%doc CHANGELOG COPYING FAQ doc.html setup.html dbus/DBus-interface
aa950b3
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnsmasq.conf
fe55c77
%dir /etc/dnsmasq.d
bc74c1b
%if "%fedora" > "3" || "%aurora" > "2"
aa950b3
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
60068e4
%endif
b0365fb
%{_initrddir}/dnsmasq
b0365fb
%{_sbindir}/dnsmasq
b0365fb
%{_mandir}/man8/dnsmasq*
b0365fb
b0365fb
b0365fb
%changelog
9877aaa
* Mon Feb 12 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.38-1
9877aaa
- New upstream version with bugfix for potential hang
9877aaa
d0923ed
* Tue Feb 06 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.37-1
d0923ed
- New upstream version
d0923ed
d0923ed
* Wed Jan 24 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.36-1
d0923ed
- New upstream version
d0923ed
fe55c77
* Mon Nov 06 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.35-2
fe55c77
- Stop creating /etc/sysconfig on %%install
fe55c77
- Create /etc/dnsmasq.d on %%install
fe55c77
fe55c77
* Mon Nov 06 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.35-1
fe55c77
- Update to 2.35
fe55c77
- Removed UPGRADING_to_2.0 from %%doc as per upstream change
fe55c77
- Enabled conf-dir in default config as per RFE BZ#214220 (thanks Chris!)
fe55c77
- Added %%dir /etc/dnsmasq.d to %%files as per above RFE
fe55c77
67f02bc
* Tue Oct 24 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.34-2
67f02bc
- Fixed BZ#212005
67f02bc
- Moved %%postun scriptlet to %%post, where it made more sense
67f02bc
- Render scriptlets safer
67f02bc
- Minor cleanup for consistency
67f02bc
c99b31e
* Thu Oct 19 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.34-1
c99b31e
- Hardcoded version in patches, as I'm getting tired of updating them
c99b31e
- Update to 2.34
c99b31e
507262e
* Mon Aug 28 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.33-2
507262e
- Rebuild for FC6
507262e
c81c9a2
* Tue Aug 15 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.33-1
c81c9a2
- Update
c81c9a2
cc527ef
* Sat Jul 22 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.32-3
cc527ef
- Added pkgconfig BuildReq due to reduced buildroot
cc527ef
b3b82db
* Thu Jul 20 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.32-2
b3b82db
- Forced update due to dbus version bump
b3b82db
bc74c1b
* Mon Jun 12 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.32-1
bc74c1b
- Update from upstream
bc74c1b
- Patch from Dennis Gilmore fixed the conditionals to detect Aurora Linux
bc74c1b
60068e4
* Mon May  8 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.31-1
60068e4
- Removed dbus config patch (now provided upstream)
60068e4
- Patched in init script (no longer provided upstream)
60068e4
- Added DBus-interface to docs
60068e4
5275092
* Tue May  2 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-4.2
00482dd
- More upstream-recommended cleanups :)
00482dd
- Killed sysconfig file (provides unneeded functionality)
00482dd
- Tweaked init script a little more
00482dd
aa950b3
* Tue May  2 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-4
aa950b3
- Moved options out of init script and into /etc/sysconfig/dnsmasq
aa950b3
- Disabled DHCP_LEASE in sysconfig file, fixing bug #190379
aa950b3
- Simon Kelley provided dbus/dnsmasq.conf, soon to be part of the tarball
aa950b3
9433ece
* Thu Apr 27 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-3
9433ece
- Un-enabled HAVE_ISC_READER, a hack to enable a deprecated feature (request)
9433ece
- Split initscript & enable-dbus patches, conditionalized dbus for FC3
9433ece
- Tweaked name field in changelog entries (trying to be consistent)
9433ece
9433ece
* Mon Apr 24 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-2
b0365fb
- Disabled stripping of binary while installing (oops)
b0365fb
- Enabled HAVE_ISC_READER/HAVE_DBUS via patch
b0365fb
- Added BuildReq for dbus-devel
b0365fb
9433ece
* Mon Apr 24 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-1
b0365fb
- Initial Fedora Extras RPM