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
%else
BuildRequires:  libopenssl-devel
%endif
%if %{with_rdp}
BuildRequires:  freerdp1-devel
%endif

%description
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}.

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

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

%install
make install DESTDIR=%{buildroot}
pushd %buildroot/etc/init.d
mv guacd %{name}
popd
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
%{_libdir}/freerdp
EOF
%endif
# 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}

%pre
%service_add_pre %{name}.service

%preun
%service_del_preun %{name}.service

%post
%service_add_post %{name}.service
/sbin/ldconfig

%postun
%service_del_postun %{name}.service
/sbin/ldconfig


%files
%defattr(-,root,root)
%license LICENSE
%doc README
%dir %{_sysconfdir}/guacamole
%config(noreplace) %{_sysconfdir}/guacamole/guacd.conf
%{_unitdir}/%{name}.service
%{_libdir}/*.so.*
%{_mandir}/man1/guac*
%{_mandir}/man5/guacd*
%{_mandir}/man8/guacd*
%{_sbindir}/guacd
%{_sbindir}/rc%{name}
%{_bindir}/guacenc
%{_bindir}/guaclog
%if %{with_rdp}
%config %{_sysconfdir}/ld.so.conf.d/guacamole.conf
{_libdir}/freerdp/*.so
%endif

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/*.la
%{_libdir}/*.a
%{_includedir}/*
%if %{with_rdp}
%dir %%{_libdir}/freerdp
%{_libdir}/freerdp/*.la
%endif


%changelog