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 Source4: %{name}-tmpfiles.conf
18 # https://github.com/wimpunk/ddclient
19 URL: http://ddclient.sourceforge.net/
20 BuildRequires: rpm-perlprov
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Provides: group(ddclient)
23 Provides: user(ddclient)
24 Requires(post,preun): /sbin/chkconfig
25 Requires(postun): /usr/sbin/groupdel
26 Requires(postun): /usr/sbin/userdel
27 Requires(pre): /bin/id
28 Requires(pre): /usr/bin/getgid
29 Requires(pre): /usr/sbin/groupadd
30 Requires(pre): /usr/sbin/useradd
32 # for freedns: Digest::SHA1, IO::Socket::SSL
33 Suggests: perl-Digest-SHA1
34 Suggests: perl-IO-Socket-SSL
35 # for cloudflare JSON::Any
36 Suggests: perl-JSON-Any
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define cachedir %{_localstatedir}/cache/ddclient
41 %define rundir %{_localstatedir}/run/ddclient
44 DDclient is a small full featured client with FULL DynDNS NIC2
45 support, requiring only Perl and no additional modules. It runs under
46 most UNIX OSes and has been tested under Linux and FreeBSD. Supported
47 features include: operating as a daemon, manual and automatic updates,
48 static and dynamic updates, optimized updates for multiple addresses,
49 MX, wildcards, abuse avoidance, retrying failed updates, and sending
50 update status to syslog and through e-mail. This release may now
51 obtain your IP address from any interface, web based IP detection,
52 Watchguard's SOHO router, Netopia's R910 router, SMC's Barricade
53 broadband router, Netgear's RT3xx router, Linksys' broadband routers,
54 MaxGate's UGATE-3x00 routers, ELSA's LANCOM DSL/10 routers and now
55 provides Full support for DynDNS.org's NIC2 protocol. Support is also
56 included for other dynamic DNS services. Comes with sample scripts for
57 use with DHCP, PPP, and cron. See the README for more information.
59 %description -l pl.UTF-8
60 DDclient to mały, w pełni funkcjonalny klient z PEŁNĄ obsługą DynDNS
61 NIC2, wymagający tylko Perla bez żadnych dodatkowych modułów. Działa
62 pod większością systemów uniksowych, był testowany pod Linuksem i
63 FreeBSD. Jego możliwości to między innymi: praca jako demon, ręczne i
64 automatyczne uaktualnienia, statyczne i dynamiczne uaktualnienia,
65 uaktualnienia zoptymalizowane dla wielu adresów, MX-y, wildcardy,
66 zapobieganie nadużyciom, ponawianie nieudanych uaktualnień, wysyłanie
67 statusu uaktualnień do sysloga i pocztą. Ta wersja może pobrać adres
68 IP z dowolnego interfejsu, wykrywania przez WWW, routerów: Watchguard
69 SOGO, szerokopasmowych SMC Barricane, Netgear RT3xx, szerokopasmowych
70 Linksys, MaxGate UGATE-3x00, ELSA LANCOM DSL/10, a teraz także ma
71 pełną obsługę protokołu DynDNS NIC2. Ma także wsparcie dla innych
72 usług dynamicznego DNS. Zawiera przykładowe skrypty do używania z
73 DHCP, PPP i cronem. Więcej informacji w README.
75 %description -l pt_BR.UTF-8
76 O ddclient é um cliente perl usada para atualizar entradas DNS
77 dinâmicas em contas do serviço de DNS dinâmico gratuito. Veja
78 <http://www.dyndns.org> para obter detalhes sobre como obter uma conta
83 cp -p sample-etc_ddclient.conf %{name}.conf
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/{rc.d/init.d,sysconfig,NetworkManager/dispatcher.d}} \
89 $RPM_BUILD_ROOT{%{_sbindir},%{systemdtmpfilesdir},%{cachedir},%{rundir}}
91 cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
92 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
93 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
94 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
95 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/50-%{name}
96 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
97 touch $RPM_BUILD_ROOT%{cachedir}/%{name}.cache
100 rm -rf $RPM_BUILD_ROOT
103 %groupadd -g 325 ddclient
104 %useradd -u 525 -d /var/run/%{name} -g ddclient -c "ddclient user" ddclient
107 /sbin/chkconfig --add %{name}
108 %service %{name} 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}