]> git.pld-linux.org Git - packages/dnsmasq.git/blobdiff - dnsmasq.spec
up to 2.73
[packages/dnsmasq.git] / dnsmasq.spec
index 850871fc84abe5a73ba1b51b931a5e406613a309..ff600b6939753f7016c4d4b4c406b359f7151b93 100644 (file)
@@ -1,28 +1,34 @@
 # TODO:
 # - subpackage DNSmasq webmin module (contrib/webmin)
 # TODO:
 # - subpackage DNSmasq webmin module (contrib/webmin)
-#
+
 Summary:       A lightweight caching server (DNS, DHCP)
 Summary(pl.UTF-8):     Lekki buforujący serwer nazw (DNS) i DHCP
 Name:          dnsmasq
 Summary:       A lightweight caching server (DNS, DHCP)
 Summary(pl.UTF-8):     Lekki buforujący serwer nazw (DNS) i DHCP
 Name:          dnsmasq
-Version:       2.47
+Version:       2.73
 Release:       1
 License:       GPL v2
 Group:         Networking/Daemons
 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:       http://thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.gz
-# Source0-md5: 4524081e56d0b935717d493e8e8d3e11
+# Source0-md5: c2d56b11317336bc788ded4298642e2e
 Source1:       %{name}.init
 Source1:       %{name}.init
-Source2:       %{name}.config
+Source2:       %{name}.sysconfig
+Source3:       %{name}.service
 URL:           http://www.thekelleys.org.uk/dnsmasq/doc.html
 URL:           http://www.thekelleys.org.uk/dnsmasq/doc.html
-BuildRequires: gettext-devel
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: gettext-tools
+BuildRequires: libidn-devel
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.671
 Requires(post,preun):  /sbin/chkconfig
 Requires(post,preun):  /sbin/chkconfig
+Requires(post,preun,postun):   systemd-units >= 38
+Requires:      systemd-units >= 38
 Requires:      rc-scripts
 Provides:      caching-nameserver
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
 Requires:      rc-scripts
 Provides:      caching-nameserver
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
-server.  It is designed to provide DNS and, optionally, DHCP, to a
+server. It is designed to provide DNS and, optionally, DHCP, to a
 small network. It can serve the names of local machines which are not
 in the global DNS. The DHCP server integrates with the DNS server and
 allows machines with DHCP-allocated addresses to appear in the DNS
 small network. It can serve the names of local machines which are not
 in the global DNS. The DHCP server integrates with the DNS server and
 allows machines with DHCP-allocated addresses to appear in the DNS
@@ -33,7 +39,7 @@ and BOOTP for network booting of diskless machines.
 Dnsmasq is targeted at home networks using NAT and connected to the
 Internet via a modem, cable-modem or ADSL connection but would be a
 good choice for any small network where low resource use and ease of
 Dnsmasq is targeted at home networks using NAT and connected to the
 Internet via a modem, cable-modem or ADSL connection but would be a
 good choice for any small network where low resource use and ease of
-configuration are important. 
+configuration are important.
 
 %description -l pl.UTF-8
 dnsmasq jest lekkim, łatwym w konfiguracji forwarderem DNS i serwerem
 
 %description -l pl.UTF-8
 dnsmasq jest lekkim, łatwym w konfiguracji forwarderem DNS i serwerem
@@ -52,7 +58,7 @@ ale jest dobrym wyborem dla dowolnej małej sieci, gdzie ważne jest
 małe wykorzystanie zasobów i łatwa konfiguracja.
 
 %prep
 małe wykorzystanie zasobów i łatwa konfiguracja.
 
 %prep
-%setup -q
+%setup -q -n %{name}-%{version}
 
 %build
 %{__make} all-i18n \
 
 %build
 %{__make} all-i18n \
@@ -62,7 +68,8 @@ małe wykorzystanie zasobów i łatwa konfiguracja.
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/sysconfig,/etc/rc.d/init.d,%{_mandir}/man8}
+install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/sysconfig,/etc/rc.d/init.d} \
+       $RPM_BUILD_ROOT{%{systemdunitdir},%{_mandir}/man8}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dnsmasq
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dnsmasq
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dnsmasq
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dnsmasq
@@ -71,6 +78,8 @@ install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf
 install contrib/port-forward/dnsmasq-portforward $RPM_BUILD_ROOT%{_sbindir}
 install contrib/port-forward/portforward $RPM_BUILD_ROOT%{_sysconfdir}
 
 install contrib/port-forward/dnsmasq-portforward $RPM_BUILD_ROOT%{_sbindir}
 install contrib/port-forward/portforward $RPM_BUILD_ROOT%{_sysconfdir}
 
+install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dnsmasq.service
+
 %{__make} install-i18n \
        DESTDIR=$RPM_BUILD_ROOT \
        PREFIX=%{_prefix}
 %{__make} install-i18n \
        DESTDIR=$RPM_BUILD_ROOT \
        PREFIX=%{_prefix}
@@ -85,21 +94,45 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add dnsmasq
 %service dnsmasq restart
 %post
 /sbin/chkconfig --add dnsmasq
 %service dnsmasq restart
+%systemd_post dnsmasq.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service dnsmasq stop
        /sbin/chkconfig --del dnsmasq
 fi
 
 %preun
 if [ "$1" = "0" ]; then
        %service dnsmasq stop
        /sbin/chkconfig --del dnsmasq
 fi
+%systemd_preun dnsmasq.service
+
+%postun
+%systemd_reload
+
+%triggerpostun -- dnsmasq < 2.68-1.1
+if [ -f /etc/sysconfig/dnsmasq ]; then
+       __OPT=
+       . /etc/sysconfig/dnsmasq
+       [ -n "$MAILHOSTNAME" ] &&  __OPT="-m $MAILHOSTNAME"
+       [ -n "$RESOLV_CONF" ] && __OPT="$__OPT -r $RESOLV_CONF"
+       [ -n "$DHCP_LEASE" ] && __OPT="$__OPT -l $DHCP_LEASE"
+       [ -n "$DOMAIN_SUFFIX" ] && __OPT="$__OPT -s $DOMAIN_SUFFIX"
+       [ -n "$INTERFACE" ] && __OPT="$__OPT -i $INTERFACE"
+       if [ -n "$__OPT" ]; then
+               %{__cp} -f /etc/sysconfig/dnsmasq{,.rpmsave}
+               echo >>/etc/sysconfig/dnsmasq
+               echo "# Added by rpm trigger" >>/etc/sysconfig/dnsmasq
+               echo "OPTIONS=\"$OPTIONS $__OPT\"" >>/etc/sysconfig/dnsmasq
+       fi
+fi
+%systemd_trigger dnsmasq.service
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc CHANGELOG FAQ *.html contrib/{dnslist,dynamic-dnsmasq}
 %attr(754,root,root) /etc/rc.d/init.d/dnsmasq
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc CHANGELOG FAQ *.html contrib/{dnslist,dynamic-dnsmasq}
 %attr(754,root,root) /etc/rc.d/init.d/dnsmasq
+%{systemdunitdir}/dnsmasq.service
 %attr(755,root,root) %{_sbindir}/dnsmasq*
 %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/*
 %attr(755,root,root) %{_sbindir}/dnsmasq*
 %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/* 
+%lang(es) %{_mandir}/es/man8/*
+%lang(fr) %{_mandir}/fr/man8/*
This page took 0.086979 seconds and 4 git commands to generate.