]> git.pld-linux.org Git - packages/ddclient.git/blob - ddclient.spec
switch to github fork
[packages/ddclient.git] / ddclient.spec
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
5 Name:           ddclient
6 Version:        3.9.0
7 Release:        1
8 Epoch:          1
9 License:        GPL v2
10 Group:          Networking
11 Source0:        https://github.com/ddclient/ddclient/archive/v%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5:  20f5cac911d6671799eac6e1a627868c
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 Source3:        %{name}.NetworkManager
16 Source4:        %{name}-tmpfiles.conf
17 Patch0:         config.patch
18 URL:            https://github.com/ddclient/ddclient
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
30 Requires:       rc-scripts
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
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         cachedir        %{_localstatedir}/cache/ddclient
40 %define         rundir          %{_localstatedir}/run/ddclient
41
42 %description
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.
57
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.
73
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
78 gratuita.
79
80 %prep
81 %setup -q
82 cp -p sample-etc_ddclient.conf %{name}.conf
83 %patch0 -p1
84
85 %install
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},%{systemdtmpfilesdir},%{cachedir},%{rundir}}
89
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 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
96 touch $RPM_BUILD_ROOT%{cachedir}/%{name}.cache
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %pre
102 %groupadd -g 325 ddclient
103 %useradd -u 525 -d /var/run/%{name} -g ddclient -c "ddclient user" ddclient
104
105 %post
106 /sbin/chkconfig --add %{name}
107 %service %{name} restart "%{name} daemon"
108
109 %preun
110 if [ "$1" = "0" ]; then
111         %service %{name} stop
112         /sbin/chkconfig --del %{name}
113 fi
114
115 %postun
116 if [ "$1" = "0" ]; then
117         %userremove ddclient
118         %groupremove ddclient
119 fi
120
121 %triggerpostun -- ddclient < 1:3.6.4
122 if [ -f /etc/ddclient.conf.rpmsave ]; then
123         echo "Moving config to new location /etc/ddclient"
124         mv -f /etc/ddclient/ddclient.conf /etc/ddclient/ddclient.conf.rpmnew
125         mv -f /etc/ddclient.conf.rpmsave /etc/ddclient/ddclient.conf
126         mv -f /etc/ddclient.cache /etc/ddclient.cache.rpmsave
127 fi
128
129 %files
130 %defattr(644,root,root,755)
131 %doc ChangeLog Changelog.old README*
132 %attr(755,root,root) %{_sbindir}/ddclient
133 %dir %{_sysconfdir}/%{name}
134 # switch to %attr(640,root,ddclient) when this gets resolution: https://sourceforge.net/p/ddclient/bugs/77/
135 %attr(600,ddclient,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
136 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
137 %attr(754,root,root) /etc/rc.d/init.d/%{name}
138 %attr(755,root,root) /etc/NetworkManager/dispatcher.d/50-%{name}
139 %{systemdtmpfilesdir}/%{name}.conf
140
141 %dir %attr(770,root,ddclient) %{cachedir}
142 %ghost %attr(600,ddclient,ddclient) %ghost %{cachedir}/%{name}.cache
143 %dir %attr(770,root,ddclient) %{rundir}
This page took 0.0478460000000001 seconds and 4 git commands to generate.