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