spideroak-bin-6.1.5.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils unpacker
  5. SRC_URI_BASE="https://spideroak.com/getbuild?platform=ubuntu"
  6. DESCRIPTION="Secure free online backup, storage, and sharing system"
  7. HOMEPAGE="https://spideroak.com"
  8. SRC_URI="x86? ( ${SRC_URI_BASE}&arch=i386&version=${PV} -> ${P}_x86.deb )
  9. amd64? ( ${SRC_URI_BASE}&arch=x86_64&version=${PV} -> ${P}_amd64.deb )"
  10. RESTRICT="mirror strip"
  11. LICENSE="spideroak"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE="dbus X"
  15. DEPEND="dev-util/patchelf"
  16. RDEPEND="
  17. app-crypt/mit-krb5[keyutils]
  18. dbus? ( sys-apps/dbus )
  19. X? (
  20. media-libs/fontconfig
  21. media-libs/freetype:2
  22. dev-libs/glib:2
  23. x11-libs/libICE
  24. x11-libs/libSM
  25. x11-libs/libX11
  26. x11-libs/libXext
  27. x11-libs/libXmu
  28. x11-libs/libXrender
  29. x11-libs/libXt
  30. )
  31. "
  32. S=${WORKDIR}
  33. QA_PREBUILT="*"
  34. src_prepare() {
  35. # Set RPATH for preserve-libs handling (bug #400979).
  36. cd "${S}/opt/SpiderOakONE/lib" || die
  37. local x
  38. for x in `find` ; do
  39. # Use \x7fELF header to separate ELF executables and libraries
  40. [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
  41. patchelf --set-rpath '$ORIGIN' "${x}" || \
  42. die "patchelf failed on ${x}"
  43. done
  44. #Remove the libraries that break compatibility in modern systems
  45. #SpiderOak will use the system libs instead
  46. rm -f "${S}/opt/SpiderOakONE/lib/libstdc++.so.6"
  47. rm -f "${S}/opt/SpiderOakONE/lib/libgcc_s.so.1"
  48. rm -f "${S}/opt/SpiderOakONE/lib/libpng12.so.0"
  49. rm -f "${S}/opt/SpiderOakONE/lib/libz.so.1"
  50. }
  51. src_install() {
  52. #install the wrapper script
  53. exeinto /usr/bin
  54. doexe usr/bin/SpiderOakONE
  55. # inotify_dir_watcher needs to be marked executable, bug #453266
  56. #chmod a+rx opt/SpiderOakONE/lib/inotify_dir_watcher
  57. #install the executable
  58. exeinto /opt/SpiderOakONE/lib
  59. doexe opt/SpiderOakONE/lib/SpiderOakONE
  60. doexe opt/SpiderOakONE/lib/inotify_dir_watcher
  61. rm -f opt/SpiderOakONE/lib/{SpiderOakONE,inotify_dir_watcher}
  62. #install the prebundled libraries
  63. insinto /opt/SpiderOakONE
  64. doins -r opt/SpiderOakONE/lib
  65. #install the config files
  66. use dbus || rm -rf etc/dbus-1
  67. insinto /
  68. doins -r etc
  69. #install the manpage
  70. doman usr/share/man/man1/SpiderOakONE.1.gz
  71. if use X; then
  72. domenu usr/share/applications/SpiderOakONE.desktop
  73. doicon usr/share/pixmaps/SpiderOakONE.png
  74. fi
  75. }
  76. pkg_postinst() {
  77. if ! use X; then
  78. einfo "For instructions on running SpiderOakONE without a GUI, please read the FAQ:"
  79. einfo " https://spideroak.com/faq/questions/62/how_do_i_install_spideroak_on_a_headless_linux_server/"
  80. einfo " https://spideroak.com/faq/questions/67/how_can_i_use_spideroak_from_the_commandline/"
  81. fi
  82. }