]> git.pld-linux.org Git - packages/ddclient.git/blame - ddclient.spec
up to 3.11.2
[packages/ddclient.git] / ddclient.spec
CommitLineData
5d9de3c6
JP
1#
2# Conditional build:
3%bcond_without systemd # systemd units
4
654e0e24 5Summary: A dynamic IP address utility
b6b2aeb7
ER
6Summary(pl.UTF-8): Narzędzie do dynamicznych adresów IP
7Summary(pt_BR.UTF-8): Cliente para atualizar entradas DNS dinâmicas no DynDNS.org
db99a6ef 8Name: ddclient
86fae1c3
JP
9Version: 3.11.2
10Release: 1
394e91f1 11Epoch: 1
55975c8b 12License: GPL v2
0e8a2d77 13Group: Networking
6a74c88a 14Source0: https://github.com/ddclient/ddclient/archive/v%{version}/%{name}-%{version}.tar.gz
86fae1c3 15# Source0-md5: 5ef2ff089cfe4d4b9e1248881199eb4a
db99a6ef 16Source1: %{name}.init
9925c772
ER
17Source2: %{name}.sysconfig
18Source3: %{name}.NetworkManager
91cda602 19Source4: %{name}-tmpfiles.conf
5d9de3c6 20Source5: %{name}.service
3140959c 21Patch0: config.patch
6a74c88a 22URL: https://github.com/ddclient/ddclient
86fae1c3
JP
23BuildRequires: autoconf
24BuildRequires: automake
25BuildRequires: perl-base
db99a6ef 26BuildRequires: rpm-perlprov
0e8a2d77 27BuildRequires: rpmbuild(macros) >= 1.268
c7c8689f
ER
28Provides: group(ddclient)
29Provides: user(ddclient)
300c7498 30Requires(post,preun): /sbin/chkconfig
c7c8689f
ER
31Requires(postun): /usr/sbin/groupdel
32Requires(postun): /usr/sbin/userdel
33Requires(pre): /bin/id
34Requires(pre): /usr/bin/getgid
35Requires(pre): /usr/sbin/groupadd
36Requires(pre): /usr/sbin/useradd
0e8a2d77 37Requires: rc-scripts
5d9de3c6 38%{?with_systemd:Requires: systemd-units >= 1:250.1}
99dbc76c
ER
39# for freedns: Digest::SHA1, IO::Socket::SSL
40Suggests: perl-Digest-SHA1
41Suggests: perl-IO-Socket-SSL
b8df6b03
ER
42# for cloudflare JSON::Any
43Suggests: perl-JSON-Any
654e0e24 44BuildArch: noarch
db99a6ef
AM
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
c7c8689f
ER
47%define cachedir %{_localstatedir}/cache/ddclient
48%define rundir %{_localstatedir}/run/ddclient
86fae1c3 49%define _sysconfdir /etc/ddclient
c7c8689f 50
db99a6ef 51%description
654e0e24
JB
52DDclient is a small full featured client with FULL DynDNS NIC2
53support, requiring only Perl and no additional modules. It runs under
54most UNIX OSes and has been tested under Linux and FreeBSD. Supported
55features include: operating as a daemon, manual and automatic updates,
56static and dynamic updates, optimized updates for multiple addresses,
57MX, wildcards, abuse avoidance, retrying failed updates, and sending
58update status to syslog and through e-mail. This release may now
59obtain your IP address from any interface, web based IP detection,
60Watchguard's SOHO router, Netopia's R910 router, SMC's Barricade
61broadband router, Netgear's RT3xx router, Linksys' broadband routers,
62MaxGate's UGATE-3x00 routers, ELSA's LANCOM DSL/10 routers and now
63provides Full support for DynDNS.org's NIC2 protocol. Support is also
64included for other dynamic DNS services. Comes with sample scripts for
65use with DHCP, PPP, and cron. See the README for more information.
66
5130ae15
JR
67%description -l pl.UTF-8
68DDclient to mały, w pełni funkcjonalny klient z PEŁNĄ obsługą DynDNS
69NIC2, wymagający tylko Perla bez żadnych dodatkowych modułów. Działa
70pod większością systemów uniksowych, był testowany pod Linuksem i
1aee7920
ER
71FreeBSD. Jego możliwości to między innymi: praca jako demon, ręczne i
72automatyczne uaktualnienia, statyczne i dynamiczne uaktualnienia,
5130ae15
JR
73uaktualnienia zoptymalizowane dla wielu adresów, MX-y, wildcardy,
74zapobieganie nadużyciom, ponawianie nieudanych uaktualnień, wysyłanie
75statusu uaktualnień do sysloga i pocztą. Ta wersja może pobrać adres
76IP z dowolnego interfejsu, wykrywania przez WWW, routerów: Watchguard
654e0e24 77SOGO, szerokopasmowych SMC Barricane, Netgear RT3xx, szerokopasmowych
5130ae15
JR
78Linksys, MaxGate UGATE-3x00, ELSA LANCOM DSL/10, a teraz także ma
79pełną obsługę protokołu DynDNS NIC2. Ma także wsparcie dla innych
80usług dynamicznego DNS. Zawiera przykładowe skrypty do używania z
81DHCP, PPP i cronem. Więcej informacji w README.
db99a6ef 82
5130ae15
JR
83%description -l pt_BR.UTF-8
84O ddclient é um cliente perl usada para atualizar entradas DNS
85dinâmicas em contas do serviço de DNS dinâmico gratuito. Veja
1aee7920 86<http://www.dyndns.org> para obter detalhes sobre como obter uma conta
db99a6ef
AM
87gratuita.
88
89%prep
90%setup -q
3140959c 91%patch0 -p1
db99a6ef 92
86fae1c3
JP
93%build
94%{__aclocal}
95%{__autoconf}
96%{__automake}
97%configure \
98 CURL=/usr/bin/curl
99%{__make}
100
db99a6ef
AM
101%install
102rm -rf $RPM_BUILD_ROOT
c7c8689f 103install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/{rc.d/init.d,sysconfig,NetworkManager/dispatcher.d}} \
5d9de3c6 104 $RPM_BUILD_ROOT{%{_sbindir},%{systemdtmpfilesdir},%{?with_systemd:%{systemdunitdir},}%{cachedir},%{rundir}}
c7c8689f 105
86fae1c3 106cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}
03604084
ER
107install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
108install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
9925c772
ER
109cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
110install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/50-%{name}
91cda602 111cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
5d9de3c6 112%{?with_systemd:cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service}
c7c8689f 113touch $RPM_BUILD_ROOT%{cachedir}/%{name}.cache
db99a6ef
AM
114
115%clean
116rm -rf $RPM_BUILD_ROOT
117
c7c8689f
ER
118%pre
119%groupadd -g 325 ddclient
120%useradd -u 525 -d /var/run/%{name} -g ddclient -c "ddclient user" ddclient
121
db99a6ef 122%post
db99a6ef 123/sbin/chkconfig --add %{name}
386ae21a
JP
124if [ "$1" = "2" ]; then
125 %service %{name} try-restart "%{name} daemon"
126fi
5d9de3c6 127%{?with_systemd:%systemd_post %{name}.service}
db99a6ef
AM
128
129%preun
130if [ "$1" = "0" ]; then
0e8a2d77 131 %service %{name} stop
5ea4aa7d 132 /sbin/chkconfig --del %{name}
db99a6ef 133fi
5d9de3c6 134%{?with_systemd:%systemd_preun %{name}.service}
db99a6ef 135
c7c8689f
ER
136%postun
137if [ "$1" = "0" ]; then
138 %userremove ddclient
139 %groupremove ddclient
140fi
5d9de3c6 141%{?with_systemd:%systemd_reload}
c7c8689f 142
5d9de3c6 143%triggerpostun -- ddclient < 1:3.9.1-2
c3d51f71 144if [ -f /etc/ddclient.conf.rpmsave ]; then
8dff4a75 145 echo "Moving config to new location /etc/ddclient"
c3d51f71
AZ
146 mv -f /etc/ddclient/ddclient.conf /etc/ddclient/ddclient.conf.rpmnew
147 mv -f /etc/ddclient.conf.rpmsave /etc/ddclient/ddclient.conf
148 mv -f /etc/ddclient.cache /etc/ddclient.cache.rpmsave
149fi
5d9de3c6 150%{?with_systemd:%systemd_trigger %{name}.service}
c3d51f71 151
ff0ebb6c
JP
152%triggerin -- perl-base
153[ "$2" = "2" ] || exit 0
154%service %{name} try-restart "%{name} daemon"
155%{?with_systemd:%systemd_service_restart %{name}.service}
156
db99a6ef
AM
157%files
158%defattr(644,root,root,755)
86fae1c3 159%doc ChangeLog.md README*
03604084 160%attr(755,root,root) %{_sbindir}/ddclient
86fae1c3 161%dir %{_sysconfdir}
b9e794e2 162# switch to %attr(640,root,ddclient) when this gets resolution: https://sourceforge.net/p/ddclient/bugs/77/
86fae1c3 163%attr(600,ddclient,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
91cda602 164%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
db99a6ef 165%attr(754,root,root) /etc/rc.d/init.d/%{name}
99dbc76c 166%attr(755,root,root) /etc/NetworkManager/dispatcher.d/50-%{name}
91cda602 167%{systemdtmpfilesdir}/%{name}.conf
5d9de3c6 168%{?with_systemd:%{systemdunitdir}/%{name}.service}
c7c8689f
ER
169
170%dir %attr(770,root,ddclient) %{cachedir}
171%ghost %attr(600,ddclient,ddclient) %ghost %{cachedir}/%{name}.cache
172%dir %attr(770,root,ddclient) %{rundir}
This page took 0.120178 seconds and 4 git commands to generate.