From e2f1bc2270fd4bc2433298aacc3dc578a57d704b Mon Sep 17 00:00:00 2001 From: Anthony Tong Date: Wed, 19 Oct 2011 07:21:14 -0500 Subject: [PATCH] update build for rpm spec --- .gitignore | 1 + CMakeLists.txt | 7 ++++ freerdp.pc | 13 ------- freerdp.spec | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+), 13 deletions(-) delete mode 100644 freerdp.pc create mode 100644 freerdp.spec diff --git a/.gitignore b/.gitignore index 3dfc72a..2735a4b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ CMakeCache.txt config.h install_manifest.txt CTestTestfile.cmake +freerdp.pc # Make Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt index 0240a2b..20db684 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,3 +168,10 @@ add_subdirectory(client) add_subdirectory(server) add_subdirectory(keymaps) +# Source package +set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/\\\\.gitignore;/CMakeCache.txt") + +string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_PROJECT_NAME_lower) +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME_lower}-${FREERDP_VERSION_FULL}") + +include(CPack) diff --git a/freerdp.pc b/freerdp.pc deleted file mode 100644 index 950777d..0000000 --- a/freerdp.pc +++ /dev/null @@ -1,13 +0,0 @@ -prefix=/usr/local -exec_prefix=/usr/local -libdir=/usr/local/lib -includedir=/usr/local/include - -Name: FreeRDP -Description: A free remote desktop protocol client -URL: http://www.freerdp.com/ -Version: 0.0.0 -Requires: -Libs: -L${libdir} -lfreerdp-core -lfreerdp-codec -lfreerdp-gdi -lfreerdp-kbd -lfreerdp-rail -lfreerdp-chanman -lfreerdp-utils -Cflags: -I${includedir} - diff --git a/freerdp.spec b/freerdp.spec new file mode 100644 index 0000000..47602cc --- /dev/null +++ b/freerdp.spec @@ -0,0 +1,106 @@ +# cmake +# make package_source +# rpmbuild -ta freerdp-<...>.tar.gz + +Summary: Remote Desktop Protocol functionality +Name: freerdp +Version: 0.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 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: openssl-devel +BuildRequires: libX11-devel, libXcursor-devel, libXext-devel, libXinerama-devel, libXv-devel, libxkbfile-devel +BuildRequires: cups-devel +BuildRequires: alsa-lib-devel +BuildRequires: pcsc-lite-devel + +%description +freerdp implements Remote Desktop Protocol (RDP), used in a number of Microsoft +products. + +%package -n xfreerdp +Summary: Remote Desktop Protocol client +Group: Applications/Communications +Requires: %{name}-libs = %{version}-%{release}, %{name}-plugins-standard = %{version}-%{release} +%description -n xfreerdp +xfreerdp is a client for Remote Desktop Protocol (RDP), used in a number of +Microsoft products. + +%package libs +Summary: Core libraries implementing the RDP protocol +Group: Applications/Communications +%description libs +libfreerdp can be embedded in applications. + +libfreerdpchanman and libfreerdpkbd might be convenient to use in X +applications together with libfreerdp. + +libfreerdp 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 +A set of plugins to the channel manager implementing the standard virtual +channels extending RDP core functionality. For example, 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 +Header files and unversioned libraries for libfreerdp, libfreerdpchanman and +libfreerdpkbd. + +%prep +%setup -q + +%build +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DWITH_PCSC=ON . + +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 + +%postun libs -p /sbin/ldconfig + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -n xfreerdp +%defattr(-,root,root) +%{_bindir}/xfreerdp +%{_mandir}/*/* + +%files libs +%defattr(-,root,root) +%doc LICENSE README +%{_libdir}/lib*.so.* +%dir %{_libdir}/freerdp +%{_datadir}/freerdp/ + +%files plugins-standard +%defattr(-,root,root) +%{_libdir}/freerdp/*.so + +%files devel +%defattr(-,root,root) +%{_includedir}/freerdp/ +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/* + +%changelog + +* Tue Mar 16 2010 Mads Kiilerich - 0.0.1-1 +- Initial "upstream" freerdp spec - made and tested for Fedora 12 -- 2.7.4