2007-01-16 00:10:19 +01:00
|
|
|
#
|
2011-05-05 10:40:27 +02:00
|
|
|
# spec file for package dnsmasq
|
2007-01-16 00:10:19 +01:00
|
|
|
#
|
2012-01-19 16:28:49 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:10:19 +01:00
|
|
|
#
|
2008-08-15 23:07:27 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:10:19 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: dnsmasq
|
|
|
|
Summary: Lightweight, Easy-to-Configure DNS Forwarder and DHCP Server
|
2012-02-07 16:24:59 +01:00
|
|
|
License: GPL-2.0+
|
2007-01-16 00:10:19 +01:00
|
|
|
Group: Productivity/Networking/DNS/Servers
|
2012-06-28 08:18:18 +02:00
|
|
|
Version: 2.62
|
2012-02-07 16:24:59 +01:00
|
|
|
Release: 0
|
2007-01-16 00:10:19 +01:00
|
|
|
Provides: dns_daemon
|
2008-11-11 15:29:31 +01:00
|
|
|
PreReq: /usr/sbin/useradd %fillup_prereq %insserv_prereq /bin/mkdir
|
2007-12-06 17:48:32 +01:00
|
|
|
Url: http://www.thekelleys.org.uk/dnsmasq/
|
2012-04-30 13:58:32 +02:00
|
|
|
Source: http://www.thekelleys.org.uk/dnsmasq/dnsmasq-%{version}.tar.gz
|
2007-01-16 00:10:19 +01:00
|
|
|
Source1: vendor-files.tar.bz2
|
2011-11-25 12:00:57 +01:00
|
|
|
Source2: dnsmasq.service
|
2009-03-12 15:25:37 +01:00
|
|
|
Patch1: group_and_isc.diff
|
2007-01-16 00:10:19 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-02-07 16:24:59 +01:00
|
|
|
BuildRequires: dbus-1-devel
|
|
|
|
BuildRequires: libidn
|
|
|
|
BuildRequires: libidn-devel
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: systemd
|
2012-06-28 08:18:18 +02:00
|
|
|
BuildRequires: pkgconfig(libnetfilter_conntrack)
|
|
|
|
|
2012-02-07 16:24:59 +01:00
|
|
|
%{?systemd_requires}
|
2007-01-16 00:10:19 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Dnsmasq is a lightweight, easy-to-configure DNS forwarder and DHCP
|
|
|
|
server. It is designed to provide DNS and, optionally, DHCP, to a small
|
|
|
|
network. It can serve the names of local machines that are not in the
|
|
|
|
global DNS. The DHCP server integrates with the DNS server and allows
|
|
|
|
machines with DHCP-allocated addresses to appear in DNS with names
|
|
|
|
configured either in each host or in a central configuration file.
|
|
|
|
Dnsmasq supports static and dynamic DHCP leases and BOOTP for network
|
|
|
|
booting of diskless machines.
|
|
|
|
|
|
|
|
%prep
|
2012-06-28 08:18:18 +02:00
|
|
|
%setup -q -n dnsmasq-%{version}
|
|
|
|
%setup -q -T -D -a1 -n dnsmasq-%{version}
|
2007-01-16 00:10:19 +01:00
|
|
|
%patch1 -p0
|
|
|
|
|
|
|
|
%build
|
2012-06-28 08:18:18 +02:00
|
|
|
echo "#define HAVE_DBUS" >> src/config.h
|
|
|
|
echo "#define HAVE_CONNTRACK" >> src/config.h
|
|
|
|
echo "#define HAVE_IDN" >> src/config.h
|
2007-01-16 00:10:19 +01:00
|
|
|
mv po/no.po po/nb.po
|
2012-06-28 08:18:18 +02:00
|
|
|
export CFLAGS="%optflags -std=gnu99 -fPIC -DPIC -fpie"
|
2012-02-07 16:24:59 +01:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
2011-09-29 13:46:33 +02:00
|
|
|
make %{?_smp_mflags} AWK=gawk all-i18n
|
2007-01-16 00:10:19 +01:00
|
|
|
|
2008-06-23 21:00:42 +02:00
|
|
|
%pre
|
2012-02-08 17:00:07 +01:00
|
|
|
if ! /usr/bin/getent group tftp >/dev/null; then
|
|
|
|
%{_sbindir}/groupadd -r tftp 2>/dev/null || :
|
|
|
|
fi
|
2012-02-08 17:16:51 +01:00
|
|
|
if ! /usr/bin/getent passwd tftp >/dev/null; then
|
|
|
|
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
|
|
|
|
-r -s /bin/false tftp 2>/dev/null || :
|
|
|
|
fi
|
2008-06-23 21:00:42 +02:00
|
|
|
if ! /usr/bin/getent passwd dnsmasq >/dev/null; then
|
2012-02-08 17:00:07 +01:00
|
|
|
/usr/sbin/useradd -r -d /var/lib/empty -s /bin/false -c "dnsmasq" -g nogroup -G tftp dnsmasq || :
|
2008-06-23 21:00:42 +02:00
|
|
|
fi
|
2012-02-08 17:00:07 +01:00
|
|
|
|
2012-02-07 16:24:59 +01:00
|
|
|
%service_add_pre %{name}.service
|
2012-02-08 17:00:07 +01:00
|
|
|
|
2007-01-16 00:10:19 +01:00
|
|
|
%post
|
|
|
|
%{fillup_and_insserv dnsmasq}
|
2012-02-07 16:24:59 +01:00
|
|
|
%service_add_post %{name}.service
|
2012-02-08 17:00:07 +01:00
|
|
|
|
2007-01-16 00:10:19 +01:00
|
|
|
%preun
|
|
|
|
%stop_on_removal dnsmasq
|
2012-02-07 16:24:59 +01:00
|
|
|
%service_del_preun %{name}.service
|
2012-02-08 17:00:07 +01:00
|
|
|
|
2007-01-16 00:10:19 +01:00
|
|
|
%postun
|
|
|
|
%restart_on_update dnsmasq
|
|
|
|
%{insserv_cleanup}
|
2012-02-07 16:24:59 +01:00
|
|
|
%service_del_postun %{name}.service
|
2007-01-16 00:10:19 +01:00
|
|
|
|
|
|
|
%install
|
2009-03-12 15:25:37 +01:00
|
|
|
make install-i18n DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr AWK=gawk
|
2007-01-16 00:10:19 +01:00
|
|
|
install -d -m 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d
|
|
|
|
install -d -m 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.d
|
2007-03-06 17:48:16 +01:00
|
|
|
install -d -m 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
|
2007-01-16 00:10:19 +01:00
|
|
|
install -m 755 rc.dnsmasq-suse $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/dnsmasq
|
|
|
|
ln -sf ../../etc/init.d/dnsmasq $RPM_BUILD_ROOT/usr/sbin/rcdnsmasq
|
|
|
|
install -m 644 dnsmasq.conf.example $RPM_BUILD_ROOT/%{_sysconfdir}/dnsmasq.conf
|
|
|
|
install -m 644 dnsmasq.reg $RPM_BUILD_ROOT/%{_sysconfdir}/slp.reg.d/
|
2007-03-15 18:09:15 +01:00
|
|
|
install -m 644 SuSEFirewall.dnsmasq-dns ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dns
|
|
|
|
install -m 644 SuSEFirewall.dnsmasq-dhcp ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dhcp
|
2009-03-12 15:25:37 +01:00
|
|
|
install -d 755 ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/
|
|
|
|
install -m 644 dbus/dnsmasq.conf ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/dnsmasq.conf
|
2011-11-25 12:00:57 +01:00
|
|
|
install -D -m 0644 %SOURCE2 %{buildroot}/lib/systemd/system/dnsmasq.service
|
2012-02-08 17:00:07 +01:00
|
|
|
install -d -m 0750 ${RPM_BUILD_ROOT}/srv/tftpboot
|
2012-06-28 08:18:18 +02:00
|
|
|
%find_lang %{name} --with-man
|
2007-01-16 00:10:19 +01:00
|
|
|
|
2008-01-07 02:45:31 +01:00
|
|
|
%files -f %{name}.lang
|
2007-01-16 00:10:19 +01:00
|
|
|
%defattr(-,root,root)
|
2009-03-17 17:01:53 +01:00
|
|
|
%doc CHANGELOG COPYING FAQ doc.html setup.html dnsmasq.conf.example contrib README.SUSE dbus
|
2012-06-28 08:18:18 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/dnsmasq.conf
|
2008-01-07 02:45:31 +01:00
|
|
|
%{_sysconfdir}/init.d/dnsmasq
|
|
|
|
%{_sbindir}/rcdnsmasq
|
|
|
|
%{_sbindir}/dnsmasq
|
2008-09-13 03:47:51 +02:00
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dns
|
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dhcp
|
|
|
|
%dir %{_sysconfdir}/slp.reg.d/
|
|
|
|
%config %attr(0644,root,root) /%{_sysconfdir}/slp.reg.d/dnsmasq.reg
|
2008-01-07 02:45:31 +01:00
|
|
|
%{_mandir}/man8/dnsmasq.8.gz
|
2009-03-12 15:25:37 +01:00
|
|
|
/etc/dbus-1/system.d/dnsmasq.conf
|
2011-11-25 12:00:57 +01:00
|
|
|
/lib/systemd/system/dnsmasq.service
|
2012-02-08 17:00:07 +01:00
|
|
|
%dir %attr(0750,root,tftp) /srv/tftpboot
|
2007-01-16 00:10:19 +01:00
|
|
|
|
2007-03-06 17:48:16 +01:00
|
|
|
%changelog
|