2007-01-08 13:54:53 +01:00
|
|
|
#
|
2011-09-01 16:04:56 +02:00
|
|
|
# spec file for package ddclient
|
2007-01-08 13:54:53 +01:00
|
|
|
#
|
2014-05-22 14:50:35 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-08 13:54:53 +01:00
|
|
|
#
|
2009-01-28 12:45:55 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-08 13:54:53 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: ddclient
|
2010-02-19 16:49:21 +01:00
|
|
|
Summary: A Perl Client to Update Dynamic DNS Entries
|
2011-12-06 18:05:25 +01:00
|
|
|
License: GPL-2.0+
|
2007-01-08 13:54:53 +01:00
|
|
|
Group: Productivity/Networking/DNS/Utilities
|
2014-01-03 10:57:13 +01:00
|
|
|
Version: 3.8.2
|
2012-01-16 17:22:35 +01:00
|
|
|
Release: 0
|
2009-01-28 12:45:55 +01:00
|
|
|
Url: http://ddclient.sourceforge.net/
|
2014-01-03 10:57:13 +01:00
|
|
|
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
2013-11-11 15:01:16 +01:00
|
|
|
Source1: %{name}.service
|
2010-02-19 16:49:21 +01:00
|
|
|
Source2: %{name}.sysconfig
|
2013-12-04 14:27:38 +01:00
|
|
|
Source3: %{name}-tmpfiles.conf
|
2013-11-11 15:01:16 +01:00
|
|
|
Source4: rc.%{name}
|
2012-01-16 17:22:35 +01:00
|
|
|
Patch0: %{name}-3.8.1-config.patch
|
2014-05-22 15:47:19 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-12-04 14:27:38 +01:00
|
|
|
BuildArch: noarch
|
2013-11-11 15:01:16 +01:00
|
|
|
Requires(pre): %fillup_prereq
|
2014-05-22 15:47:19 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
2013-11-11 15:01:16 +01:00
|
|
|
%{?systemd_requires}
|
2014-05-22 15:47:19 +02:00
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Requires: perl >= 5.004
|
2011-10-16 11:51:34 +02:00
|
|
|
Recommends: perl-IO-Socket-SSL
|
2007-01-08 13:54:53 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
ddclient is a small full-featured client requiring only Perl. Supported
|
|
|
|
features include daemon operation, manual and automatic updates, static
|
|
|
|
and dynamic updates, optimized updates for multiple addresses, MX, wild
|
|
|
|
cards, abuse avoidance, retry for failed updates, and status updates to
|
|
|
|
syslog and through e-mail. ddclient can obtain the IP address from any
|
|
|
|
interface, through a Web-based IP detection service, and for multiple
|
|
|
|
routers using custom FW definitions. It also provides full support for
|
|
|
|
DynDNS.org's NIC2 protocol. Support is also included for other dynamic
|
|
|
|
DNS services. Comes with sample scripts for use with DHCP, PPP, and
|
|
|
|
cron.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup
|
2012-01-16 17:22:35 +01:00
|
|
|
%patch0
|
2009-02-03 22:47:10 +01:00
|
|
|
rm -f sample-etc_ddclient.conf.orig
|
2013-12-04 14:27:38 +01:00
|
|
|
chmod a-x sample-*
|
2009-02-03 22:47:10 +01:00
|
|
|
mkdir examples
|
2014-01-03 10:57:13 +01:00
|
|
|
mv sample-* examples
|
2007-01-08 13:54:53 +01:00
|
|
|
|
|
|
|
%build
|
2011-09-22 12:53:28 +02:00
|
|
|
#%%configure
|
|
|
|
#make
|
2007-01-08 13:54:53 +01:00
|
|
|
# If the package provides automatic testing
|
|
|
|
#make test
|
|
|
|
# nothing to do here (yet)
|
|
|
|
|
|
|
|
%install
|
|
|
|
#make DESTDIR=$RPM_BUILD_ROOT install
|
2014-05-22 15:47:19 +02:00
|
|
|
%{__install} -D -m 755 %{name} %{buildroot}%{_sbindir}/%{name}
|
|
|
|
%{__install} -D -m 644 examples/sample-etc_ddclient.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
2007-05-03 23:57:41 +02:00
|
|
|
# init script and config file
|
2014-05-22 15:47:19 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{__install} -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service
|
|
|
|
%{__install} -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
|
2013-12-04 14:27:38 +01:00
|
|
|
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
2013-11-11 15:01:16 +01:00
|
|
|
%else
|
2014-05-22 15:47:19 +02:00
|
|
|
%{__install} -D -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name}
|
2013-11-11 15:01:16 +01:00
|
|
|
%{__ln_s} %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
%endif
|
|
|
|
%{__install} -d -m 755 %{buildroot}/var/adm/fillup-templates
|
|
|
|
%{__install} -m 644 %{SOURCE2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
|
|
|
|
%{__install} -d -m 755 %{buildroot}/var/cache/%{name}
|
2007-05-03 23:57:41 +02:00
|
|
|
|
2014-05-22 15:47:19 +02:00
|
|
|
%if 0%{?has_systemd}
|
2014-05-22 14:50:35 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
|
|
|
|
2007-05-03 23:57:41 +02:00
|
|
|
%post
|
|
|
|
%{fillup_only}
|
2014-05-22 15:47:19 +02:00
|
|
|
%if 0%{?has_systemd}
|
2013-11-11 15:01:16 +01:00
|
|
|
%service_add_post %{name}.service
|
|
|
|
%endif
|
2007-01-08 13:54:53 +01:00
|
|
|
|
|
|
|
%preun
|
2014-05-22 15:47:19 +02:00
|
|
|
%if 0%{?has_systemd}
|
2013-11-11 15:01:16 +01:00
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%else
|
2007-01-08 13:54:53 +01:00
|
|
|
%stop_on_removal ddclient
|
2013-11-11 15:01:16 +01:00
|
|
|
%endif
|
2007-01-08 13:54:53 +01:00
|
|
|
|
|
|
|
%postun
|
2014-05-22 15:47:19 +02:00
|
|
|
%if 0%{?has_systemd}
|
2013-11-11 15:01:16 +01:00
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%else
|
2007-01-08 13:54:53 +01:00
|
|
|
%restart_on_update ddclient
|
|
|
|
%insserv_cleanup
|
2013-11-11 15:01:16 +01:00
|
|
|
%endif
|
2007-01-08 13:54:53 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2014-01-03 10:57:13 +01:00
|
|
|
%doc COPY* README* examples
|
2010-02-19 16:49:21 +01:00
|
|
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/%{name}.conf
|
2014-05-22 15:47:19 +02:00
|
|
|
%if 0%{?has_systemd}
|
2013-12-04 14:27:38 +01:00
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_libexecdir}/tmpfiles.d/ddclient.conf
|
2013-11-11 15:01:16 +01:00
|
|
|
%else
|
2013-12-04 14:27:38 +01:00
|
|
|
/etc/init.d/%{name}
|
2013-11-11 15:01:16 +01:00
|
|
|
%endif
|
2010-02-19 16:49:21 +01:00
|
|
|
%{_sbindir}/%{name}
|
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
/var/adm/fillup-templates/sysconfig.%{name}
|
|
|
|
%dir /var/cache/%{name}
|
2007-01-08 13:54:53 +01:00
|
|
|
|
2007-04-03 21:16:22 +02:00
|
|
|
%changelog
|