Imported from SRPM

This commit is contained in:
Sergey Zhemoitel 2017-03-19 21:42:43 +03:00
commit 0b03ab7acb
7 changed files with 273 additions and 0 deletions

2
.abf.yml Normal file
View file

@ -0,0 +1,2 @@
sources:
RetroShare-0.6.2.tar.gz: 633308bd636a4d3b3615b1ccede3a654145045ad

17
RetroShare.pro.patch Normal file
View file

@ -0,0 +1,17 @@
*** RetroShare.pro.old 2017-03-10 17:57:40.000000000 +0300
--- RetroShare.pro 2017-03-16 15:16:54.000000000 +0300
***************
*** 45,56 ****
retroshare_qml_app.target = retroshare_qml_app
}
- retroshare_plugins {
- SUBDIRS += plugins
- plugins.file = plugins/plugins.pro
- plugins.depends = retroshare_gui
- plugins.target = plugins
- }
wikipoos {
SUBDIRS += pegmarkdown
--- 45,50 ----

33
retroshare-gui.pro.patch Normal file
View file

@ -0,0 +1,33 @@
*** retroshare-gui/src/retroshare-gui.pro 2017-03-17 16:29:23.000000000 +0300
--- retroshare-gui/src/retroshare-gui.pro.orig 2017-03-10 17:57:40.000000000 +0300
***************
*** 4,10 ****
QT += network xml
CONFIG += qt gui uic qrc resources idle bitdht
CONFIG += link_prl
! TARGET = retroshare-qt5
DEFINES += TARGET=\\\"$TARGET\\\"
# Plz never commit the .pro with these flags enabled.
--- 4,10 ----
QT += network xml
CONFIG += qt gui uic qrc resources idle bitdht
CONFIG += link_prl
! TARGET = RetroShare06
DEFINES += TARGET=\\\"$TARGET\\\"
# Plz never commit the .pro with these flags enabled.
***************
*** 101,108 ****
--- 101,111 ----
INSTALLS += icon_files
desktop_files.path = "$${PREFIX}/share/applications"
+ desktop_files.files = ../../data/retroshare06.desktop
INSTALLS += desktop_files
+
pixmap_files.path = "$${PREFIX}/share/pixmaps"
+ pixmap_files.files = ../../data/retroshare06.xpm
INSTALLS += pixmap_files
}

View file

@ -0,0 +1,19 @@
*** retroshare-nogui/src/retroshare-nogui.pro 2017-03-17 16:31:46.000000000 +0300
--- retroshare-nogui/src/retroshare-nogui.pro.orig 2017-03-10 17:57:40.000000000 +0300
***************
*** 1,7 ****
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
TEMPLATE = app
! TARGET = retroshare-qt5-nogui
CONFIG += bitdht
#CONFIG += introserver
CONFIG -= qt xml gui
--- 1,7 ----
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
TEMPLATE = app
! TARGET = RetroShare06-nogui
CONFIG += bitdht
#CONFIG += introserver
CONFIG -= qt xml gui

2
retroshare-qt5.rpmlintrc Normal file
View file

@ -0,0 +1,2 @@
addFilter("E: zero-length")
addFilter("E: empty-debuginfo-package")

177
retroshare-qt5.spec Normal file
View file

@ -0,0 +1,177 @@
#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.2
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: qt5-qttools-examples
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}/%{name}-nogui
%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/extensions6/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/extensions6/libFeedReader.so*
%endif
%prep
%setup -qn %{oname}-%{version}
%patch0 -p0
%patch1 -R -p0
%patch2 -R -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
pushd plugins
%qmake_qt4 PREFIX=%{_prefix} LIB_DIR=%{_libdir}
popd
%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
%make
%install
make INSTALL_ROOT=$RPM_BUILD_ROOT install
# install menu entry
mkdir -p %{buildroot}%{_datadir}/applications/
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=RetroShare
Comment=Secure decentralized communication platform
Exec=%{name}
Icon=%{name}
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
#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/%{name}.png
%{_datadir}/%{name}
%changelog

23
retroshare.pri.patch Normal file
View file

@ -0,0 +1,23 @@
*** retroshare.pri.orig 2017-03-10 17:57:40.000000000 +0300
--- retroshare.pri 2017-03-18 12:34:41.000000000 +0300
***************
*** 63,71 ****
unix {
isEmpty(PREFIX) { PREFIX = "/usr" }
isEmpty(BIN_DIR) { BIN_DIR = "$${PREFIX}/bin" }
! isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" }
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
! isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
isEmpty(PLUGIN_DIR) { PLUGIN_DIR = "$${LIB_DIR}/retroshare/extensions6" }
rs_autologin {
--- 63,71 ----
unix {
isEmpty(PREFIX) { PREFIX = "/usr" }
isEmpty(BIN_DIR) { BIN_DIR = "$${PREFIX}/bin" }
! isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare" }
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
! isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/retroshare-qt5" }
isEmpty(PLUGIN_DIR) { PLUGIN_DIR = "$${LIB_DIR}/retroshare/extensions6" }
rs_autologin {