diff --git a/freerdp.spec b/freerdp.spec index 65b1e1735..96c655e61 100644 --- a/freerdp.spec +++ b/freerdp.spec @@ -1,38 +1,51 @@ -# cmake -# make package_source # rpmbuild -ta freerdp-<...>.tar.gz -Summary: Remote Desktop Protocol functionality -Name: freerdp -Version: 1.0.0 -Release: 1%{?dist} -License: Apache License 2.0 -Group: Applications/Communications -URL: http://www.freerdp.com/ -Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Name: freerdp +Version: 1.0.1 +Release: 1%{?dist} +Summary: Remote Desktop Protocol functionality + +Group: Applications/Communications +License: Apache License 2.0 +URL: http://www.freerdp.com/ +Source0: https://github.com/downloads/FreeRDP/FreeRDP/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: cmake +BuildRequires: xmlto BuildRequires: openssl-devel -BuildRequires: libX11-devel, libXcursor-devel, libXext-devel, libXinerama-devel, libXdamage-devel, libXv-devel, libxkbfile-devel -BuildRequires: cups-devel -BuildRequires: alsa-lib-devel -BuildRequires: pcsc-lite-devel +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libXinerama-devel +BuildRequires: libXcursor-devel +BuildRequires: libXdamage-devel +BuildRequires: libXv-devel +BuildRequires: libxkbfile-devel +BuildRequires: pulseaudio-libs-devel +BuildRequires: cups-devel +BuildRequires: alsa-lib-devel +BuildRequires: pcsc-lite-devel +BuildRequires: desktop-file-utils %description FreeRDP is a free implementation of the Remote Desktop Protocol (RDP) according to the Microsoft Open Specifications. -%package -n xfreerdp -Summary: Remote Desktop Protocol client -Group: Applications/Communications -Requires: %{name}-libs = %{version}-%{release}, %{name}-plugins-standard = %{version}-%{release} -%description -n xfreerdp + +%package -n xfreerdp +Summary: Remote Desktop Protocol client +Group: Applications/Communications +Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-plugins-standard = %{version}-%{release} +%description -n xfreerdp FreeRDP is a free implementation of the Remote Desktop Protocol (RDP) according to the Microsoft Open Specifications. -%package libs -Summary: Core libraries implementing the RDP protocol -Group: Applications/Communications -%description libs + +%package libs +Summary: Core libraries implementing the RDP protocol +Group: Applications/Communications +%description libs libfreerdp-core can be embedded in applications. libfreerdp-channels and libfreerdp-kbd might be convenient to use in X @@ -40,68 +53,112 @@ applications together with libfreerdp-core. libfreerdp-core can be extended with plugins handling RDP channels. -%package plugins-standard -Summary: Plugins for handling the standard RDP channels -Group: Applications/Communications -Requires: %{name}-libs = %{version}-%{release} -%description plugins-standard +%package plugins-standard +Summary: Plugins for handling the standard RDP channels +Group: Applications/Communications +Requires: %{name}-libs = %{version}-%{release} +%description plugins-standard A set of plugins to the channel manager implementing the standard virtual channels extending RDP core functionality. For instance, sounds, clipboard sync, disk/printer redirection, etc. -%package devel -Summary: Libraries and header files for embedding and extending freerdp -Group: Applications/Communications -Requires: %{name}-libs = %{version}-%{release} -Requires: pkgconfig -%description devel + +%package devel +Summary: Libraries and header files for embedding and extending freerdp +Group: Applications/Communications +Requires: %{name}-libs = %{version}-%{release} +Requires: pkgconfig +%description devel Header files and unversioned libraries for libfreerdp-core, libfreerdp-channels, libfreerdp-kbd, libfreerdp-cache, libfreerdp-codec, libfreerdp-rail, libfreerdp-gdi and libfreerdp-utils. %prep + %setup -q +cat << EOF > xfreerdp.desktop +[Desktop Entry] +Type=Application +Name=X FreeRDP +NoDisplay=true +Comment=Connect to RDP server and display remote desktop +Icon=%{name} +Exec=/usr/bin/xfreerdp +Terminal=false +Categories=Network;RemoteAccess; +EOF + + %build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DWITH_PCSC=ON . + +cmake \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DWITH_CUPS:BOOL=ON \ + -DWITH_PCSC:BOOL=ON \ + -DWITH_PULSEAUDIO:BOOL=ON \ + -DWITH_X11:BOOL=ON \ + -DWITH_XCURSOR:BOOL=ON \ + -DWITH_XEXT:BOOL=ON \ + -DWITH_XINERAMA:BOOL=ON \ + -DWITH_XKBFILE:BOOL=ON \ + -DWITH_XV:BOOL=ON \ + -DWITH_ALSA:BOOL=ON \ + -DWITH_CUNIT:BOOL=OFF \ + -DWITH_DIRECTFB:BOOL=OFF \ + -DWITH_FFMPEG:BOOL=OFF \ + -DWITH_SSE2:BOOL=OFF \ + . make %{?_smp_mflags} + %install rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT%{_libdir}/{freerdp/,lib}*.{a,la} # FIXME: They shouldn't be installed in the first place -%post libs -p /sbin/ldconfig +make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' + +desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications xfreerdp.desktop +install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png -%postun libs -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT + +%post +# This is no gtk application, but try to integrate nicely with GNOME if it is available +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%post libs -p /sbin/ldconfig + + +%postun libs -p /sbin/ldconfig + + %files -n xfreerdp -%defattr(-,root,root) +%defattr(-,root,root,-) %{_bindir}/xfreerdp -%{_mandir}/*/* +%{_mandir}/man1/xfreerdp.* +%{_datadir}/applications/xfreerdp.desktop +%{_datadir}/icons/hicolor/256x256/apps/%{name}.png %files libs -%defattr(-,root,root) -%doc LICENSE README -%{_libdir}/lib*.so.* -%dir %{_libdir}/freerdp -%{_datadir}/freerdp/ +%defattr(-,root,root,-) +%doc LICENSE README ChangeLog +%{_libdir}/lib%{name}-*.so.* +%dir %{_libdir}/%{name}/ %files plugins-standard -%defattr(-,root,root) -%{_libdir}/freerdp/*.so +%defattr(-,root,root,-) +%{_libdir}/%{name}/* %files devel -%defattr(-,root,root) -%{_includedir}/freerdp/ -%{_libdir}/lib*.so -%{_libdir}/pkgconfig/* +%defattr(-,root,root,-) +%{_includedir}/%{name}/ +%{_libdir}/lib%{name}-*.so +%{_libdir}/pkgconfig/%{name}.pc + %changelog - -* Tue Mar 16 2010 Mads Kiilerich - 0.0.1-1 -- Initial "upstream" freerdp spec - made and tested for Fedora 12