]> git.pld-linux.org Git - packages/dnsmasq.git/blobdiff - dnsmasq.spec
up to 2.90
[packages/dnsmasq.git] / dnsmasq.spec
index ff600b6939753f7016c4d4b4c406b359f7151b93..b4cb24c3c725585fd4c931a08421d249ab9f8fa3 100644 (file)
@@ -1,22 +1,35 @@
 # TODO:
 # - subpackage DNSmasq webmin module (contrib/webmin)
+#
+# Conditional build:
+%bcond_without dbus            # DBus interface
+%bcond_without idn             # IDN via libidn2
+%bcond_without conntrack       # conntrack support
+%bcond_without nftables        # nftables support
+%bcond_with    lua             # Lua support
 
 Summary:       A lightweight caching server (DNS, DHCP)
 Summary(pl.UTF-8):     Lekki buforujący serwer nazw (DNS) i DHCP
 Name:          dnsmasq
-Version:       2.73
+Version:       2.90
 Release:       1
 License:       GPL v2
 Group:         Networking/Daemons
-#Source0:      http://thekelleys.org.uk/dnsmasq/test-releases/%{name}-%{version}%{_rc}.tar.gz
-Source0:       http://thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.gz
-# Source0-md5: c2d56b11317336bc788ded4298642e2e
+# TODO:        http://thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.xz
+Source0:       https://thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.gz
+# Source0-md5: 23a767c3a6797d20492d06d352fd926b
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.service
 URL:           http://www.thekelleys.org.uk/dnsmasq/doc.html
+%{?with_dbus:BuildRequires:    dbus-devel}
 BuildRequires: gettext-tools
-BuildRequires: libidn-devel
+BuildRequires: gmp-devel
+%{?with_idn:BuildRequires:     libidn2-devel}
+%{?with_conntrack:BuildRequires:       libnetfilter_conntrack-devel}
+%{?with_lua:BuildRequires:     lua52-devel}
+BuildRequires: nettle-devel
+%{?with_nftables:BuildRequires:        nftables-devel}
 BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.671
 Requires(post,preun):  /sbin/chkconfig
@@ -26,6 +39,8 @@ Requires:     rc-scripts
 Provides:      caching-nameserver
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                copts   -DHAVE_DNSSEC%{?with_dbus: -DHAVE_DBUS}%{?with_idn: -DHAVE_LIBIDN2}%{?with_conntrack: -DHAVE_CONNTRACK}%{?with_lua: -DHAVE_LUASCRIPT}%{?with_nftables: -DHAVE_NFTSET}
+
 %description
 Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
 server. It is designed to provide DNS and, optionally, DHCP, to a
@@ -58,18 +73,20 @@ ale jest dobrym wyborem dla dowolnej małej sieci, gdzie ważne jest
 małe wykorzystanie zasobów i łatwa konfiguracja.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
 
 %build
 %{__make} all-i18n \
        CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -DHAVE_ISC_READER -D_GNU_SOURCE" \
+       CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_ISC_READER" \
+       LDFLAGS="%{rpmldflags}" \
+       COPTS="%{copts}" \
        PREFIX=%{_prefix}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/sysconfig,/etc/rc.d/init.d} \
-       $RPM_BUILD_ROOT{%{systemdunitdir},%{_mandir}/man8}
+install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/dbus-1/system.d,/etc/sysconfig,/etc/rc.d/init.d} \
+       $RPM_BUILD_ROOT{%{systemdunitdir},%{_mandir}/man8,%{_datadir}/dnsmasq}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dnsmasq
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dnsmasq
@@ -80,11 +97,18 @@ install contrib/port-forward/portforward $RPM_BUILD_ROOT%{_sysconfdir}
 
 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dnsmasq.service
 
+install -p trust-anchors.conf $RPM_BUILD_ROOT%{_datadir}/dnsmasq
+
 %{__make} install-i18n \
+       COPTS="%{copts}" \
        DESTDIR=$RPM_BUILD_ROOT \
        PREFIX=%{_prefix}
 
-mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{no,nb}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{no,nb}
+
+%if %{with dbus}
+cp -p dbus/dnsmasq.conf $RPM_BUILD_ROOT/etc/dbus-1/system.d/dnsmasq.conf
+%endif
 
 %find_lang %{name}
 
@@ -127,12 +151,16 @@ fi
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc CHANGELOG FAQ *.html contrib/{dnslist,dynamic-dnsmasq}
+%{?with_dbus:%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/dnsmasq.conf}
 %attr(754,root,root) /etc/rc.d/init.d/dnsmasq
 %{systemdunitdir}/dnsmasq.service
-%attr(755,root,root) %{_sbindir}/dnsmasq*
+%attr(755,root,root) %{_sbindir}/dnsmasq
+%attr(755,root,root) %{_sbindir}/dnsmasq-portforward
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dnsmasq
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dnsmasq.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/portforward
-%{_mandir}/man8/*
-%lang(es) %{_mandir}/es/man8/*
-%lang(fr) %{_mandir}/fr/man8/*
+%{_mandir}/man8/dnsmasq.8*
+%lang(es) %{_mandir}/es/man8/dnsmasq.8*
+%lang(fr) %{_mandir}/fr/man8/dnsmasq.8*
+%dir %{_datadir}/dnsmasq
+%{_datadir}/dnsmasq/trust-anchors.conf
This page took 0.068491 seconds and 4 git commands to generate.