%define origname RDPMux %define _dbus_conf_dir /etc/dbus-1/system.d %define libprefix lib%{name} %define devname %{libprefix}-devel %define libname %{libprefix} # Build with regular freerdp by default %bcond_with nightly_freerdp Name: rdpmux Version: 0.6.5 Release: 0%{?dist}.1 Summary: RDP server multiplexer designed to work with virtual machines #SourceLicense: ASL 2.0 and MIT License: ASL 2.0 URL: https://github.com/datto/RDPMux Source0: https://github.com/datto/%{origname}/archive/v%{version}/%{origname}-%{version}.tar.gz BuildRequires: cmake >= 3.2 %if %{with nightly_freerdp} BuildRequires: freerdp-nightly-devel >= 2.0.0 Requires: freerdp-nightly >= 2.0.0 %else BuildRequires: freerdp-devel >= 2.0 %endif BuildRequires: gtkmm24-devel BuildRequires: msgpack-devel BuildRequires: zeromq-devel >= 4.1.0 BuildRequires: boost-devel BuildRequires: pixman-devel BuildRequires: czmq-devel Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description %{origname} provides multiplexed RDP servers for virtual machines. It communicates with VMs via %{libprefix}, which implements the communication protocol and exposes an API for hypervisors to hook into. %package -n %{libname} Summary: Library for implementing hypervisor-side functionality Group: System Environment/Libraries License: MIT %description -n %{libname} This library provides a defined interface to interact with virtual machine guests on a very low level. It provides access to the current framebuffer of the VM, and to programmatically send and receive keyboard and mouse events. %package -n %{devname} Summary: Development files for %{libprefix} Group: Development/Libraries License: MIT Requires: %{libname}%{?_isa} = %{version}-%{release} %description -n %{devname} The %{devname} package contains configuration and header files for developing applications that use %{libprefix}. %prep %setup -qn %{origname}-%{version} %build %cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo %{?with_nightly_freerdp:-DENABLE_FREERDP_NIGHTLY=1} %make_build V=1 %install %make_install mkdir -p %{buildroot}%{_unitdir} install -pm 0644 dist/rdpmux.service %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_dbus_conf_dir} install -pm 0644 dist/org.RDPMux.RDPMux.conf %{buildroot}%{_dbus_conf_dir} # Setting up files for ghost file list directive mkdir -p %{buildroot}%{_sysconfdir}/rdpmux/shadow touch %{buildroot}%{_sysconfdir}/rdpmux/shadow/server.key touch %{buildroot}%{_sysconfdir}/rdpmux/shadow/server.crt %ldconfig_scriptlets -n %{libname} %post %systemd_post rdpmux.service %preun %systemd_preun rdpmux.service %postun %systemd_postun_with_restart rdpmux.service %files %{_bindir}/rdpmux %{_unitdir}/rdpmux.service %{_dbus_conf_dir}/org.RDPMux.RDPMux.conf %ghost %{_sysconfdir}/rdpmux %ghost %{_sysconfdir}/rdpmux/shadow %ghost %{_sysconfdir}/rdpmux/shadow/server.key %ghost %{_sysconfdir}/rdpmux/shadow/server.crt %license LICENSE %files -n %{libname} %license LICENSE.LIB %{_libdir}/*.so.* %files -n %{devname} %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %changelog * Wed Apr 25 2018 Neal Gompa - 0.6.5-0.1 - Build for COPR * Fri Jan 12 2018 Neal Gompa - 0.6.5-1 - Bump to 0.6.5 * Wed Jan 10 2018 Sri Ramanujam - 0.6.4-1 - Bump to 0.6.4 * Tue Dec 05 2017 Neal Gompa - 0.6.3-1 - Bump to 0.6.3 * Mon Dec 04 2017 Neal Gompa - 0.6.2-1 - Bump to 0.6.2 * Wed Nov 29 2017 Neal Gompa - 0.6.1-1 - Bump to 0.6.1 * Mon Aug 28 2017 Neal Gompa - 0.6.0-3 - Actually start service after enabling on Ubuntu 14.04 only * Mon Aug 28 2017 Sri Ramanujam - 0.6.0-2 - Set up RDPMux upstart job to start as conventional system service * Fri Aug 25 2017 Neal Gompa - 0.6.0-1 - Bump to 0.6.0 * Tue Jun 27 2017 Sri Ramanujam - 0.5.0 - Bump to 0.5.0 * Thu Jul 14 2016 Sri Ramanujam - 0.4.1 - Bump to 0.4.1 * Wed Jul 13 2016 Neal Gompa - 0.4.0 - Bump to 0.4.0 * Thu May 26 2016 Anthony Gargiulo - 0.2.4 - Bump to 0.2.4 * Wed May 25 2016 Neal Gompa - 0.2.3 - Bump to 0.2.3 - Added missing deps (Anthony Gargiulo) * Tue May 24 2016 Neal Gompa - 0.2.2 - Bump to 0.2.2 * Tue May 24 2016 Anthony Gargiulo - 0.2.1 - Added DBus conf and systemd service files - Changed file and directory permissions to 777 * Thu May 19 2016 Neal Gompa - 0.2.0 - Fixes to the spec to match Debian conventions * Tue May 17 2016 Sri Ramanujam - 0.2.0-1 - New DBus registration protocol * Fri Apr 29 2016 Sri Ramanujam - 0.1.2-1 - Initial packaging