blob: 8e90ed2879cf8e8645b3f7a1627ab3b261be7de8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# Maintainer: sehraf
# Contributor: stqn
# Contributor: JHeaton <jheaton at archlinux dot us>
# Contributor: Tristero <tristero at online dot de>
# Contributor: funkyou
# Set this to 'true' to build and install the plugins
#_plugin_feedreader='true'
#_plugin_voip='true' # currently broken!!!
# Set this to 'true' to enable the new automatically generated jsaon api
#_jsonapi='true'
# Set this to 'true' to enable auto login
#_autologin='true'
# Set this to 'false' to disable nativ (system) dialogs
_nativ_dialogs='true'
# Set this to 'true' to enable wiki functionality (experimental)
#_wiki='true'
# set this to 'true' to use clang for compiling (experimental)
#_clang='true'
# Set this to 'true' to use use archlinux' rapidjson instead of shipped version
#_systems_rapidjson='true'
### Nothing to be changed below this line ###
pkgname=retroshare
pkgver=0.6.6
pkgrel=1
pkgdesc="Serverless encrypted instant messenger with filesharing, chatgroups, e-mail."
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url='http://retroshare.cc/'
license=('GPL2')
depends=('qt5-multimedia' 'qt5-x11extras' 'miniupnpc' 'libxss' 'sqlcipher') # 'libmicrohttpd'
makedepends=('git' 'qt5-tools')
optdepends=('tor: tor hidden node support'
'i2p: i2p hidden node support'
'i2pd: i2p hidden node support' )
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("https://github.com/RetroShare/RetroShare/archive/v${pkgver}.tar.gz"
"fix_icon_path.patch")
sha256sums=('c545b9249ac7dbfef72a2d636bc0f8b729c7ce05f21a54dd9284b2a387592d4a'
'724f55edb3aa5ae34abfcba341cdecf3d6f5095d1d7018de4e254ae5627c426f')
# Add missing dependencies if needed
[[ "$_plugin_voip" == 'true' ]] && depends=(${depends[@]} 'ffmpeg' 'opencv3-opt')
[[ "$_plugin_feedreader" == 'true' ]] && depends=(${depends[@]} 'curl' 'libxslt')
[[ "$_jsonapi" == 'true' ]] && depends=(${depends[@]} 'restbed')
[[ "$_clang" == 'true' ]] && makedepends=(${makedepends[@]} 'clang')
[[ "$_autologin" == 'true' ]] && depends=(${depends[@]} 'libsecret')
[[ "$_systems_rapidjson" == 'true' ]] && makedepends=(${makedepends[@]} 'rapidjson')
# Set options for qmake
_optJsonapi=''
_optClang=''
_optAutol=''
_optPlugin=''
_optWiki=''
[[ "$_jsonapi" == 'true' ]] && _optJsonapi='CONFIG+=rs_jsonapi'
[[ "$_clang" == 'true' ]] && _optClang='-spec linux-clang CONFIG+=c++11'
[[ "$_autologin" == 'true' ]] && _optAutol='CONFIG+=rs_autologin'
[[ "$_nativ_dialogs" == 'true' ]] && _optNativDialogs='CONFIG*=rs_use_native_dialogs'
([[ "$_plugin_voip" == 'true' ]] || [[ "$_plugin_feedreader" == 'true' ]]) && _optPlugin='CONFIG+=retroshare_plugins'
[[ "$_wiki" == 'true' ]] && _optWiki='CONFIG+=wikipoos'
get_git_repo() {
git clone -n https://github.com/$1/$2
cd $2
git checkout $3
cd ..
}
prepare() {
cd "${srcdir}/RetroShare-${pkgver}"
patch -p1 --ignore-whitespace -i "${srcdir}"/fix_icon_path.patch
[[ "$_plugin_voip" == 'true' ]] && sed -i -e 's/PKGCONFIG += opencv/PKGCONFIG += opencv3/g' plugins/VOIP/VOIP.pro || true
# manually clone dependencies (if anybody knows a better way to do this, let me know!)
cd supportlibs
rmdir restbed/dependency/asio || true
rmdir restbed/dependency/catch || true
rmdir restbed/dependency/kashmir || true
rmdir -p restbed/dependency || true
rmdir restbed || true
get_git_repo 'Corvusoft' 'restbed' 'c27c6726d28c42e2e1b7537ba63eeb23e944789d'
# get restbed deps
cd restbed
git submodule update --init dependency/asio
git submodule update --init dependency/catch
git submodule update --init dependency/kashmir
cd ..
rmdir udp-discovery-cpp || true
get_git_repo 'truvorskameikin' 'udp-discovery-cpp' 'f3a3103a6c52e5707629e8d0a7e279a7758fe845'
if [ "$_systems_rapidjson" -ne 'true'] ; then
rmdir rapidjson || true
get_git_repo 'Tencent' 'rapidjson' 'f54b0e47a08782a6131cc3d60f94d038fa6e0a51'
fi
cd ..
}
build() {
cd "${srcdir}/RetroShare-${pkgver}"
# remove unwanted plugins
[[ "$_plugin_voip" != 'true' ]] && sed -i '/VOIP \\/d' plugins/plugins.pro
[[ "$_plugin_feedreader" != 'true' ]] && sed -i '/FeedReader/d' plugins/plugins.pro
qmake CONFIG-=debug CONFIG+=release \
${_optJsonapi} ${_optAutol} ${_optClang} \
${_optPlugin} ${_optWiki} \
CONFIG+=no_libresapihttpserver \
QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
'RS_UPNP_LIB="miniupnpc"' \
'RS_MAJOR_VERSION=0' \
'RS_MINOR_VERSION=6' \
'RS_MINI_VERSION=6' \
'RS_EXTRA_VERSION=""' \
RetroShare.pro
make || true
rmdir supportlibs/restbed/include || true
make
}
package() {
cd "${srcdir}/RetroShare-${pkgver}"
make INSTALL_ROOT="${pkgdir}" install
}
|