Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/spideroak-bin/
Date: Sat, 29 Jul 2017 09:09:44
Message-Id: 1501319369.b12959fe16c93702e193a050bdb4be568411e54a.blueness@gentoo
1 commit: b12959fe16c93702e193a050bdb4be568411e54a
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 29 09:07:59 2017 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 29 09:09:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b12959fe
7
8 app-backup/spideroak-bin: fix bug #622784
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.1
11
12 .../spideroak-bin/spideroak-bin-6.3.0-r1.ebuild | 104 +++++++++++++++++++++
13 1 file changed, 104 insertions(+)
14
15 diff --git a/app-backup/spideroak-bin/spideroak-bin-6.3.0-r1.ebuild b/app-backup/spideroak-bin/spideroak-bin-6.3.0-r1.ebuild
16 new file mode 100644
17 index 00000000000..ee101fd0f53
18 --- /dev/null
19 +++ b/app-backup/spideroak-bin/spideroak-bin-6.3.0-r1.ebuild
20 @@ -0,0 +1,104 @@
21 +# Copyright 1999-2017 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI="6"
25 +
26 +inherit eutils unpacker
27 +
28 +DESCRIPTION="Secure free online backup, storage, and sharing system"
29 +HOMEPAGE="https://spideroak.com"
30 +
31 +SRC_URI_BASE="https://spideroak.com/release/spideroak"
32 +SRC_URI="x86? ( ${SRC_URI_BASE}/deb_x86 -> ${P}_x86.deb )
33 + amd64? ( ${SRC_URI_BASE}/deb_x64 -> ${P}_amd64.deb )"
34 +
35 +RESTRICT="mirror strip"
36 +
37 +LICENSE="spideroak"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="dbus X"
41 +
42 +DEPEND="dev-util/patchelf"
43 +RDEPEND="
44 + app-crypt/mit-krb5[keyutils]
45 + media-libs/libpng:1.2
46 + dbus? ( sys-apps/dbus )
47 + X? (
48 + media-libs/fontconfig
49 + media-libs/freetype:2
50 + dev-libs/glib:2
51 + x11-libs/libICE
52 + x11-libs/libSM
53 + x11-libs/libX11
54 + x11-libs/libXext
55 + x11-libs/libXmu
56 + x11-libs/libXrender
57 + x11-libs/libXt
58 + )
59 +"
60 +
61 +S=${WORKDIR}
62 +
63 +QA_PREBUILT="*"
64 +
65 +src_prepare() {
66 + # Set RPATH for preserve-libs handling (bug #400979).
67 + cd "${S}/opt/SpiderOakONE/lib" || die
68 + local x
69 + for x in `find` ; do
70 + # Use \x7fELF header to separate ELF executables and libraries
71 + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
72 + patchelf --set-rpath '$ORIGIN' "${x}" || \
73 + die "patchelf failed on ${x}"
74 + done
75 +
76 + #Remove the libraries that break compatibility in modern systems
77 + #SpiderOak will use the system libs instead
78 + rm -f "${S}/opt/SpiderOakONE/lib/libstdc++.so.6"
79 + rm -f "${S}/opt/SpiderOakONE/lib/libgcc_s.so.1"
80 + rm -f "${S}/opt/SpiderOakONE/lib/libpng12.so.0"
81 + rm -f "${S}/opt/SpiderOakONE/lib/libz.so.1"
82 +
83 + eapply_user
84 +}
85 +
86 +src_install() {
87 + #install the wrapper script
88 + exeinto /usr/bin
89 + doexe usr/bin/SpiderOakONE
90 +
91 + # inotify_dir_watcher needs to be marked executable, bug #453266
92 + #chmod a+rx opt/SpiderOakONE/lib/inotify_dir_watcher
93 +
94 + #install the executable
95 + exeinto /opt/SpiderOakONE/lib
96 + doexe opt/SpiderOakONE/lib/SpiderOakONE
97 + doexe opt/SpiderOakONE/lib/inotify_dir_watcher
98 + rm -f opt/SpiderOakONE/lib/{SpiderOakONE,inotify_dir_watcher}
99 +
100 + #install the prebundled libraries
101 + insinto /opt/SpiderOakONE
102 + doins -r opt/SpiderOakONE/lib
103 +
104 + #install the config files
105 + use dbus || rm -rf etc/dbus-1
106 + insinto /
107 + doins -r etc
108 +
109 + #install the manpage
110 + doman usr/share/man/man1/SpiderOakONE.1.gz
111 +
112 + if use X; then
113 + domenu usr/share/applications/SpiderOakONE.desktop
114 + doicon usr/share/pixmaps/SpiderOakONE.png
115 + fi
116 +}
117 +
118 +pkg_postinst() {
119 + if ! use X; then
120 + einfo "For instructions on running SpiderOakONE without a GUI, please read the FAQ:"
121 + einfo " https://spideroak.com/faq/questions/62/how_do_i_install_spideroak_on_a_headless_linux_server/"
122 + einfo " https://spideroak.com/faq/questions/67/how_can_i_use_spideroak_from_the_commandline/"
123 + fi
124 +}