summaryrefslogtreecommitdiff
path: root/packages/net-p2p/retroshare/retroshare.exlib
diff options
context:
space:
mode:
Diffstat (limited to 'packages/net-p2p/retroshare/retroshare.exlib')
-rw-r--r--packages/net-p2p/retroshare/retroshare.exlib131
1 files changed, 131 insertions, 0 deletions
diff --git a/packages/net-p2p/retroshare/retroshare.exlib b/packages/net-p2p/retroshare/retroshare.exlib
new file mode 100644
index 0000000..3c2d115
--- /dev/null
+++ b/packages/net-p2p/retroshare/retroshare.exlib
@@ -0,0 +1,131 @@
+# Copyright 2013 Ankur Kothari
+# Distributed under the terms of the GNU General Public License v2
+
+require flag-o-matic
+require github [ user=RetroShare project=RetroShare tag=v${PV} ]
+require qmake [ slot=5 ]
+require gtk-icon-cache freedesktop-desktop
+
+export_exlib_phases src_configure src_install pkg_postinst pkg_postrm
+
+SUMMARY="A decentralized, private and secure commmunication and sharing platform"
+DESCRIPTION="
+RetroShare is basically a platform that establishes encrypted connections
+between authenticated friends. This connection is used for various
+communication services and filesharing. It is independent of any corporate
+system or central servers, all data is only sent to friends and in some cases
+relayed by them to their friends, making RetroShare a decentralised Social
+Sharing Network designed For the People. Encrypted communication ensures that
+all shared information is only known to you and your friends.
+
+Communication services in RetroShare:
+ * Private chat with friends
+ * Private or public chat lobbies, that allow chatting with friends
+ and friends of friends
+ * Messages to friends
+ * Forums
+ * Voice over IP
+"
+HOMEPAGE="https://retroshare.github.io/"
+
+LICENCES="GPL-2"
+SLOT="0"
+MYOPTIONS="
+ ( providers: libressl openssl ) [[ number-selected = exactly-one ]]
+ ( providers: ffmpeg libav ) [[ number-selected = exactly-one ]]
+ sqlcipher
+ plugins
+"
+
+DEPENDENCIES="
+ build:
+ virtual/pkg-config
+ build+run:
+ sqlcipher? ( app-crypt/sqlcipher )
+ dev-libs/libxml2:2.0
+ dev-libs/libxslt
+ dev-libs/protobuf
+ gnome-desktop/libgnome-keyring:1
+ plugins? ( media-libs/opencv
+ media-libs/speex
+ media-libs/speexdsp
+ providers:ffmpeg? ( media/ffmpeg )
+ providers:libav? ( media/libav )
+ )
+ net-libs/libmicrohttpd
+ net-libs/libssh
+ net-libs/libupnp
+ net-misc/curl
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ x11-libs/qtbase:5
+ x11-libs/qtmultimedia:5
+ x11-libs/qttools:5
+ x11-libs/qtx11extras:5
+ providers:libressl? ( dev-libs/libressl:= )
+ providers:openssl? ( dev-libs/openssl )
+"
+
+EQMAKE_PARAMS=(
+ "CONFIG-=debug"
+ "CONFIG+=release"
+ "CONFIG-=c++11"
+)
+
+DEFAULT_SRC_PREPARE_PATCHES+=(
+ "${FILES}"/cflags.patch
+ "${FILES}"/clang.patch
+ "${FILES}"/disable_key_array_redraw.patch
+ "${FILES}"/hidden_service.patch
+)
+
+retroshare_src_configure(){
+ # weird speex failures, also see
+ # https://github.com/RetroShare/RetroShare/issues/393
+ append-flags -DHAVE_STDINT_H
+
+ # fix hardcoded extension directory
+ edo sed -i \
+ -e "s|/usr/lib/retroshare/extensions6/|/usr/$(exhost --target)/lib/${PN}/extensions6/|" \
+ libretroshare/src/rsserver/rsinit.cc
+ option sqlcipher || EQMAKE_PARAMS+=( "CONFIG+=no_sqlcipher" )
+ option plugins || EQMAKE_PARAMS+=( "CONFIG+=no_retroshare_plugins" )
+
+ eqmake \
+ BIN_DIR="/usr/$(exhost --target)/bin" \
+ LIB_DIR="/usr/$(exhost --target)/lib" \
+ PLUGIN_DIR="/usr/$(exhost --target)/lib/${PN}/extensions6/" \
+ INC_DIR="/usr/$(exhost --target)/include" \
+ RetroShare.pro
+}
+
+retroshare_src_install() {
+ emake INSTALL_ROOT="${IMAGE}" install
+
+ # overwrite desktop file
+ insinto /usr/share/applications
+ hereins ${PN}06.desktop <<EOF
+[Desktop Entry]
+Version=1.0
+Name=RetroShare06
+Comment=Securely share files with your friends
+Exec=RetroShare06
+Icon=retroshare06
+Terminal=false
+Type=Application
+Categories=Network;
+EOF
+}
+
+retroshare_pkg_postinst() {
+ freedesktop-mime_pkg_postinst
+ freedesktop-desktop_pkg_postinst
+ gtk-icon-cache_pkg_postinst
+}
+
+retroshare_pkg_postrm() {
+ freedesktop-mime_pkg_postrm
+ freedesktop-desktop_pkg_postrm
+ gtk-icon-cache_pkg_postrm
+}
+