summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO53
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD364
3 files changed, 325 insertions, 96 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 191cf0524d22..f1fc4fee5ff3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,30 +1,57 @@
-# Generated by mksrcinfo v8
-# Sat Mar 2 18:42:09 UTC 2019
pkgbase = retroshare
pkgdesc = Serverless encrypted instant messenger with filesharing, chatgroups, e-mail.
- pkgver = 0.6.5
+ pkgver = 0.6.7.2
pkgrel = 1
- url = http://retroshare.cc/
+ url = https://github.com/retroshare/retroshare
arch = i686
arch = x86_64
arch = armv6h
arch = armv7h
arch = aarch64
- license = GPL2
+ license = AGPL3
+ makedepends = cmake
makedepends = git
makedepends = qt5-tools
+ makedepends = rapidjson
+ depends = libxss
+ depends = miniupnpc
depends = qt5-multimedia
depends = qt5-x11extras
- depends = libupnp
- depends = libxss
- depends = libmicrohttpd
depends = sqlcipher
optdepends = tor: tor hidden node support
optdepends = i2p: i2p hidden node support
- provides = retroshare
- conflicts = retroshare
- source = https://github.com/RetroShare/RetroShare/archive/v0.6.5.tar.gz
- sha256sums = 901a1d1f282e04118fbe0e24190355b4a8f355a806cc5448738b1d691b46f5d5
+ optdepends = i2pd: i2p hidden node support
+ source = retroshare::git+https://github.com/retroshare/retroshare.git#tag=v0.6.7.2
+ source = retroshare.openpgp-sdk::git+https://github.com/RetroShare/OpenPGP-SDK.git
+ source = retroshare.bitdht::git+https://github.com/RetroShare/BitDHT.git
+ source = commonmark.cmark::git+https://github.com/commonmark/cmark.git
+ source = corvusoft.restbed::git+https://github.com/Corvusoft/restbed.git
+ source = i2p.libsam3::git+https://github.com/i2p/libsam3.git
+ source = retroshare.jni.hpp::git+https://github.com/RetroShare/jni.hpp.git
+ source = retroshare.libretroshare::git+https://github.com/RetroShare/libretroshare.git
+ source = retroshare.obs::git+https://github.com/RetroShare/OBS.git
+ source = retroshare.rsnewwebui::git+https://github.com/RetroShare/RSNewWebUI.git
+ source = tencent.rapidjson::git+https://github.com/Tencent/rapidjson.git
+ source = truvorskameikin.udp-discovery-cpp::git+https://github.com/truvorskameikin/udp-discovery-cpp.git
+ source = google.googletest::git+https://github.com/google/googletest.git
+ source = corvusoft.asio-dependency::git+https://github.com/corvusoft/asio-dependency.git
+ source = corvusoft.catch-dependency::git+https://github.com/corvusoft/catch-dependency.git
+ source = corvusoft.openssl-dependency::git+https://github.com/corvusoft/openssl-dependency.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = retroshare
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..018a3de08144
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index b0bf9d39d8ed..44c8e58d0ce0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,108 +1,306 @@
-# Maintainer: sehraf
+# Maintainer:
+# Contributor: 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!!!
+## options
+# whether to build and install plugins
+: ${_plugin_feedreader:=false}
+: ${_plugin_voip:=false} # currently broken
-# Set this to 'true' to enable the new automatically generated jsaon api
-#_jsonapi='true'
+# whether to enable automatically generated json api
+: ${_jsonapi:=false}
-# Set this to 'true' to enable auto login
-#_autologin='true'
+# whether to enable auto login
+: ${_autologin:=false}
-# Set this to 'true' to enable wiki functionality (experimental)
-#_wiki='true'
+# whether to enable native (system) dialogs
+: ${_nativ_dialogs:=true}
-# set this to 'true' to use clang for compiling (experimental)
-#_clang='true'
+# whether to enable wiki functionality (experimental)
+: ${_wiki:=false}
-# Unofficial plugins
-#_plugin_lua4rs='true'
+# whether to compile with clang (experimental)
+: ${_clang:=false}
-# 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.5
+## basic info
+_pkgname="retroshare"
+pkgname="$_pkgname"
+pkgver=0.6.7.2
pkgrel=1
pkgdesc="Serverless encrypted instant messenger with filesharing, chatgroups, e-mail."
+#url="http://retroshare.cc/"
+url="https://github.com/retroshare/retroshare"
+license=('AGPL3')
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
-url='http://retroshare.cc/'
-license=('GPL2')
-depends=('qt5-multimedia' 'qt5-x11extras' 'libupnp' 'libxss' 'libmicrohttpd' 'sqlcipher')
-makedepends=('git' 'qt5-tools')
-optdepends=('tor: tor hidden node support'
- 'i2p: i2p hidden node support')
-provides=("${pkgname}")
-conflicts=("${pkgname}")
-
-source=("https://github.com/RetroShare/RetroShare/archive/v${pkgver}.tar.gz")
-sha256sums=('901a1d1f282e04118fbe0e24190355b4a8f355a806cc5448738b1d691b46f5d5')
-
-# 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'
-([[ "$_plugin_voip" == 'true' ]] || [[ "$_plugin_feedreader" == 'true' ]] || [[ "$_plugin_lua4rs" == 'true' ]]) && _optPlugin='CONFIG+=retroshare_plugins'
-[[ "$_wiki" == 'true' ]] && _optWiki='CONFIG+=wikipoos'
-
-# Handle unofficial plugins
-if [[ "$_plugin_lua4rs" == 'true' ]] ; then
- depends=(${depends[@]} 'lua')
- source=(${source[@]} 'Lua4RS::git+https://github.com/RetroShare/Lua4RS.git')
-fi
+## main package
+_main_package() {
+ depends=(
+ 'libxss'
+ 'miniupnpc'
+ 'qt5-multimedia'
+ 'qt5-x11extras'
+ 'sqlcipher'
+ )
+ makedepends=(
+ 'cmake'
+ 'git'
+ 'qt5-tools'
+ 'rapidjson'
+ )
+ optdepends=(
+ 'tor: tor hidden node support'
+ 'i2p: i2p hidden node support'
+ 'i2pd: i2p hidden node support'
+ )
+
+ # Add extra dependencies
+ if [[ "${_plugin_voip::1}" =~ 't|y|1' ]] ; then
+ depends+=('ffmpeg' 'opencv3-opt')
+ fi
+
+ if [[ "${_plugin_feedreader::1}" =~ 't|y|1' ]] ; then
+ depends+=('curl' 'libxslt')
+ fi
+
+ if [[ "${_jsonapi::1}" =~ 't|y|1' ]] ; then
+ makedepends+=('doxygen')
+ fi
+
+ if [[ "${_clang::1}" =~ 't|y|1' ]] ; then
+ makedepends+=('clang')
+ fi
+
+ if [[ "${_autologin::1}" =~ 't|y|1' ]] ; then
+ depends+=('libsecret')
+ fi
+
+ # package type
+ if [ x"$pkgname" == x"$_pkgname" ] ; then
+ _main_stable
+ else
+ _main_git
+ fi
+
+ _source_retroshare
+ _source_rapidjson
+ _source_restbed
+}
+
+## stable package
+_main_stable() {
+ _pkgtag="v$pkgver"
+
+ _pkgsrc="$_pkgname"
+ source=("$_pkgsrc"::"git+$url.git#tag=$_pkgtag")
+ sha256sums=('SKIP')
+
+ pkgver() {
+ cd "$_pkgsrc"
+ echo "${_pkgtag}" | sed -E 's/^v//;s/(.*[0-9])([a-z])/\1.\2/'
+ }
+}
+
+## git package
+_main_git() {
+ provides=("$_pkgname=${pkgver%%.r*}")
+ conflicts=("$_pkgname")
+
+ _pkgsrc="$_pkgname"
+ source=("$_pkgsrc"::"git+$url.git")
+ sha256sums=('SKIP')
+
+ pkgver() {
+ cd "$_pkgsrc"
+ git describe --long --tags --exclude='*[a-z][a-z]*' --exclude='*[a-z]' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g ; s/\.RC/RC/'
+ }
+}
+
+## submodules
+_source_retroshare() {
+ source+=(
+ 'retroshare.openpgp-sdk'::'git+https://github.com/RetroShare/OpenPGP-SDK.git'
+ 'retroshare.bitdht'::'git+https://github.com/RetroShare/BitDHT.git'
+
+ 'commonmark.cmark'::'git+https://github.com/commonmark/cmark.git'
+ 'corvusoft.restbed'::'git+https://github.com/Corvusoft/restbed.git'
+ 'i2p.libsam3'::'git+https://github.com/i2p/libsam3.git'
+ 'retroshare.jni.hpp'::'git+https://github.com/RetroShare/jni.hpp.git'
+ 'retroshare.libretroshare'::'git+https://github.com/RetroShare/libretroshare.git'
+ 'retroshare.obs'::'git+https://github.com/RetroShare/OBS.git'
+ 'retroshare.rsnewwebui'::'git+https://github.com/RetroShare/RSNewWebUI.git'
+ 'tencent.rapidjson'::'git+https://github.com/Tencent/rapidjson.git'
+ 'truvorskameikin.udp-discovery-cpp'::'git+https://github.com/truvorskameikin/udp-discovery-cpp.git'
+ )
+ sha256sums+=(
+ 'SKIP'
+ 'SKIP'
+
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ )
+
+ _prepare_retroshare() (
+ cd "${srcdir:?}/$_pkgsrc"
+ local -A _submodules=(
+ ['retroshare.openpgp-sdk']='openpgpsdk'
+ ['retroshare.bitdht']='libbitdht'
+
+ ['commonmark.cmark']='supportlibs/cmark'
+ ['corvusoft.restbed']='supportlibs/restbed'
+ ['i2p.libsam3']='supportlibs/libsam3'
+ ['retroshare.jni.hpp']='supportlibs/jni.hpp'
+ ['retroshare.libretroshare']='libretroshare'
+ ['retroshare.obs']='build_scripts/OBS'
+ ['retroshare.rsnewwebui']='retroshare-webui'
+ ['tencent.rapidjson']='supportlibs/rapidjson'
+ ['truvorskameikin.udp-discovery-cpp']='supportlibs/udp-discovery-cpp'
+ )
+ _submodule_update
+ )
+}
+
+_source_rapidjson() {
+ source+=(
+ 'google.googletest'::'git+https://github.com/google/googletest.git'
+ )
+ sha256sums+=(
+ 'SKIP'
+ )
+
+ _prepare_rapidjson() (
+ cd "${srcdir:?}/$_pkgsrc"
+ cd "supportlibs/rapidjson"
+ local -A _submodules=(
+ ['google.googletest']='thirdparty/gtest'
+ )
+ _submodule_update
+ )
+}
+
+_source_restbed() {
+ source+=(
+ 'corvusoft.asio-dependency'::'git+https://github.com/corvusoft/asio-dependency.git'
+ 'corvusoft.catch-dependency'::'git+https://github.com/corvusoft/catch-dependency.git'
+ 'corvusoft.openssl-dependency'::'git+https://github.com/corvusoft/openssl-dependency.git'
+ )
+ sha256sums+=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ )
+
+ _prepare_restbed() (
+ cd "${srcdir:?}/$_pkgsrc"
+ cd "supportlibs/restbed"
+ local -A _submodules=(
+ ['corvusoft.asio-dependency']='dependency/asio'
+ ['corvusoft.catch-dependency']='dependency/catch'
+ ['corvusoft.openssl-dependency']='dependency/openssl'
+ )
+ _submodule_update
+ )
+}
+
+## common functions
prepare() {
- cd "${srcdir}/RetroShare-${pkgver}"
+ _submodule_update() {
+ local key;
+ for key in ${!_submodules[@]} ; do
+ git submodule init "${_submodules[${key}]}"
+ git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}"
+ git -c protocol.file.allow=always submodule update "${_submodules[${key}]}"
+ done
+ }
- [[ "$_plugin_voip" == 'true' ]] && sed -i -e 's/PKGCONFIG += opencv/PKGCONFIG += opencv3/g' plugins/VOIP/VOIP.pro
+ _prepare_retroshare
+ _prepare_rapidjson
+ _prepare_restbed
}
build() {
- cd "${srcdir}/RetroShare-${pkgver}"
-
- # Handle unofficial plugins
- if [[ "$_plugin_lua4rs" == 'true' ]] ; then
- [[ -d 'plugins/Lua4RS' ]] && rm -r plugins//Lua4RS
- cp -r -l "${srcdir}/Lua4RS" plugins/
- sed -i -e 's/SUBDIRS += \\/SUBDIRS += \\\n\t\tLua4RS \\/g' plugins/plugins.pro
- fi
-
- # 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} \
- QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
- QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
- RetroShare.pro
- # workaround
- make || make
+ cd "$_pkgsrc"
+
+ # remove unwanted plugins
+ if [[ ! "${_plugin_voip::1}" =~ 't|y|!' ]] ; then
+ sed -i '/VOIP \\/d' plugins/plugins.pro
+ fi
+ if [[ ! "$_plugin_feedreader" =~ 't|y|1' ]] ; then
+ sed -i '/FeedReader/d' plugins/plugins.pro
+ fi
+
+ local _qmake_options=(
+ CONFIG-=debug
+ CONFIG+=release
+ )
+
+ if [[ "${_jsonapi::1}" =~ 't|y|1' ]] ; then
+ _qmake_options+=(
+ CONFIG+=rs_jsonapi
+ )
+ fi
+
+ if [[ "${_clang::1}" =~ 't|y|1' ]] ; then
+ _qmake_options+=(
+ -spec linux-clang
+ CONFIG+=c++11
+ )
+ fi
+
+ if [[ "${_autologin::1}" =~ 't|y|1' ]] ; then
+ _qmake_options+=(
+ CONFIG+=rs_autologin
+ )
+ fi
+
+ if [[ "${_nativ_dialogs::1}" =~ 't|y|1' ]] ; then
+ _qmake_options+=(
+ CONFIG+=rs_use_native_dialogs
+ )
+ fi
+
+ if [[ "${_plugin_voip::1}" =~ 't|y|1' ]] || [[ "${_plugin_feedreader::1}" =~ 't|y|1' ]] ; then
+ _qmake_options+=(
+ CONFIG+=retroshare_plugins
+ )
+ fi
+
+ if [[ "${_wiki::1}" =~ 't|y|1' ]] ; then
+ _qmake_options+=(
+ CONFIG+=wikipoos
+ )
+ fi
+
+ qmake_options+=(
+ RS_UPNP_LIB="miniupnpc"
+ CONFIG+=no_rs_friendserver
+ QMAKE_CFLAGS_RELEASE="${CFLAGS}"
+ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}"
+ RetroShare.pro
+ )
+
+ qmake "${_qmake_options[@]}"
+
+ make || true
+ rmdir supportlibs/restbed/include || true
+ make
}
package() {
- cd "${srcdir}/RetroShare-${pkgver}"
-
- make INSTALL_ROOT="${pkgdir}" install
+ cd "$_pkgsrc"
+ make INSTALL_ROOT="${pkgdir:?}" install
}
+
+## execute
+_main_package