summaryrefslogtreecommitdiff
blob: 131c2612a82771d52d1a6d7daf1e551f487d7fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-backup/cyphertite/cyphertite-2.0.2-r5.ebuild,v 1.1 2014/09/28 16:20:39 grknight Exp $

EAPI=5

inherit toolchain-funcs eutils multilib

DESCRIPTION="High Security, Zero-Knowledge Online Backup"
HOMEPAGE="https://www.cyphertite.com/"
SRC_URI="https://www.cyphertite.com/snapshots/source/${PV}/${PN}-full-${PV}.tar.gz"
LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
	app-arch/xz-utils:0=
	dev-db/sqlite:3=
	>=dev-libs/openssl-1.0.1g:0=[-bindist]
	dev-libs/expat:0=
	dev-libs/libbsd:0=
	dev-libs/libedit:0=
	dev-libs/libevent:0=
	>=dev-libs/lzo-2.0:2=
	>=net-misc/curl-7.15.1:0=[ssl]
	sys-libs/zlib:0=
"
RDEPEND="${DEPEND}"

src_prepare() {
	# Fix build system that assumes that modules are installed to the live system
	epatch "${FILESDIR}/${P}-fix-build.patch" "${FILESDIR}/${P}-cflags.patch"
}

src_compile() {
	# Package has a home grown Makefile system. Make it work for Gentoo
	emake INCDIR="${S}" WARNFLAGS="-Wall" OPTLEVEL="" DEBUG="" CC="$(tc-getCC)" \
		AR="$(tc-getAR)" LOCALBASE="/usr" LIB.LINKSTATIC="" LIB.LINKDYNAMIC=""
}

src_install() {
	# Only the main executable needs to be installed
	emake -C cyphertite/cyphertite DESTDIR="${D}" LOCALBASE="usr" LIBDIR="usr/$(get_libdir)" LNFORCE="-s" install

	# Fix up broken man symlinks
	rm "${D}"usr/share/man/man1/ct*.1 || die
	newman "${D}"usr/share/man/man1/cyphertite.1 ct.1
	newman "${D}"usr/share/man/man1/cyphertitectl.1 ctctl.1
	newman "${D}"usr/share/man/man1/cyphertitefb.1 ctfb.1
}