- add support for systemd
This commit is contained in:
parent
86e0ee81c3
commit
1880550ff3
87
xrdp.spec
87
xrdp.spec
@ -2,41 +2,36 @@
|
||||
|
||||
Summary: Open source remote desktop protocol (RDP) server
|
||||
Name: xrdp
|
||||
Version: 0.5.0
|
||||
Release: 0.15%{?dist}
|
||||
Version: 0.6.0
|
||||
Release: 1.0%{?dist}
|
||||
License: GPLv2+ with exceptions
|
||||
Group: Applications/Internet
|
||||
URL: http://xrdp.sourceforge.net/
|
||||
Source0: http://server1.xrdp.org/xrdp/xrdp-HEAD-a9cfc23.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Source0: http://server1.xrdp.org/xrdp/xrdp-%{version}.tar.gz
|
||||
|
||||
Patch0: xrdp-pam-auth.patch
|
||||
Patch1: xrdp-use-xinitrc-in-startm-sh.patch
|
||||
Patch2: xrdp-0.5.0-version.patch
|
||||
|
||||
Source1: xrdp.init
|
||||
Source2: xrdp.sysconfig
|
||||
Source3: xrdp.logrotate
|
||||
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
Buildrequires: libX11-devel
|
||||
BuildRequires: libXfixes-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
Buildrequires: libX11-devel
|
||||
BuildRequires: libXfixes-devel
|
||||
BuildRequires: systemd-units
|
||||
|
||||
#vnc-server provides Xvnc (tigervnc-server in fedora)
|
||||
Requires: tigervnc-server-minimal
|
||||
|
||||
#initscripts requires
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
# This is for /sbin/service
|
||||
Requires(preun): initscripts
|
||||
# This is for /sbin/service
|
||||
Requires(postun): initscripts
|
||||
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
Requires(post): systemd-sysv
|
||||
|
||||
%description
|
||||
The goal of this project is to provide a fully functional Linux terminal
|
||||
@ -44,10 +39,9 @@ server, capable of accepting connections from rdesktop and Microsoft's own
|
||||
terminal server / remote desktop clients.
|
||||
|
||||
%prep
|
||||
%setup -q -n xrdp-HEAD-a9cfc23
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p2
|
||||
%patch1 -p2
|
||||
%patch2 -p2
|
||||
|
||||
|
||||
# remove unused modules from xrdp login combobox
|
||||
@ -60,9 +54,6 @@ terminal server / remote desktop clients.
|
||||
# increase encryption to 128 bit's
|
||||
%{__sed} -i 's/crypt_level=low/crypt_level=high/g' xrdp/xrdp.ini
|
||||
|
||||
#fix wrong permission
|
||||
%{__chmod} 644 keygen/keygen.c
|
||||
|
||||
%build
|
||||
./bootstrap
|
||||
|
||||
@ -98,31 +89,38 @@ touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
|
||||
%{__chmod} 0600 %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
|
||||
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ] ; then
|
||||
/sbin/service %{name} stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del %{name}
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%post
|
||||
# This adds the proper /etc/rc*.d links for the script
|
||||
/sbin/chkconfig --add %{name}
|
||||
|
||||
xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini > /dev/null
|
||||
%{__chmod} 0600 %{_sysconfdir}/xrdp/rsakeys.ini
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable xrdp.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop xrdp.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart apache-httpd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
%triggerun -- xrdp < 0.6.0-1
|
||||
/usr/bin/systemd-sysv-convert --save xrdp >/dev/null 2>&1 ||:
|
||||
|
||||
# If the package is allowed to autostart:
|
||||
/bin/systemctl --no-reload enable xrdp.service >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del xrdp >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart xrdp.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING *.txt
|
||||
%dir %{_libdir}/xrdp
|
||||
%dir %{_sysconfdir}/xrdp
|
||||
@ -139,6 +137,7 @@ rm -rf %{buildroot}
|
||||
%{_bindir}/xrdp-sesadmin
|
||||
%{_bindir}/xrdp-keygen
|
||||
%{_bindir}/xrdp-sesrun
|
||||
%{_bindir}/xrdp-dis
|
||||
%{_bindir}/xrdp-sestest
|
||||
%{_sbindir}/xrdp-chansrv
|
||||
%{_sbindir}/xrdp
|
||||
@ -161,10 +160,16 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/xrdp/libvnc.so
|
||||
%{_libdir}/xrdp/libxrdp.so
|
||||
%{_libdir}/xrdp/libxup.so
|
||||
/lib/systemd/system/xrdp-sesman.service
|
||||
/lib/systemd/system/xrdp.service
|
||||
|
||||
%ghost %{_localstatedir}/log/xrdp-sesman.log
|
||||
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini
|
||||
|
||||
%changelog
|
||||
* Sat Feb 04 2012 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.5.0-0.16
|
||||
- add support for systemd
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-0.15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user