Summary(pl): Narzêdzie do dynamicznych adresów IP
Summary(pt_BR): Cliente para atualizar entradas DNS dinâmicas no DynDNS.org
Name: ddclient
-Epoch: 1
-Version: 3.6.3
+Version: 3.7.0
Release: 1
+Epoch: 1
+License: GPL v2
Group: Networking
-License: GPL
-Source0: http://members.rogers.com/ddclient/pub/%{name}-%{version}.tar.gz
-# Source0-md5: 1773aaf469a1faddd3f20d485a0fd6f2
+Source0: http://dl.sourceforge.net/ddclient/%{name}-%{version}.tar.bz2
+# Source0-md5: 41a3307ca32cce0f67c0f3281c5f17f2
Source1: %{name}.init
-URL: http://burry.ca:4141/ddclient/
+URL: http://ddclient.sourceforge.net/
BuildRequires: rpm-perlprov
-PreReq: rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sbindir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ddclient,/etc/rc.d/init.d,%{_sbindir}}
-install sample-etc_ddclient.conf $RPM_BUILD_ROOT/etc/%{name}.conf
+install sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
install %{name} $RPM_BUILD_ROOT%{_sbindir}
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
%post
/sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
- /etc/rc.d/init.d/%{name} restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
-fi
+%service %{name} restart "%{name} daemon"
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/%{name} ]; then
- /etc/rc.d/init.d/%{name} stop >&2
- fi
+ %service %{name} stop
/sbin/chkconfig --del %{name}
fi
+%triggerpostun -- ddclient < 1:3.6.4
+if [ -f /etc/ddclient.conf.rpmsave ]; then
+ echo "Moving config to new location /etc/ddclient"
+ mv -f /etc/ddclient/ddclient.conf /etc/ddclient/ddclient.conf.rpmnew
+ mv -f /etc/ddclient.conf.rpmsave /etc/ddclient/ddclient.conf
+ mv -f /etc/ddclient.cache /etc/ddclient.cache.rpmsave
+fi
+
%files
%defattr(644,root,root,755)
-%doc README*
+%doc Changelog README*
%attr(755,root,root) %{_sbindir}/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/%{name}.conf
+%dir %{_sysconfdir}/%{name}
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
%attr(754,root,root) /etc/rc.d/init.d/%{name}