/[gentoo-x86]/app-backup/spideroak-bin/spideroak-bin-4.7.9948.ebuild
Gentoo

Contents of /app-backup/spideroak-bin/spideroak-bin-4.7.9948.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Oct 11 14:27:27 2012 UTC (21 months, 2 weeks ago) by zmedico
Branch: MAIN
Changes since 1.2: +12 -2 lines
Use patchelf --set-rpath  so that library dependencies can be properly
tracked for preserve-libs as discussed in bug #400979. We can backport this to
older ebuilds after it gets some testing.

(Portage version: 2.2.0_alpha137/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-backup/spideroak-bin/spideroak-bin-4.7.9948.ebuild,v 1.2 2012/08/27 01:46:36 blueness Exp $
4
5 EAPI="4"
6
7 inherit eutils versionator
8
9 REV=$(get_version_component_range 3)
10 SRC_URI_BASE="https://spideroak.com/directdownload?platform=ubuntulucid"
11
12 DESCRIPTION="An easy, secure and consolidated free online backup, storage, access and sharing system."
13 HOMEPAGE="https://spideroak.com"
14 SRC_URI="x86? ( ${SRC_URI_BASE}&arch=i386&revision=${REV} -> ${P}_x86.deb )
15 amd64? ( ${SRC_URI_BASE}&arch=x86_64&revision=${REV} -> ${P}_amd64.deb )"
16 RESTRICT="mirror strip"
17
18 LICENSE="spideroak"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="dbus headless system-libs"
22
23 SSL_SLOT="0.9.8"
24
25 DEPEND="dev-util/patchelf"
26 RDEPEND="
27 dbus? ( sys-apps/dbus )
28 !headless? (
29 media-libs/fontconfig
30 media-libs/freetype:2
31 dev-libs/glib:2
32 x11-libs/libICE
33 x11-libs/libSM
34 x11-libs/libX11
35 x11-libs/libXext
36 x11-libs/libXmu
37 x11-libs/libXrender
38 x11-libs/libXt
39 )
40 system-libs? (
41 dev-libs/openssl:$SSL_SLOT
42 net-misc/curl
43 >=sys-devel/gcc-4
44 dev-libs/glib:2
45 dev-libs/libpcre
46 media-libs/libpng:1.2
47 x11-libs/qt-core:4
48 x11-libs/qt-gui:4
49 dev-db/sqlite:3
50 net-libs/libssh2
51 sys-libs/zlib
52 dev-lang/python:2.7
53 dev-python/pycurl
54 )
55 "
56
57 S=${WORKDIR}
58
59 QA_PREBUILT="*"
60
61 src_unpack() {
62 unpack ${A}
63 unpack ./data.tar.gz
64 rm -f control.tar.gz data.tar.gz debian-binary
65 rm -f usr/share/doc/spideroak/copyright
66 }
67
68 src_prepare() {
69 epatch "${FILESDIR}"/${PF}-opt-path.patch
70 use headless && epatch "${FILESDIR}"/${PF}-headless.patch
71
72 # Remove bundled libraries/plugins/python interpreter. Please keep this
73 # mapping in sync with the RDEPEND system-libs? ( atoms ) above, and the
74 # list of deleted files below
75 #
76 # libcrypto.so.0.$SSL_SLOT => dev-libs/openssl:$SSL_SLOT
77 # libssl.so.$SSL_SLOT => dev-libs/openssl:$SSL_SLOT
78 # libcurl.so* => net-misc/curl
79 # libexpat.so* => dev-libs/expat
80 # libgcc_s.so => >=sys-devel/gcc-4
81 # libstdc++.so* => >=sys-devel/gcc-4
82 # libpcre.so* => dev-libs/libpcre
83 # libpng12* => media-libs/libpng:1.2
84 # libQt*.so* => x11-libs/qt-core x11-libs/qt-gui
85 # libsqlite3.so* => dev-db/sqlite:3
86 # libssh2.so* => net-libs/libssh2
87 # libz.so* => sys-libs/zlib
88 #
89 # pycurl.so => dev-python/pycurl
90 #
91 # usr/lib/SpiderOak/py pyexpat.so => dev-lang/python:2.7
92 #
93 if use system-libs; then
94 for lib in \
95 libcrypto.so.$SSL_SLOT \
96 libssl.so.$SSL_SLOT \
97 libcurl.so* \
98 libexpat.so* \
99 libgcc_s.so* \
100 libpcre.so* \
101 libpng12* \
102 libQt*.so* \
103 libsqlite3.so* \
104 libssh2.so* \
105 libstdc++.so* \
106 libz.so* \
107 pycurl.so \
108 pyexpat.so
109 do
110 rm usr/lib/SpiderOak/$lib || die "rm $lib failed"
111 done
112
113 # Remove bundled python interpreter => dev-lang/python:2.7
114 rm usr/lib/SpiderOak/py || die "rm py failed"
115 fi
116
117 # Set RPATH for preserve-libs handling (bug #400979).
118 cd "${S}/usr/lib/SpiderOak" || die
119 local x
120 for x in * ; do
121 # Use \x7fELF header to separate ELF executables and libraries
122 [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
123 patchelf --set-rpath '$ORIGIN' "${x}" || \
124 die "patchelf failed on ${x}"
125 done
126 }
127
128 src_install() {
129 #install the executable script
130 exeinto /usr/bin
131 doexe usr/bin/SpiderOak
132
133 #install the prebundled libraries
134 dodir /opt
135 cp -pPR usr/lib/SpiderOak "${ED}"/opt/
136
137 #install the config files
138 rm -rf etc/apt
139 use dbus || rm -rf etc/dbus-1
140 insinto /
141 doins -r etc
142
143 #install the changelog
144 insinto /usr/share/doc/${P}
145 doins usr/share/doc/spideroak/changelog.gz
146
147 if ! use headless ; then
148 domenu usr/share/applications/spideroak.desktop
149 doicon usr/share/pixmaps/spideroak.png
150 fi
151 }
152
153 pkg_postinst() {
154 if use headless; then
155 einfo "For instructions on running SpiderOak without a GUI, please read the FAQ:"
156 einfo " https://spideroak.com/faq/questions/62/how_do_i_install_spideroak_on_a_headless_linux_server/"
157 einfo " https://spideroak.com/faq/questions/67/how_can_i_use_spideroak_from_the_commandline/"
158 fi
159 if use system-libs; then
160 einfo "You have chosen to use your system libraries rather than the precompiled libraries that"
161 einfo "SpiderOak bundles with their software. While upstream discourages this (see bug #398313),"
162 einfo "there are advantages to using the system libraries, like reducing the size of the package"
163 einfo "on your hard drive. For more reasons why bundled librars are not a good idea, see"
164 einfo " https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries"
165 fi
166 }

  ViewVC Help
Powered by ViewVC 1.1.20