[pyicq-t] Upgrade to systemd
Stefan Schulze Frielinghaus
stefansf at fedoraproject.org
Sun Jul 10 22:05:18 UTC 2011
commit d02e70f2719da655d5a4ca1f7f8fbea53fdd5198
Author: Stefan Schulze Frielinghaus <stefansf at fedoraproject.org>
Date: Mon Jul 11 00:03:33 2011 +0200
Upgrade to systemd
pyicq-t.spec | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/pyicq-t.spec b/pyicq-t.spec
index 7f14138..8a8a110 100644
--- a/pyicq-t.spec
+++ b/pyicq-t.spec
@@ -2,19 +2,20 @@
Name: pyicq-t
Version: 0.8.1.5
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: ICQ Transport for Jabber Servers
Group: Applications/Internet
License: GPLv2+
URL: http://code.google.com/p/pyicqt/
Source0: http://pyicqt.googlecode.com/files/pyicqt-%{version}.tar.gz
-Source1: pyicq-t.init
+Source1: pyicq-t.service
Source2: pyicq-t-tmpfiles.conf
Patch0: config.patch
BuildArch: noarch
BuildRequires: python-devel
+BuildRequires: systemd-units
Requires: python-twisted-core
Requires: python-twisted-web
Requires: python-twisted-words
@@ -24,10 +25,9 @@ Requires: pyOpenSSL
Requires(pre): shadow-utils
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
-Requires(postun): /sbin/service
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
%description
The ICQ Transport provides a gateway which allows Jabber users to
@@ -64,9 +64,6 @@ chmod 644 tools/migrate.py
mkdir -p %{buildroot}/etc/pyicq-t
mkdir -p %{buildroot}%{_datadir}/pyicq-t
mkdir -p %{buildroot}/var/spool/pyicq-t
-mkdir -p %{buildroot}%{_initrddir}
-
-cp %{S:1} %{buildroot}%{_initrddir}/pyicq-t
cp config_example.xml %{buildroot}/etc/pyicq-t/config.xml
@@ -74,6 +71,7 @@ cp PyICQt.py* %{buildroot}%{_datadir}/pyicq-t
cp -r data %{buildroot}%{_datadir}/pyicq-t
cp -r src %{buildroot}%{_datadir}/pyicq-t
+install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pyicq-t.service
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
install -D -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}/
@@ -86,24 +84,27 @@ rm -rf %{buildroot}
-s /sbin/nologin -r -d /var/spool/pyicq-t pyicqt 2> /dev/null || :
%post
-/sbin/chkconfig --add pyicq-t
+if [ $1 -eq 1 ] ; then
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
%preun
-if [ $1 = 0 ]; then
- /sbin/service pyicq-t stop >/dev/null 2>&1
- /sbin/chkconfig --del pyicq-t
+if [ $1 -eq 0 ] ; then
+ /bin/systemctl --no-reload disable apache-httpd.service > /dev/null 2>&1 || :
+ /bin/systemctl stop apache-httpd.service > /dev/null 2>&1 || :
fi
%postun
-if [ "$1" -ge "1" ]; then
- /sbin/service pyicq-t condrestart >/dev/null 2>&1
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ /bin/systemctl try-restart apache-httpd.service >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog config_example.xml COPYING INSTALL NEWS README tools/managessi.py tools/migrate.py
-%attr(0755,root,root) %{_initrddir}/pyicq-t
+%{_unitdir}/pyicq-t.service
%attr(0700,pyicqt,pyicqt) %dir %{_sysconfdir}/pyicq-t
%attr(0600,pyicqt,pyicqt) %config(noreplace) %{_sysconfdir}/pyicq-t/config.xml
@@ -127,6 +128,9 @@ fi
%{_datadir}/pyicq-t/src/xdb/mysql.py*
%changelog
+* Sun Jun 12 2011 Stefan Schulze Frielinghaus <stefansf at fedoraproject.org> - 0.8.1.5-10
+- Upgrade to systemd
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.1.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list