1 Summary: A dynamic IP address utility
2 Summary(pl.UTF-8): Narzędzie do dynamicznych adresów IP
3 Summary(pt_BR.UTF-8): Cliente para atualizar entradas DNS dinâmicas no DynDNS.org
10 Source0: https://github.com/ddclient/ddclient/archive/v%{version}/%{name}-%{version}.tar.gz
11 # Source0-md5: 8497033052649ebe6f714338c7be4cda
13 Source2: %{name}.sysconfig
14 Source3: %{name}.NetworkManager
15 Source4: %{name}-tmpfiles.conf
17 URL: https://github.com/ddclient/ddclient
18 BuildRequires: rpm-perlprov
19 BuildRequires: rpmbuild(macros) >= 1.268
20 Provides: group(ddclient)
21 Provides: user(ddclient)
22 Requires(post,preun): /sbin/chkconfig
23 Requires(postun): /usr/sbin/groupdel
24 Requires(postun): /usr/sbin/userdel
25 Requires(pre): /bin/id
26 Requires(pre): /usr/bin/getgid
27 Requires(pre): /usr/sbin/groupadd
28 Requires(pre): /usr/sbin/useradd
30 # for freedns: Digest::SHA1, IO::Socket::SSL
31 Suggests: perl-Digest-SHA1
32 Suggests: perl-IO-Socket-SSL
33 # for cloudflare JSON::Any
34 Suggests: perl-JSON-Any
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define cachedir %{_localstatedir}/cache/ddclient
39 %define rundir %{_localstatedir}/run/ddclient
42 DDclient is a small full featured client with FULL DynDNS NIC2
43 support, requiring only Perl and no additional modules. It runs under
44 most UNIX OSes and has been tested under Linux and FreeBSD. Supported
45 features include: operating as a daemon, manual and automatic updates,
46 static and dynamic updates, optimized updates for multiple addresses,
47 MX, wildcards, abuse avoidance, retrying failed updates, and sending
48 update status to syslog and through e-mail. This release may now
49 obtain your IP address from any interface, web based IP detection,
50 Watchguard's SOHO router, Netopia's R910 router, SMC's Barricade
51 broadband router, Netgear's RT3xx router, Linksys' broadband routers,
52 MaxGate's UGATE-3x00 routers, ELSA's LANCOM DSL/10 routers and now
53 provides Full support for DynDNS.org's NIC2 protocol. Support is also
54 included for other dynamic DNS services. Comes with sample scripts for
55 use with DHCP, PPP, and cron. See the README for more information.
57 %description -l pl.UTF-8
58 DDclient to mały, w pełni funkcjonalny klient z PEŁNĄ obsługą DynDNS
59 NIC2, wymagający tylko Perla bez żadnych dodatkowych modułów. Działa
60 pod większością systemów uniksowych, był testowany pod Linuksem i
61 FreeBSD. Jego możliwości to między innymi: praca jako demon, ręczne i
62 automatyczne uaktualnienia, statyczne i dynamiczne uaktualnienia,
63 uaktualnienia zoptymalizowane dla wielu adresów, MX-y, wildcardy,
64 zapobieganie nadużyciom, ponawianie nieudanych uaktualnień, wysyłanie
65 statusu uaktualnień do sysloga i pocztą. Ta wersja może pobrać adres
66 IP z dowolnego interfejsu, wykrywania przez WWW, routerów: Watchguard
67 SOGO, szerokopasmowych SMC Barricane, Netgear RT3xx, szerokopasmowych
68 Linksys, MaxGate UGATE-3x00, ELSA LANCOM DSL/10, a teraz także ma
69 pełną obsługę protokołu DynDNS NIC2. Ma także wsparcie dla innych
70 usług dynamicznego DNS. Zawiera przykładowe skrypty do używania z
71 DHCP, PPP i cronem. Więcej informacji w README.
73 %description -l pt_BR.UTF-8
74 O ddclient é um cliente perl usada para atualizar entradas DNS
75 dinâmicas em contas do serviço de DNS dinâmico gratuito. Veja
76 <http://www.dyndns.org> para obter detalhes sobre como obter uma conta
81 cp -p sample-etc_ddclient.conf %{name}.conf
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/{rc.d/init.d,sysconfig,NetworkManager/dispatcher.d}} \
87 $RPM_BUILD_ROOT{%{_sbindir},%{systemdtmpfilesdir},%{cachedir},%{rundir}}
89 cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
90 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
91 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
92 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
93 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/50-%{name}
94 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
95 touch $RPM_BUILD_ROOT%{cachedir}/%{name}.cache
98 rm -rf $RPM_BUILD_ROOT
101 %groupadd -g 325 ddclient
102 %useradd -u 525 -d /var/run/%{name} -g ddclient -c "ddclient user" ddclient
105 /sbin/chkconfig --add %{name}
106 if [ "$1" = "2" ]; then
107 %service %{name} try-restart "%{name} daemon"
111 if [ "$1" = "0" ]; then
112 %service %{name} stop
113 /sbin/chkconfig --del %{name}
117 if [ "$1" = "0" ]; then
119 %groupremove ddclient
122 %triggerpostun -- ddclient < 1:3.6.4
123 if [ -f /etc/ddclient.conf.rpmsave ]; then
124 echo "Moving config to new location /etc/ddclient"
125 mv -f /etc/ddclient/ddclient.conf /etc/ddclient/ddclient.conf.rpmnew
126 mv -f /etc/ddclient.conf.rpmsave /etc/ddclient/ddclient.conf
127 mv -f /etc/ddclient.cache /etc/ddclient.cache.rpmsave
131 %defattr(644,root,root,755)
132 %doc ChangeLog Changelog.old README*
133 %attr(755,root,root) %{_sbindir}/ddclient
134 %dir %{_sysconfdir}/%{name}
135 # switch to %attr(640,root,ddclient) when this gets resolution: https://sourceforge.net/p/ddclient/bugs/77/
136 %attr(600,ddclient,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
137 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
138 %attr(754,root,root) /etc/rc.d/init.d/%{name}
139 %attr(755,root,root) /etc/NetworkManager/dispatcher.d/50-%{name}
140 %{systemdtmpfilesdir}/%{name}.conf
142 %dir %attr(770,root,ddclient) %{cachedir}
143 %ghost %attr(600,ddclient,ddclient) %ghost %{cachedir}/%{name}.cache
144 %dir %attr(770,root,ddclient) %{rundir}