168 lines
3.8 KiB
RPMSpec
168 lines
3.8 KiB
RPMSpec
Name: guacamole
|
|
Version: 1.0.0
|
|
Release: 1%{?dist}
|
|
Epoch: 1
|
|
Summary: Web components from the Guacamole proxy
|
|
License: MPLv1.1 or GPLv2+
|
|
URL: http://guac-dev.org/
|
|
|
|
Source0: http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/%{version}/binary/%{name}-%{version}.war
|
|
|
|
%description
|
|
Guacamole Java webfrontend lalala
|
|
|
|
%package -n guacamole
|
|
Summary: The main java guacamole war
|
|
|
|
JINGUK: fixme here --maybe tomcat?
|
|
Summary: Proxy daemon for Guacamole
|
|
Requires(pre): shadow-utils
|
|
Requires: libguac%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
|
Requires(post): systemd
|
|
Requires(preun): systemd
|
|
Requires(postun): systemd
|
|
%endif
|
|
|
|
|
|
%prep
|
|
%autosetup
|
|
|
|
%build
|
|
export CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
|
|
autoreconf -vif
|
|
%configure \
|
|
--disable-silent-rules \
|
|
--disable-static
|
|
|
|
%make_build
|
|
cd doc/
|
|
doxygen Doxyfile
|
|
|
|
%install
|
|
%make_install
|
|
cp the war to the right location
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete
|
|
cp -fr doc/doxygen-output/html .
|
|
%if 0%{?rhel} == 6
|
|
rm -f html/installdox
|
|
%endif
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/guacd
|
|
mkdir -p %{buildroot}%{_sharedstatedir}/guacd
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
|
|
|
# Systemd unit files
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/guacd.service
|
|
|
|
%else
|
|
|
|
# Initscripts
|
|
mkdir -p %{buildroot}%{_initrddir}
|
|
install -p -m 755 -D %{SOURCE3} %{buildroot}%{_initrddir}/guacd
|
|
|
|
%endif
|
|
|
|
%pre -n guacd
|
|
getent group %username >/dev/null || groupadd -r %username &>/dev/null || :
|
|
getent passwd %username >/dev/null || useradd -r -s /sbin/nologin \
|
|
-d %{_sharedstatedir}/guacd -M -c 'Guacamole proxy daemon' -g %username %username &>/dev/null || :
|
|
exit 0
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
|
|
|
%post -n guacd
|
|
%systemd_post guacd.service
|
|
|
|
%preun -n guacd
|
|
%systemd_preun guacd.service
|
|
|
|
%postun -n guacd
|
|
%systemd_postun_with_restart guacd.service
|
|
|
|
%endif
|
|
|
|
%if 0%{?rhel} == 6
|
|
|
|
%post -n guacd
|
|
/sbin/chkconfig --add guacd
|
|
|
|
%preun -n guacd
|
|
if [ "$1" = 0 ]; then
|
|
/sbin/service guacd stop >/dev/null 2>&1 || :
|
|
/sbin/chkconfig --del guacd
|
|
fi
|
|
|
|
%postun -n guacd
|
|
if [ "$1" -ge "1" ]; then
|
|
/sbin/service guacd condrestart >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
%endif
|
|
|
|
%ldconfig_scriptlets -n libguac
|
|
|
|
%ldconfig_scriptlets -n libguac-client-rdp
|
|
|
|
%ldconfig_scriptlets -n libguac-client-ssh
|
|
|
|
%ldconfig_scriptlets -n libguac-client-vnc
|
|
|
|
%ldconfig_scriptlets -n libguac-client-telnet
|
|
|
|
%files -n libguac
|
|
%license LICENSE
|
|
%doc README CONTRIBUTING
|
|
%{_libdir}/libguac.so.*
|
|
|
|
%files -n libguac-devel
|
|
%doc html
|
|
%{_includedir}/*
|
|
%{_libdir}/libguac.so
|
|
|
|
# The libguac source code dlopen's these plugins, and they are named without
|
|
# the version in the shared object; i.e. "libguac-client-$(PROTOCOL).so".
|
|
|
|
%files -n libguac-client-rdp
|
|
%{_libdir}/libguac-client-rdp.so
|
|
%{_libdir}/libguac-client-rdp.so.*
|
|
%{_libdir}/freerdp/*.so
|
|
|
|
%files -n libguac-client-ssh
|
|
%{_libdir}/libguac-client-ssh.so
|
|
%{_libdir}/libguac-client-ssh.so.*
|
|
|
|
%files -n libguac-client-vnc
|
|
%{_libdir}/libguac-client-vnc.so
|
|
%{_libdir}/libguac-client-vnc.so.*
|
|
|
|
%files -n libguac-client-telnet
|
|
%{_libdir}/libguac-client-telnet.so
|
|
%{_libdir}/libguac-client-telnet.so.*
|
|
|
|
%files -n guacd
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/guacd
|
|
%{_bindir}/guaclog
|
|
%{?_with_ffmpeg:
|
|
%{_bindir}/guacenc
|
|
%{_mandir}/man1/guacenc.1.*
|
|
}
|
|
%{_mandir}/man1/guaclog.1.*
|
|
%{_mandir}/man5/guacd.conf.5.*
|
|
%{_mandir}/man8/guacd.8.*
|
|
%{_sbindir}/guacd
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
|
%{_unitdir}/guacd.service
|
|
%else
|
|
%{_initrddir}/guacd
|
|
%endif
|
|
%attr(750,%{username},%{username}) %{_sharedstatedir}/guacd
|
|
|
|
%changelog
|
|
* Sat Jan 26 2019 Simone Caronni <negativo17@gmail.com> - 1.0.0-1
|
|
- Update to version 1.0.0.
|