x2goserver/x2goserver.spec

170 lines
5.1 KiB
RPMSpec
Raw Normal View History

%define x2gouser_uid 65057
%define x2gouser_gid 65057
%define x2goprint_uid 65058
%define x2goprint_gid 65058
Name: x2goserver
Version: 4.1.0.3
Release: 2mamba
Summary: A Remote Desktop server
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://wiki.x2go.org/
Source: http://code.x2go.org/releases/source/x2goserver/x2goserver-%{version}.tar.gz
Patch0: x2goserver-x86_64-lib-nx.patch
Patch1: x2goserver-4.0.1.19-kde-path.patch
Patch2: x2goserver-4.1.0.0-openmamba-enable.patch
Patch3: x2goserver-4.0.1.19-fix-local-desktop.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libperl
BuildRequires: perl-Capture-Tiny
BuildRequires: perl-Config-Simple
BuildRequires: perl-DBI
BuildRequires: perl-File-BaseDir
BuildRequires: perl-File-Which
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: man2html
Requires: perl-DBD-SQLite
Requires: x2goagent
Provides: x2godesktopsharing
Obsoletes: x2godesktopsharing
#Requires: nx-libs
Requires: sshfs
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
X2Go is a Remote Desktop server.
%prep
%setup -q
%ifarch x86_64
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
#%patch3 -p1
%build
%make PREFIX=%{_prefix}
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall PREFIX=%{_prefix} \
INSTALL_DIR="install -d -m755" \
INSTALL_FILE="install -m644" \
INSTALL_PROGRAM="install -m755"
install -d -m0775 %{buildroot}/var/lib/x2go
install -d -m0770 %{buildroot}/var/spool/x2goprint
rm -f %{buildroot}%{_bindir}/x2goagent
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
/usr/sbin/groupadd x2gouser -g %{x2gouser_uid} 2>/dev/null
/usr/sbin/useradd -u %{x2gouser_uid} -c 'x2go user' \
-d /var/lib/x2go -g x2gouser -s /bin/false x2gouser 2>/dev/null
/usr/sbin/groupadd x2goprint -g %{x2goprint_uid} 2>/dev/null
/usr/sbin/useradd -u %{x2goprint_uid} -c 'x2go print' \
-d /var/spool/x2goprint -g x2goprint -s /bin/false x2goprint 2>/dev/null
fi
exit 0
%post
if [ $1 -ge 1 ]; then
if [ -e /var/lib/x2go/x2go_sessions ]; then
x2godbadmin --createdb
else
x2godbadmin --updatedb
fi
fi
exit 0
%preun
if [ $1 -eq 0 ]; then
/usr/sbin/groupdel x2gouser 2>/dev/null
/usr/sbin/userdel x2gouser 2>/dev/null
/usr/sbin/groupdel x2goprint 2>/dev/null
/usr/sbin/userdel x2goprint 2>/dev/null
fi
exit 0
%files
%defattr(-,root,root)
%{_sysconfdir}/logcheck/ignore.d.server/x2goserver
%{_sysconfdir}/x2go/desktopsharing/settings
%attr(0440,root,root) %{_sysconfdir}/sudoers.d/x2goserver
%dir %{_sysconfdir}/x2go
%config %{_sysconfdir}/x2go/Xresources
%config %{_sysconfdir}/x2go/Xsession
%config %{_sysconfdir}/x2go/x2go_logout
%config %{_sysconfdir}/x2go/x2go_logout.d/010_userscripts.sh
%config %{_sysconfdir}/x2go/x2goagent.options
%config %{_sysconfdir}/x2go/keystrokes.cfg
%config %{_sysconfdir}/x2go/x2goagent.keyboard
%config(noreplace) %{_sysconfdir}/x2go/x2goserver.conf
%config %{_sysconfdir}/x2go/x2gosql/sql
%{_bindir}/x2go*
%attr(2755,root,x2goprint) %{_bindir}/x2goprint
%{_tmpfilesdir}/x2goserver.conf
%dir %{_prefix}/lib/x2go
%dir %{_prefix}/lib/x2go/extensions
%{_prefix}/lib/x2go/extensions/*
%{_prefix}/lib/x2go/x2go*
%{_prefix}/lib/x2go/libx2go-server-db-sqlite3-wrapper*
%{_prefix}/lib/nx/bin/x2goagent
#%attr(2755,root,x2gouser) %{_prefix}/lib/x2go/x2gosqlitewrapper
%{_sbindir}/x2go*
%{_datadir}/applications/x2gofm.desktop
%{_datadir}/pixmaps/x2goagent.xpm
%{_mandir}/man5/x2goserver.conf.5*
%{_mandir}/man8/x2go*.8*
%{_datadir}/mime/packages/sshfs-x2go.xml
%dir %{_datadir}/x2go/versions
%{_datadir}/x2go/versions/VERSION.x2goserver*
%dir %{_datadir}/x2go/x2gofeature.d
%{_datadir}/x2go/x2gofeature.d/x2goserver*
%dir %{perl_vendorlib}/X2Go
%{perl_vendorlib}/X2Go/*
%{perl_vendorarch}/auto/x2goserver/.packlist
%{_mandir}/man1/x2goagent.1*
%{_mandir}/man3/X2Go*.3pm*
%attr(0770,x2goprint,x2goprint) /var/spool/x2goprint
%attr(0770,x2gouser,x2gouser) /var/lib/x2go
%doc COPYING
%changelog
* Fri Nov 08 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.0.3-2mamba
- provide/obsolete x2godesktopsharing
* Fri Dec 28 2018 Automatic Build System <autodist@mambasoft.it> 4.1.0.3-1mamba
- automatic version update by autodist
* Mon Aug 20 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.0.2-2mamba
- provide/obsolete x2goagent
* Mon Aug 13 2018 Automatic Build System <autodist@mambasoft.it> 4.1.0.2-1mamba
- automatic version update by autodist
* Thu Dec 15 2016 Automatic Build System <autodist@mambasoft.it> 4.0.1.20-1mamba
- automatic version update by autodist
* Sun Oct 23 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.1.19-3mamba
- added patch to fix access to local desktop (see https://bbs.archlinux.org/viewtopic.php?id=189061)
* Thu Apr 07 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.1.19-2mamba
- require sshfs and x86_64: patch for nx libs path, kde path and openmamba in Xsession
* Thu Nov 26 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.1.19-1mamba
- package created using the webbuild interface