summaryrefslogtreecommitdiff
blob: 2dc536e8c4cdd77f99cc022069f2b43840047059 (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
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/dev-util/bitkeeper/bitkeeper-3.0.ebuild,v 1.2 2002/11/17 09:35:59 vapier Exp $

DESCRIPTION="BitKeeper is a scalable configuration management system"
SRC_URI=""
HOMEPAGE="http://www.bitkeeper.com/"
DEPEND=">=virtual/glibc-2.2
	>=dev-lang/tcl-8.3.3
	X? ( >=dev-lang/tk-8.3.3 )"

SLOT="0"
LICENSE="BKL"
KEYWORDS="x86 ppc sparc alpha"

# I'm not sure what the official way to do this is...
use 'x86' >/dev/null && A="bk-3.0-x86-glibc22-linux.bin"
use 'ppc' >/dev/null && A="bk-3.0-powerpc-glibc21-linux.bin"
use 'sparc' >/dev/null && A="bk-3.0-sparc-glibc21-linux.bin"
use 'alpha' >/dev/null && A="bk-3.0-alpha-glibc21-linux.bin"

pkg_setup() {
	if [ ! -f ${DISTDIR}/${A} ] ; then
		einfo "****************************************************************************"
		einfo "* Perform the following steps to install this package:"
		einfo "*  - Sign up at ${HOMEPAGE}"
		einfo "*  - Check your mail and visit the download location"
		einfo "*  - Download ${A} and place it in ${DISTDIR}"
		einfo "*  - emerge this package again"
		einfo "****************************************************************************"
		die "Follow the above instructions, please"
	fi
}

src_unpack() {
	mkdir ${S}
	cp ${DISTDIR}/${A} ${S}/${A}
	chmod 755 ${S}/${A}
	echo 'none' | ${S}/${A} > ${S}/output 2>/dev/null
	installer=`sed -n -e "s/Installation script: \(.*\)/\1/p" ${S}/output`
	archive=`sed -n -e "s/Gzipped tar archive: \(.*\)/\1/p" ${S}/output`
	mv $installer ${S}/installer
	mv $archive ${S}/archive
}

src_install () {
	dodir /opt
	dodir /etc/env.d
	cd ${D}/opt && tar -xzf ${S}/archive
	mv ${D}/opt/bitkeeper ${D}/opt/${P}
	cat <<EOF >${D}/etc/env.d/10bitkeeper
# Generated by ${P}.ebuild
PATH=/opt/${P}
ROOTPATH=/opt/${P}
MANPATH=/opt/${P}/man
EOF
}

pkg_postinst () {
	einfo "Run 'bk regressions' to verify the installation. (Recommended)"
}