1 %include /usr/lib/rpm/macros.perl
2 Summary: A dynamic IP address utility
3 Summary(pl.UTF-8): Narzędzie do dynamicznych adresów IP
4 Summary(pt_BR.UTF-8): Cliente para atualizar entradas DNS dinâmicas no DynDNS.org
11 Source0: http://downloads.sourceforge.net/ddclient/%{name}-%{version}.tar.bz2
12 # Source0-md5: 3b426ae52d509e463b42eeb08fb89e0b
14 Source2: %{name}.sysconfig
15 Source3: %{name}.NetworkManager
16 # https://github.com/wimpunk/ddclient
17 URL: http://ddclient.sourceforge.net/
18 BuildRequires: rpm-perlprov
19 BuildRequires: rpmbuild(macros) >= 1.268
20 Requires(post,preun): /sbin/chkconfig
22 # for freedns: Digest::SHA1, IO::Socket::SSL
23 Suggests: perl-Digest-SHA1
24 Suggests: perl-IO-Socket-SSL
25 # for cloudflare JSON::Any
26 Suggests: perl-JSON-Any
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 DDclient is a small full featured client with FULL DynDNS NIC2
32 support, requiring only Perl and no additional modules. It runs under
33 most UNIX OSes and has been tested under Linux and FreeBSD. Supported
34 features include: operating as a daemon, manual and automatic updates,
35 static and dynamic updates, optimized updates for multiple addresses,
36 MX, wildcards, abuse avoidance, retrying failed updates, and sending
37 update status to syslog and through e-mail. This release may now
38 obtain your IP address from any interface, web based IP detection,
39 Watchguard's SOHO router, Netopia's R910 router, SMC's Barricade
40 broadband router, Netgear's RT3xx router, Linksys' broadband routers,
41 MaxGate's UGATE-3x00 routers, ELSA's LANCOM DSL/10 routers and now
42 provides Full support for DynDNS.org's NIC2 protocol. Support is also
43 included for other dynamic DNS services. Comes with sample scripts for
44 use with DHCP, PPP, and cron. See the README for more information.
46 %description -l pl.UTF-8
47 DDclient to mały, w pełni funkcjonalny klient z PEŁNĄ obsługą DynDNS
48 NIC2, wymagający tylko Perla bez żadnych dodatkowych modułów. Działa
49 pod większością systemów uniksowych, był testowany pod Linuksem i
50 FreeBSD. Jego możliwości to między innymi: praca jako demon, ręczne i
51 automatyczne uaktualnienia, statyczne i dynamiczne uaktualnienia,
52 uaktualnienia zoptymalizowane dla wielu adresów, MX-y, wildcardy,
53 zapobieganie nadużyciom, ponawianie nieudanych uaktualnień, wysyłanie
54 statusu uaktualnień do sysloga i pocztą. Ta wersja może pobrać adres
55 IP z dowolnego interfejsu, wykrywania przez WWW, routerów: Watchguard
56 SOGO, szerokopasmowych SMC Barricane, Netgear RT3xx, szerokopasmowych
57 Linksys, MaxGate UGATE-3x00, ELSA LANCOM DSL/10, a teraz także ma
58 pełną obsługę protokołu DynDNS NIC2. Ma także wsparcie dla innych
59 usług dynamicznego DNS. Zawiera przykładowe skrypty do używania z
60 DHCP, PPP i cronem. Więcej informacji w README.
62 %description -l pt_BR.UTF-8
63 O ddclient é um cliente perl usada para atualizar entradas DNS
64 dinâmicas em contas do serviço de DNS dinâmico gratuito. Veja
65 <http://www.dyndns.org> para obter detalhes sobre como obter uma conta
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ddclient,/etc/{rc.d/init.d,sysconfig,NetworkManager/dispatcher.d},%{_sbindir},%{_var}/cache/%{name}}
74 cp -p sample-etc_ddclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
75 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
76 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
77 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
78 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/50-%{name}
81 rm -rf $RPM_BUILD_ROOT
84 /sbin/chkconfig --add %{name}
85 %service %{name} restart "%{name} daemon"
88 if [ "$1" = "0" ]; then
90 /sbin/chkconfig --del %{name}
93 %triggerpostun -- ddclient < 1:3.6.4
94 if [ -f /etc/ddclient.conf.rpmsave ]; then
95 echo "Moving config to new location /etc/ddclient"
96 mv -f /etc/ddclient/ddclient.conf /etc/ddclient/ddclient.conf.rpmnew
97 mv -f /etc/ddclient.conf.rpmsave /etc/ddclient/ddclient.conf
98 mv -f /etc/ddclient.cache /etc/ddclient.cache.rpmsave
102 %defattr(644,root,root,755)
103 %doc ChangeLog Changelog.old README*
104 %attr(755,root,root) %{_sbindir}/ddclient
105 %dir %{_sysconfdir}/%{name}
106 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
107 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ddclient
108 %attr(754,root,root) /etc/rc.d/init.d/%{name}
109 %dir %{_var}/cache/%{name}
110 %attr(755,root,root) /etc/NetworkManager/dispatcher.d/50-%{name}