Hello community,

here is the log from the commit of package ddclient for openSUSE:Factory 
checked in at 2013-11-12 09:50:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ddclient (Old)
 and      /work/SRC/openSUSE:Factory/.ddclient.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ddclient"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ddclient/ddclient.changes        2013-05-27 
09:44:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ddclient.new/ddclient.changes   2013-11-12 
09:50:03.000000000 +0100
@@ -1,0 +2,5 @@
+Sun Oct 27 15:12:09 UTC 2013 - [email protected]
+
+- Improve systemd support for openSUSE >= 12.3
+
+-------------------------------------------------------------------

New:
----
  ddclient-tmpfiles.conf
  ddclient.service

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ddclient.spec ++++++
--- /var/tmp/diff_new_pack.ZHLpcf/_old  2013-11-12 09:50:04.000000000 +0100
+++ /var/tmp/diff_new_pack.ZHLpcf/_new  2013-11-12 09:50:04.000000000 +0100
@@ -24,13 +24,16 @@
 Release:        0
 Url:            http://ddclient.sourceforge.net/
 Source0:        
http://switch.dl.sourceforge.net/sourceforge/ddclient/%{name}-%{version}.tar.bz2
-Source1:        rc.ddclient
+Source1:        %{name}.service
 Source2:        %{name}.sysconfig
+Source3:        %{name}-tmpfiles.conf 
+Source4:        rc.%{name}
 Patch0:         %{name}-3.8.1-config.patch
 Patch1:         %{name}-3.8.1-update_nic.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-PreReq:         %fillup_prereq
+BuildRequires:  pkgconfig(systemd)
+Requires(pre):  %fillup_prereq
 Requires:       perl >= 5.004
+%{?systemd_requires}
 Recommends:     perl-IO-Socket-SSL
 
 %description
@@ -63,32 +66,60 @@
 
 %install
 #make DESTDIR=$RPM_BUILD_ROOT install
-%{__mkdir_p} $RPM_BUILD_ROOT%{_sbindir}
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
-%{__install} -m 755 %{name} $RPM_BUILD_ROOT%{_sbindir}/
-%{__install} -m 644 sample-etc_ddclient.conf 
$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}.conf
+%{__mkdir_p} %{buildroot}%{_sbindir}
+%{__mkdir_p} %{buildroot}%{_sysconfdir}
+%if 0%{?suse_version} >=1230
+%{__mkdir_p} %{buildroot}%{_unitdir}
+%{__mkdir_p} %{buildroot}%{_libexecdir}/tmpfiles.d
+%else
+%{__mkdir_p} %{buildroot}%{_sysconfdir}/init.d
+%endif
+%{__install} -m 755 %{name} %{buildroot}%{_sbindir}/
+%{__install} -m 644 sample-etc_ddclient.conf 
%{buildroot}%{_sysconfdir}/%{name}.conf
 # init script and config file
-%{__install} -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/%{name}
-%{__ln_s} %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
-%{__install} -d -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates
-%{__install} -m 644 %{SOURCE2} 
$RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
-%{__install} -d -m 755 $RPM_BUILD_ROOT/var/cache/%{name}
+%if 0%{?suse_version} >=1230
+%{__install} -m 755 %{SOURCE1} 
%{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
+%{__install} -m 755 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
+%{__ln_s} %{_unitdir}/%{name}.service %{buildroot}%{_sbindir}/rc%{name}
+%else
+%{__install} -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name}
+%{__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}
 
 %post
 %{fillup_only}
+%if 0%{?suse_version} >=1230
+%service_add_post %{name}.service
+%endif
 
 %preun
+%if 0%{?suse_version} >=1230
+%service_del_preun %{name}.service
+%else
 %stop_on_removal ddclient
+%endif
 
 %postun
+%if 0%{?suse_version} >=1230
+%service_del_postun %{name}.service
+%else
 %restart_on_update ddclient
 %insserv_cleanup
+%endif
 
 %files
 %defattr(-, root, root)
 %doc COPY* README* sample* examples
 %config(noreplace) %attr(600,root,root) %{_sysconfdir}/%{name}.conf
+%if 0%{?suse_version} >=1230
+%config %attr(0755,root,root) %{_unitdir}/%{name}.service
+%config %attr(0644,root,root) %{_libexecdir}/tmpfiles.d/ddclient.conf
+%else
 %config %attr(0755,root,root) /etc/init.d/%{name}
+%endif
 %{_sbindir}/%{name}
 %{_sbindir}/rc%{name}
 /var/adm/fillup-templates/sysconfig.%{name}

++++++ ddclient-tmpfiles.conf ++++++
d /var/run/ddclient 0755 ddclient ddclient -
++++++ ddclient.service ++++++
[Unit]
Description=A Perl Client Used To Update Dynamic DNS
After=network.target nss-lookup.target

[Service]
User=ddclient
Group=ddclient
Type=forking
PIDFile=/run/ddclient/ddclient.pid
EnvironmentFile=-/etc/sysconfig/ddclient
ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache
ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS

[Install]
WantedBy=multi-user.target
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to