116 lines
3.3 KiB
RPMSpec
116 lines
3.3 KiB
RPMSpec
|
%define x2gouser_uid 65057
|
||
|
%define x2gouser_gid 65057
|
||
|
%define x2goprint_uid 65058
|
||
|
%define x2goprint_gid 65058
|
||
|
|
||
|
Name: x2goserver
|
||
|
Version: 4.0.1.19
|
||
|
Release: 1mamba
|
||
|
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
|
||
|
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
|
||
|
Requires: perl-DBD-SQLite
|
||
|
Requires: nx-libs
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
X2Go is a Remote Desktop server.
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
|
||
|
%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
|
||
|
|
||
|
%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
|
||
|
[ -e /var/lib/x2go/x2go_sessions ] || x2godbadmin --createdb
|
||
|
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
|
||
|
%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(noreplace) %{_sysconfdir}/x2go/x2goserver.conf
|
||
|
%config %{_sysconfdir}/x2go/x2gosql/sql
|
||
|
%{_bindir}/x2go*
|
||
|
%attr(2755,root,x2goprint) %{_bindir}/x2goprint
|
||
|
%dir %{_prefix}/lib/x2go
|
||
|
%dir %{_prefix}/lib/x2go/extensions
|
||
|
%{_prefix}/lib/x2go/extensions*/
|
||
|
%{_prefix}/lib/x2go/x2go*
|
||
|
%attr(2755,root,x2gouser) %{_prefix}/lib/x2go/x2gosqlitewrapper
|
||
|
%{_sbindir}/x2go*
|
||
|
%{_datadir}/applications/x2gofm.desktop
|
||
|
%{_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*
|
||
|
%attr(0770,x2goprint,x2goprint) /var/spool/x2goprint
|
||
|
%attr(0770,x2gouser,x2gouser) /var/lib/x2go
|
||
|
%doc COPYING
|
||
|
|
||
|
%changelog
|
||
|
* Thu Nov 26 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.1.19-1mamba
|
||
|
- package created using the webbuild interface
|