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.6.9945.ebuild,v 1.1 2012/07/08 15:54:31 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="" |
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}"/opt-path.patch |
70 |
use headless && epatch "${FILESDIR}"/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 |
|
118 |
src_install() { |
119 |
#install the executable script |
120 |
exeinto /usr/bin |
121 |
doexe usr/bin/SpiderOak |
122 |
|
123 |
#install the prebundled libraries |
124 |
dodir /opt |
125 |
cp -pPR usr/lib/SpiderOak "${ED}"/opt/ |
126 |
|
127 |
#install the config files |
128 |
rm -rf etc/apt |
129 |
use dbus || rm -rf etc/dbus-1 |
130 |
insinto / |
131 |
doins -r etc |
132 |
|
133 |
#install the changelog |
134 |
insinto /usr/share/doc/${P} |
135 |
doins usr/share/doc/spideroak/changelog.gz |
136 |
|
137 |
if ! use headless ; then |
138 |
domenu usr/share/applications/spideroak.desktop |
139 |
doicon usr/share/pixmaps/spideroak.png |
140 |
fi |
141 |
} |
142 |
|
143 |
pkg_postinst() { |
144 |
if use headless; then |
145 |
einfo "For instructions on running SpiderOak without a GUI, please read the FAQ:" |
146 |
einfo " https://spideroak.com/faq/questions/62/how_do_i_install_spideroak_on_a_headless_linux_server/" |
147 |
einfo " https://spideroak.com/faq/questions/67/how_can_i_use_spideroak_from_the_commandline/" |
148 |
fi |
149 |
if use system-libs; then |
150 |
einfo "You have chosen to use your system libraries rather than the precompiled libraries that" |
151 |
einfo "SpiderOak bundles with their software. While upstream discourages this (see bug #398313)," |
152 |
einfo "there are advantages to using the system libraries, like reducing the size of the package" |
153 |
einfo "on your hard drive. For more reasons why bundled librars are not a good idea, see" |
154 |
einfo " https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries" |
155 |
fi |
156 |
} |