summaryrefslogtreecommitdiff
blob: f79a614424f83f06ab9f1ad70300b8cc3d50e919 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit subversion toolchain-funcs cmake-utils

DESCRIPTION="BitTorrent tracker designed to offer high performance while consuming little resources."
HOMEPAGE="http://xbtt.sourceforge.net/tracker/"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""

RDEPEND="dev-db/mysql"
DEPEND="${RDEPEND}
		dev-libs/boost"

src_unpack() {
	if [[ "${PV}" =~ (_p)([0-9]+) ]] ; then
		MTSLPT_REV=${BASH_REMATCH[2]}
	else
		MTSLPT_REV=HEAD
	fi
	subversion_fetch "https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/misc/@${MTSLPT_REV}" misc \
		|| die "${ESVN}: unknown problem occurred in subversion_fetch."
	subversion_fetch "https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/Tracker/@${MTSLPT_REV}" Tracker \
		|| die "${ESVN}: unknown problem occurred in subversion_fetch."
}

src_compile() {
	cd Tracker && \
	cmake . || die "Cmake failed"
	emake || die "build failed"
}

src_install() {
	cd Tracker && \
	dosbin xbt_tracker || die "No binary was built."
	insinto /etc
	newins xbt_tracker.conf.default xbt_tracker.conf || die "Default config absent."
	insinto /usr/share/doc/${PF}
	doins *.sql || die "Failed to install *.sql files."
}

pkg_preinst() {
	: # Avoid call to subversion_pkg_preinst
}