retroshare-0.5.5c.ebuild 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib gnome2-utils qmake-utils
  5. MY_PN="RetroShare"
  6. MY_P="${MY_PN}-v${PV}"
  7. DESCRIPTION="P2P private sharing application"
  8. HOMEPAGE="http://retroshare.sourceforge.net"
  9. SRC_URI="mirror://sourceforge/retroshare/retroshare_0.5.5-0.7068.tar.gz"
  10. # pegmarkdown can also be used with MIT
  11. LICENSE="GPL-2 GPL-3 Apache-2.0 LGPL-2.1"
  12. SLOT="0"
  13. KEYWORDS="amd64 x86"
  14. IUSE="cli feedreader links-cloud qt4 voip"
  15. REQUIRED_USE="|| ( cli qt4 )
  16. feedreader? ( qt4 )
  17. links-cloud? ( qt4 )
  18. voip? ( qt4 )"
  19. RDEPEND="
  20. app-arch/bzip2
  21. dev-libs/openssl:0
  22. gnome-base/libgnome-keyring
  23. net-libs/libupnp:0
  24. sys-libs/zlib
  25. cli? (
  26. dev-libs/protobuf
  27. net-libs/libssh[server]
  28. )
  29. feedreader? (
  30. dev-libs/libxml2
  31. dev-libs/libxslt
  32. net-misc/curl
  33. )
  34. qt4? (
  35. x11-libs/libX11
  36. x11-libs/libXScrnSaver
  37. dev-qt/qtcore:4
  38. dev-qt/qtgui:4
  39. )
  40. voip? (
  41. media-libs/speex
  42. dev-qt/qt-mobility[multimedia]
  43. dev-qt/qtmultimedia:4
  44. )"
  45. DEPEND="${RDEPEND}
  46. app-arch/unzip
  47. dev-qt/qtcore:4
  48. virtual/pkgconfig"
  49. S="${WORKDIR}/retroshare-0.5.5/src"
  50. src_prepare() {
  51. local dir
  52. sed -i \
  53. -e "s|/usr/lib/retroshare/extensions/|/usr/$(get_libdir)/${PN}/extensions/|" \
  54. libretroshare/src/rsserver/rsinit.cc \
  55. || die "sed failed"
  56. rs_src_dirs="libbitdht/src openpgpsdk/src libretroshare/src supportlibs/pegmarkdown"
  57. use cli && rs_src_dirs="${rs_src_dirs} retroshare-nogui/src"
  58. use qt4 && rs_src_dirs="${rs_src_dirs} retroshare-gui/src"
  59. use links-cloud && rs_src_dirs="${rs_src_dirs} plugins/LinksCloud"
  60. use feedreader && rs_src_dirs="${rs_src_dirs} plugins/FeedReader"
  61. if use voip ; then
  62. rs_src_dirs="${rs_src_dirs} plugins/VOIP"
  63. echo "QT += multimedia" >> "plugins/VOIP/VOIP.pro" || die
  64. echo "CONFIG += mobility" >> "plugins/VOIP/VOIP.pro" || die
  65. fi
  66. }
  67. src_configure() {
  68. for dir in ${rs_src_dirs} ; do
  69. cd "${S}"/${dir} || die
  70. eqmake4
  71. done
  72. }
  73. src_compile() {
  74. local dir
  75. for dir in ${rs_src_dirs} ; do
  76. emake -C ${dir}
  77. done
  78. unset rs_src_dirs
  79. }
  80. src_install() {
  81. local i
  82. local extension_dir="/usr/$(get_libdir)/${PN}/extensions/"
  83. use cli && dobin retroshare-nogui/src/retroshare-nogui
  84. use qt4 && dobin retroshare-gui/src/RetroShare
  85. exeinto "${extension_dir}"
  86. use feedreader && doexe plugins/FeedReader/*.so*
  87. use links-cloud && doexe plugins/LinksCloud/*.so*
  88. use voip && doexe plugins/VOIP/*.so*
  89. insinto /usr/share/RetroShare
  90. doins libbitdht/src/bitdht/bdboot.txt
  91. dodoc README.txt
  92. make_desktop_entry RetroShare
  93. for i in 24 48 64 ; do
  94. doicon -s ${i} build_scripts/Ubuntu_src/data/${i}x${i}/${PN}.png
  95. done
  96. doicon -s 128 build_scripts/Ubuntu_src/data/${PN}.png
  97. }
  98. pkg_preinst() {
  99. gnome2_icon_savelist
  100. }
  101. pkg_postinst() {
  102. gnome2_icon_cache_update
  103. }
  104. pkg_postrm() {
  105. gnome2_icon_cache_update
  106. }