#define _disable_ld_no_undefined 1 %define oname RetroShare %define pkname retroshare %define suff qt5 %define gitrev c61ccda4313c3b48990be367a21681ad060bde68 %define gitdata 20170210 %define debug %nil %define debug_package %nil #on/off plugins build #if Qt5 to plugins off %define plugins 0 Summary: Secure decentralized communication platform Name: %{pkname}-%{suff} Version: 0.6.4 Release: 1 License: GPLv2+ Group: Networking/File transfer Url: https://github.com/RetroShare/RetroShare Source0: https://github.com/RetroShare/RetroShare/archive/%{oname}-%{version}.tar.gz Source100: %{name}.rpmlintrc ## patch delete all plugins #if !%{plugins} #Patch0: %{oname}.pro.patch #endif # patches renamed TARGET Patch1: %{pkname}-gui.pro.patch Patch2: %{pkname}-nogui.pro.patch Patch3: %{pkname}.pri.patch BuildRequires: imagemagick BuildRequires: pkgconfig(gnome-keyring-1) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libssh) BuildRequires: pkgconfig(libupnp) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: pkgconfig(Qt5Xml) BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(sqlcipher) BuildRequires: pkgconfig(libmicrohttpd) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(opencv) BuildRequires: %{_lib}qt5uitools-devel BuildRequires: desktop-file-utils %description RetroShare is a Open Source cross-platform, Friend-2-Friend and secure decentralized communication platform. It lets you to securely chat and share files with your friends and family, using a web-of-trust to authenticate peers and OpenSSL to encrypt all communication. RetroShare provides filesharing, chat, messages, forums and channels. #---------------------------------------------------------------------------- %package nogui Summary: RetroShare cli client Group: Networking/Other Requires: openssl Conflicts: %{name} = %{version} %description nogui This is the command-line client for RetroShare network. This client can be contacted and talked-to using SSL. Clients exist for portable devices running e.g. Android. %files nogui %doc LICENSE.txt %{_bindir}/%{pkname}-nogui-%{suff} %if %{plugins} %package voip-plugin Summary: RetroShare VOIP plugin Group: Networking/Other Requires: %{name} = %{version} BuildRequires: pkgconfig(opencv) BuildRequires: pkgconfig(speex) %description voip-plugin This package provides a plugin for RetroShare, a secured Friend-to-Friend communication platform. The plugin adds voice-over-IP functionality to the private chat window. Both friends chatting together need the plugin installed to be able to talk together. %files voip-plugin %doc LICENSE.txt %{_libdir}/retroshare/extensions/libVOIP.so* %package feedreader-plugin Summary: RetroShare FeedReader plugin Group: Networking/Other Requires: %{name} = %{version} %description feedreader-plugin This package provides a plugin for RetroShare, a secured Friend-to-Friend communication platform. The plugin adds a RSS feed reader tab to retroshare. %files feedreader-plugin %doc LICENSE.txt %{_libdir}/retroshare/extensions/libFeedReader.so* %endif %prep %setup -qn %{oname}-%{version} #patch0 -p0 %patch1 -p0 %patch2 -p0 #patch3 -p0 #sed -i s,"/usr/lib/retroshare","%{_libdir}/retroshare-qt5",g libretroshare/src/rsserver/rsinit.cc %build %global optflags %{optflags} -std=c++11 #qmake_qt5 "CONFIG-=debug" "CONFIG+=release" PREFIX=%{_prefix} LIB_DIR=%{_libdir} \ # DATA_DIR=%{_datadir}/%{name} INC_DIR=%{_includedir}/%{pkname} "CONFIG-=retroshare_plugins" "CONFIG -= plugin" \ # RetroShare.pro # build qt4 only #%qmake_qt5 "CONFIG-=debug" "CONFIG+=release" PREFIX=%{_prefix} LIB_DIR=%{_libdir} \ # DATA_DIR=%{_datadir}/%{name} INC_DIR=%{_includedir}/%{pkname} "CONFIG-=retroshare_plugins" "CONFIG -= plugin" \ # RetroShare.pro qmake-qt5 "CONFIG-=debug" "CONFIG+=release" \ PREFIX=%{_prefix} LIB_DIR=%{_libdir} \ DATA_DIR=%{_datadir}/%{name} INC_DIR=%{_includedir}/%{name} \ RetroShare.pro #CONFIG+=retroshare_plugins %make %install make INSTALL_ROOT=%{buildroot} install # install menu entry mkdir -p %{buildroot}%{_datadir}/applications/ cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF [Desktop Entry] Name=RetroShare-Qt5 Comment=Secure decentralized communication platform Exec=%{name} Icon=%{pkname} Terminal=false Type=Application Categories=Network;FileTransfer; MimeType=x-scheme-handler/retroshare; EOF # install menu icons #for N in 16 24 32 48 64 128; #do #convert data/retroshare06.xpm -scale ${N}x${N} $N.png; #install -D -m 0644 $N.png %{buildroot}%{_iconsdir}/hicolor/${N}x${N}/apps/%{name}.png #done #rm -f data/*.xpm data/*.desktop #cp -a data/ %{buildroot}%{_iconsdir}/hicolor/ #clean stream icons retroshare06.png #find %{buildroot}%{_iconsdir}/hicolor -name retroshare06.png -delete find %{buildroot}%{_datadir}/%{name} -name *.sh -delete %files %doc LICENSE.txt README.md %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_iconsdir}/hicolor/*/apps/%{pkname}.png %{_datadir}/%{name} %changelog