/[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.5 - (show annotations) (download)
Sat Mar 23 19:44:29 2013 UTC (15 months, 2 weeks ago) by vapier
Branch: MAIN
Changes since 1.4: +3 -11 lines
Use unpacker eclass for unpacking the .deb.  Fix changelog doc install.

(Portage version: 2.2.0_alpha164/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

1 # Copyright 1999-2013 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.4 2013/03/02 19:12:04 hwoarang Exp $
4
5 EAPI="4"
6
7 inherit eutils versionator unpacker
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 dev-qt/qtcore:4
48 dev-qt/qtgui: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_prepare() {
62 epatch "${FILESDIR}"/${PF}-opt-path.patch
63 use headless && epatch "${FILESDIR}"/${PF}-headless.patch
64
65 # Remove bundled libraries/plugins/python interpreter. Please keep this
66 # mapping in sync with the RDEPEND system-libs? ( atoms ) above, and the
67 # list of deleted files below
68 #
69 # libcrypto.so.0.$SSL_SLOT => dev-libs/openssl:$SSL_SLOT
70 # libssl.so.$SSL_SLOT => dev-libs/openssl:$SSL_SLOT
71 # libcurl.so* => net-misc/curl
72 # libexpat.so* => dev-libs/expat
73 # libgcc_s.so => >=sys-devel/gcc-4
74 # libstdc++.so* => >=sys-devel/gcc-4
75 # libpcre.so* => dev-libs/libpcre
76 # libpng12* => media-libs/libpng:1.2
77 # libQt*.so* => dev-qt/qtcore dev-qt/qtgui
78 # libsqlite3.so* => dev-db/sqlite:3
79 # libssh2.so* => net-libs/libssh2
80 # libz.so* => sys-libs/zlib
81 #
82 # pycurl.so => dev-python/pycurl
83 #
84 # usr/lib/SpiderOak/py pyexpat.so => dev-lang/python:2.7
85 #
86 if use system-libs; then
87 for lib in \
88 libcrypto.so.$SSL_SLOT \
89 libssl.so.$SSL_SLOT \
90 libcurl.so* \
91 libexpat.so* \
92 libgcc_s.so* \
93 libpcre.so* \
94 libpng12* \
95 libQt*.so* \
96 libsqlite3.so* \
97 libssh2.so* \
98 libstdc++.so* \
99 libz.so* \
100 pycurl.so \
101 pyexpat.so
102 do
103 rm usr/lib/SpiderOak/$lib || die "rm $lib failed"
104 done
105
106 # Remove bundled python interpreter => dev-lang/python:2.7
107 rm usr/lib/SpiderOak/py || die "rm py failed"
108 fi
109
110 # Set RPATH for preserve-libs handling (bug #400979).
111 cd "${S}/usr/lib/SpiderOak" || die
112 local x
113 for x in * ; do
114 # Use \x7fELF header to separate ELF executables and libraries
115 [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
116 patchelf --set-rpath '$ORIGIN' "${x}" || \
117 die "patchelf failed on ${x}"
118 done
119 }
120
121 src_install() {
122 #install the executable script
123 exeinto /usr/bin
124 doexe usr/bin/SpiderOak
125
126 #install the prebundled libraries
127 dodir /opt
128 cp -pPR usr/lib/SpiderOak "${ED}"/opt/
129
130 #install the config files
131 rm -rf etc/apt
132 use dbus || rm -rf etc/dbus-1
133 insinto /
134 doins -r etc
135
136 #install the changelog
137 dodoc usr/share/doc/spideroak/changelog.gz
138
139 if ! use headless ; then
140 domenu usr/share/applications/spideroak.desktop
141 doicon usr/share/pixmaps/spideroak.png
142 fi
143 }
144
145 pkg_postinst() {
146 if use headless; then
147 einfo "For instructions on running SpiderOak without a GUI, please read the FAQ:"
148 einfo " https://spideroak.com/faq/questions/62/how_do_i_install_spideroak_on_a_headless_linux_server/"
149 einfo " https://spideroak.com/faq/questions/67/how_can_i_use_spideroak_from_the_commandline/"
150 fi
151 if use system-libs; then
152 einfo "You have chosen to use your system libraries rather than the precompiled libraries that"
153 einfo "SpiderOak bundles with their software. While upstream discourages this (see bug #398313),"
154 einfo "there are advantages to using the system libraries, like reducing the size of the package"
155 einfo "on your hard drive. For more reasons why bundled librars are not a good idea, see"
156 einfo " https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries"
157 fi
158 }

  ViewVC Help
Powered by ViewVC 1.1.20