LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File guacamole-server.spec of Package guacamole-server (Project home:ecsos:server)

# spec file for package guacamole-server
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# See also http://en.opensuse.org/openSUSE:Specfile_guidelines

# guacamole need freerdp1
%define with_rdp 0

Name:           guacamole-server
Version:        1.0.0
Release:        0
Summary:        Clientless remote desktop gateway
License:        Apache-2.0
Group:          Productivity/Networking/Other
Url:            http://guac-dev.org/
#Source0:        http://sourceforge.net/projects/guacamole/files/current/source/%%{name}-%%{version}.tar.gz
Source0:        https://www.apache.org/dist/guacamole/%{version}/source/guacamole-server-%{version}.tar.gz
Source1:        guacd.conf
Source2:        %{name}.service
Patch0:         %{name}.patch
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(libssh2)
BuildRequires:  pkgconfig(libvncserver)
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(ossp-uuid)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libswscale)
BuildRequires:  pkgconfig(libavresample)
BuildRequires:  pkgconfig(libjpeg)
%if %{?suse_version} >= 1500
BuildRequires:  libopenssl-1_0_0-devel
BuildRequires:  libopenssl-devel
%if %{with_rdp}
BuildRequires:  freerdp1-devel

Guacamole is an HTML5 web application that provides access to desktop environments using remote desktop protocols such as VNC or RDP.
A centralized server acts as a tunnel and proxy, allowing access to multiple desktops through a web browser. 
No plugins are needed: the client requires nothing more than a web browser supporting HTML5 and AJAX.
This is the server-part.

%package devel
Summary:	Development files for guacamole-server
Group:		Development/Libraries/C and C++
Requires:	%{name} = %{version}

%description devel
This package provides development libraries and headers needed
to build %{name}.

%setup -q -n %{name}-%{version}
%patch0 -p1

export CPPFLAGS="%{optflags} -Wno-deprecated-declarations"
%configure --with-init-dir=/etc/init.d --with-rdp
make %{?_smp_mflags}

make install DESTDIR=%{buildroot}
pushd %buildroot/etc/init.d
mv guacd %{name}
install -D -m 644 %{S:1} %{buildroot}%{_sysconfdir}/guacamole/guacd.conf
# include freerdp libs
%if %{with_rdp}
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
cat <<EOF >%{buildroot}%{_sysconfdir}/ld.so.conf.d/guacamole.conf
# install systemd.service file
rm %{buildroot}%{_sysconfdir}/init.d/%{name}
install -D -m 644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service
ln -s -f %{_sbindir}/guacd %{buildroot}%{_sbindir}/rc%{name}

%service_add_pre %{name}.service

%service_del_preun %{name}.service

%service_add_post %{name}.service

%service_del_postun %{name}.service

%license LICENSE
%dir %{_sysconfdir}/guacamole
%config(noreplace) %{_sysconfdir}/guacamole/guacd.conf
%if %{with_rdp}
%config %{_sysconfdir}/ld.so.conf.d/guacamole.conf

%files devel
%if %{with_rdp}
%dir %%{_libdir}/freerdp