drop SysV init
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
This commit is contained in:
parent
ee6b9db384
commit
d9c48b485a
47
gpm.spec
47
gpm.spec
@ -1,14 +1,13 @@
|
||||
Summary: A mouse server for the Linux console
|
||||
Name: gpm
|
||||
Version: 1.20.6
|
||||
Release: 16%{?dist}
|
||||
Release: 17%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.nico.schottelius.org/software/gpm/
|
||||
Source: http://www.nico.schottelius.org/software/gpm/archives/%{name}-%{version}.tar.lzma
|
||||
Source1: gpm.init
|
||||
Source1: gpm.service
|
||||
Source2: inputattach.c
|
||||
Source3: gpm.service
|
||||
Patch1: gpm-1.20.6-multilib.patch
|
||||
Patch2: gpm-1.20.1-lib-silent.patch
|
||||
Patch3: gpm-1.20.3-gcc4.3.patch
|
||||
@ -16,10 +15,9 @@ Patch4: gpm-1.20.5-close-fds.patch
|
||||
Patch5: gpm-1.20.1-weak-wgetch.patch
|
||||
Patch6: gpm-1.20.6-libtool.patch
|
||||
#Patch7: gpm-1.20.6-capability.patch
|
||||
Requires(post): /sbin/chkconfig /sbin/install-info /sbin/ldconfig
|
||||
Requires(preun): /sbin/chkconfig /sbin/install-info
|
||||
Requires(postun): /sbin/ldconfig
|
||||
Requires: systemd-units
|
||||
Requires(post): systemd-units systemd-sysv chkconfig info
|
||||
Requires(preun): systemd-units info
|
||||
Requires(postun): systemd-units
|
||||
# this defines the library version that this package builds.
|
||||
%define LIBVER 2.1.0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
||||
@ -96,9 +94,10 @@ mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||
mkdir -p %{buildroot}/lib/systemd/system/
|
||||
install -m 755 inputattach %{buildroot}%{_sbindir}
|
||||
install -m 644 conf/gpm-* %{buildroot}%{_sysconfdir}
|
||||
install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/gpm
|
||||
install -m 644 %{SOURCE3} %{buildroot}/lib/systemd/system/
|
||||
|
||||
# Systemd
|
||||
mkdir -p %{buildroot}/lib/systemd/system
|
||||
install -m644 %{SOURCE1} %{buildroot}/lib/systemd/system
|
||||
rm -rf %{buildroot}%{_initrddir}
|
||||
%else
|
||||
# we're shipping only libraries in s390[x], so
|
||||
# remove stuff from the buildroot that we aren't shipping
|
||||
@ -131,11 +130,9 @@ fi
|
||||
|
||||
%preun
|
||||
%ifnarch s390 s390x
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service gpm stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del gpm
|
||||
/bin/systemctl disable gpm.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop gpm.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
/bin/systemctl try-restart gpm.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
if [ $1 = 0 -a -e %{_infodir}/gpm.info.gz ]; then
|
||||
@ -144,16 +141,18 @@ fi
|
||||
|
||||
%postun
|
||||
%ifnarch s390 s390x
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service gpm condrestart >/dev/null 2>&1
|
||||
# On upgrade, reload init system configuration if we changed unit files
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
# On upgrade, restart the daemon
|
||||
/bin/systemctl try-restart gpm.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
if [ $1 = 0 ]; then
|
||||
/bin/systemctl --no-reload gpm.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop gpm.service > /dev/null 2>&1 || :
|
||||
%endif
|
||||
/sbin/ldconfig
|
||||
|
||||
%triggerun -- gpm < 1.20.6-17
|
||||
%{_bindir}/systemd-sysv-convert --save gpm >/dev/null 2>&1 ||:
|
||||
/bin/systemctl enable gpm.service >/dev/null 2>&1
|
||||
/sbin/chkconfig --del gpm >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart gpm.service >/dev/null 2>&1 || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc BUGS COPYING README TODO
|
||||
@ -161,7 +160,6 @@ fi
|
||||
%{_infodir}/*
|
||||
%ifnarch s390 s390x
|
||||
%config(noreplace) %{_sysconfdir}/gpm-*
|
||||
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/gpm
|
||||
/lib/systemd/system/gpm.service
|
||||
%{_sbindir}/*
|
||||
%{_bindir}/*
|
||||
@ -182,6 +180,9 @@ fi
|
||||
%{_libdir}/libgpm.a
|
||||
|
||||
%changelog
|
||||
* Tue Jul 26 2011 Jóhann B. Guðmundsson <johannbg@gmail.com> - 1.20.6-17
|
||||
- Drop SysV support
|
||||
|
||||
* Thu May 05 2011 Bill Nottingham <notting@redhat.com> 1.20.6-16
|
||||
- Fix systemd scriptlets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user