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