rpms/inadyn-mt/devel inadyn-mt.conf, NONE, 1.1 inadyn-mt.service, NONE, 1.1 inadyn-mt.spec, 1.9, 1.10 inadyn.conf, 1.2, NONE

Jochen Schmitt s4504kr at fedoraproject.org
Sun Jul 18 18:47:54 UTC 2010


Author: s4504kr

Update of /cvs/pkgs/rpms/inadyn-mt/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv27800

Modified Files:
	inadyn-mt.spec 
Added Files:
	inadyn-mt.conf inadyn-mt.service 
Removed Files:
	inadyn.conf 
Log Message:
Try to add systemd support to inadyn-mt


--- NEW FILE inadyn-mt.conf ---
--username 	<Your Username>
--password 	<Your Password>
alias    	<Your DynDNS Hostname>
update_period	60000
background
syslog

--- NEW FILE inadyn-mt.service ---
[Unit]
Description=Inadyn-mt, register an IP Address to a dynamic DNS provider
After=syslog.target

[Service]
ExecStart=/usr/sbin/inadyn

[Install]
WantedBy=multi-user.target

Index: inadyn-mt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/inadyn-mt/devel/inadyn-mt.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- inadyn-mt.spec	15 Jul 2010 19:33:40 -0000	1.9
+++ inadyn-mt.spec	18 Jul 2010 18:47:54 -0000	1.10
@@ -1,7 +1,7 @@
 Name:           inadyn-mt
 
 Version:        2.18.34
-Release: 	1%{?dist}
+Release: 	2%{?dist}
 
 Summary:        Dynamic DNS Client
 
@@ -9,20 +9,18 @@ Group:          System Environment/Daemo
 License:        GPLv3
 URL:            http://inadyn-mt.sourceforge.net
 Source0:        http://prdownloads.sourceforge.net/inadyn-mt/inadyn-mt.v.0%{version}.tar.gz
-Source1:        inadyn.conf
+Source1:        inadyn-mt.conf
 Source2:        inadyn.init
+Source3:	inadyn-mt.service
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	libao-devel
 
-Requires(post):  /sbin/chkconfig
-Requires(post):  /sbin/service
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
+Requires:	init(%{name})
 
-Obsoletes: 	 inadyn < %{version}
-Provides:  	 inadyn = %{version}-%{release}
+Obsoletes: 	inadyn < %{version}
+Provides:  	inadyn = %{version}-%{release}
 
 %description
 INADYN-MT is a dynamic DNS client. It maintains the IP address of 
@@ -34,6 +32,53 @@ Before using inadyn-mt for the first tim
 provider's web interface to create the entry for the hostname. You
 should then fill in /etc/inadyn.conf with the appropriate detail
 
+%package sysvinit
+Summary:	  SysV initscripts for inadyn-mt
+Group:		  System Environment/Base
+Provides:	  init(%{name}) = sysv
+Requires:	  %{name} = %{version}-%{release}
+Requires(preun):  %{name} initscripts
+Requires(postun): %{name} initscripts
+Requires(pos):	  /sbin/chkconfig
+Requires(preun):  /sbin/chkconfig
+BuildArch:	  noarch
+
+%description sysvinit
+INADYN-MT is a dynamic DNS client. It maintains the IP address of 
+a host name. It periodically checks wheather the IP address stored
+by the DSN server is the real current address of the machine that
+is running INADYN-MT.
+
+Before using inadyn-mt for the first time you must use the DynDNS
+provider's web interface to create the entry for the hostname. You
+should then fill in /etc/inadyn.conf with the appropriate detail
+
+This package provides ths scripts which can be used to start inadyn-mt
+with the SysV initconcept.
+
+%package units
+Summary:	  SysV initscripts for inadyn-mt
+Group:		  System Environment/Base
+Provides:	  init(%{name}) = systemd
+Requires:	  %{name} = %{version}-%{release}
+Requires(preun):  %{name} systemd-units
+Requires(post):   %{name} systemd-units
+BuildArch:	  noarch
+
+%description units
+INADYN-MT is a dynamic DNS client. It maintains the IP address of 
+a host name. It periodically checks wheather the IP address stored
+by the DSN server is the real current address of the machine that
+is running INADYN-MT.
+
+Before using inadyn-mt for the first time you must use the DynDNS
+provider's web interface to create the entry for the hostname. You
+should then fill in /etc/inadyn.conf with the appropriate detail
+
+This package provides ths scripts which can be used to start inadyn-mt
+with the systemd initconcept.
+
+
 %prep
 %setup -q -n %name.v.0%{version}
 
@@ -56,11 +101,6 @@ install -p -m 0644 man/inadyn.conf.5 $RP
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
 install -p -m 0600 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
 
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-pushd $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-ln -sf ../inadyn.conf %{name}.conf
-popd
-
 mkdir -p $RPM_BUILD_ROOT%{_initrddir}
 %{__perl} -pe \
  's|/var/|%{_localstatedir}/|g ; \
@@ -75,36 +115,57 @@ cp lang/* $RPM_BUILD_ROOT%{_datadir}/ina
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/inadyn-mt/extra
 cp -R extra/* $RPM_BUILD_ROOT%{_datadir}/inadyn-mt/extra
 
+mkdir -p ${RPM_BUILD_ROOT}/lib/systemd/system
+install -p %{SOURCE3} ${RPM_BUILD_ROOT}/lib/systemd/system
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
+%post sysvinit
 /sbin/chkconfig --add inadyn
 
-%preun
+%preun sysvinit
 if [ $1 -eq 0 ]; then
   /sbin/service inadyn stop >/dev/null 2>&1 || :
   /sbin/chkconfig --del inadyn
 fi
 
-%postun
+%postun sysvinit
 if [ $1 -ge 1 ]; then
   /sbin/service inadyn condrestart >/dev/null
 fi
 
+%post units
+/usr/bin/systemd-install --realize=minimal enable inadyn-mt.services >/dev/null 2>&1 || :
+
+%preun units
+if [ $1 -eq 0]; then
+   /usr/bin/system-install --realize disable inadyn-mt.services >/dev/null 2>&1 || :
+fi
+
+
 %files 
 %defattr(-,root,root,-)
 %doc COPYING readme.html
 %{_sbindir}/inadyn
 %{_mandir}/man*/*
-%attr(0755,root,root) %{_initrddir}/inadyn
-%config(noreplace) %{_sysconfdir}/inadyn.conf
-%dir %{_sysconfdir}/%{name}
-%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+%config(noreplace) %{_sysconfdir}/%{name}.conf
 %{_datadir}/%{name}/
 
+%files sysvinit
+%defattr(-,root,root,-)
+%attr(0755,root,root) %{_initrddir}/inadyn
+
+%files units
+%defattr(-,root,root,-)
+/lib/systemd/system/inadyn-mt.service
 
 %changelog
+* Sun Jul 18 2010 Jochen Schmitt <Jochen herr-schmitt de> 2.18.34-2
+- Create seperate subpackages for sysv and systemd init
+- Move inadyn-mt.conf to %%{_sysconfdir}
+- Remove symlink from inadyn.conf to inadyn-mt.conf
+
 * Tue May 18 2010 Jochen Schmitt <Jochen herr-schmitt de> 2.18.24-1
 - New upstream release
 


--- inadyn.conf DELETED ---



More information about the scm-commits mailing list