]> git.pld-linux.org Git - packages/dnsmasq.git/blobdiff - dnsmasq.spec
- 2.31
[packages/dnsmasq.git] / dnsmasq.spec
index 3100e17642ee94837fb5b4076a461ea79c731841..07006e6f3c7c9dbfa5e4eb1e9e738434a4b45645 100644 (file)
@@ -1,17 +1,20 @@
 Summary:       A lightweight caching nameserver
 Summary(pl):   Lekki buforuj±cy serwer nazw (DNS)
 Name:          dnsmasq
-Version:       2.7
+Version:       2.31
 Release:       1
 License:       GPL
 Group:         Networking/Daemons
 Source0:       http://thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.gz
-# Source0-md5: f526e81e11627177e9949b72d5424f7a
+# Source0-md5: 26932aec55865b5b4ffe53e7abcf9396
 Source1:       %{name}.init
 Source2:       %{name}.config
+Patch0:                %{name}-sh.patch
 URL:           http://www.thekelleys.org.uk/dnsmasq/
-PreReq:                rc-scripts
-Requires(post,postun): /sbin/chkconfig
+BuildRequires: gettext-devel
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 Provides:      caching-nameserver
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -25,7 +28,7 @@ behind NAT routers and connected via modem, ISDN, ADSL, or cable-modem
 connections.
 
 %description -l pl
-Dnsmasq jest lekkim, ³atwym do konfiguracji forwarderem DNS
+Dnsmasq jest lekkim, ³atwym w konfiguracji forwarderem DNS
 zaprojektowanym do serwowania us³ugi DNS dla ma³ych sieci, gdzie
 u¿ywanie BIND by³oby przesad±. Zewnêtrzne serwery DNS mog± byæ
 automatycznie konfigurowane przez PPP lub DHCP. Mo¿e on serwowaæ tak¿e
@@ -35,44 +38,46 @@ po
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-%{__make} \
-       CC=%{__cc} \
-       CFLAGS="%{rpmcflags}"
+%{__make} all-i18n \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags} -DHAVE_ISC_READER" \
+       PREFIX=%{_prefix}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/sysconfig,/etc/rc.d/init.d,%{_mandir}/man8}
 
-install %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/dnsmasq
-install %SOURCE2 $RPM_BUILD_ROOT/etc/sysconfig/dnsmasq
-install src/dnsmasq $RPM_BUILD_ROOT%{_sbindir}
-install dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dnsmasq
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dnsmasq
+install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf
+
+%{__make} install-i18n \
+       DESTDIR=$RPM_BUILD_ROOT \
+       PREFIX=%{_prefix}
+
+%find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add dnsmasq
-if [ -f %{_localstatedir}/lock/subsys/dnsmasq ]; then
-       /etc/rc.d/init.d/dnsmasq restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/dnsmasq start\" to start dnsmasq." >&2
-fi
+%service dnsmasq restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f %{_localstatedir}/lock/subsys/dnsmasq ]; then
-               /etc/rc.d/init.d/dnsmasq stop
-       fi
+       %service dnsmasq stop
        /sbin/chkconfig --del dnsmasq
 fi
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc CHANGELOG FAQ *.html
 %attr(754,root,root) /etc/rc.d/init.d/dnsmasq
 %attr(755,root,root) %{_sbindir}/dnsmasq
-%config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/dnsmasq
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dnsmasq
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dnsmasq.conf
 %{_mandir}/man8/*
This page took 0.804783 seconds and 4 git commands to generate.