summaryrefslogtreecommitdiff
blob: 1dcd3574a4f6c488d24b43e5e04f25e4d489c1fa (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit git
inherit eutils

EGIT_REPO_URI="git://github.com/ac1965/kigen.git"
SRC_URI=""

DESCRIPTION="a kernel|initramfs generator"
HOMEPAGE="http://github.com/r1k0/kigen"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64" # ~ppc ~ppc64"
IUSE="doc" # ibm"

DEPEND="dev-lang/python sys-apps/coreutils app-arch/cpio dev-libs/openssl"

src_unpack() {
	git_src_unpack
}

src_install() {
	cd ${S} || die "cannot cd ${S}"

	# python modules
	insinto /usr/lib/`eselect python show --python2`/site-packages/kigen  || die "cannot insinto site-package"
	

	# we chose kigen as the name rep for compatibility with python import kigen.*
	# when the sotfware is installed
	# this way kigen works when installed in site-package/kigen 
	# AND when cloned from git
	doins -r modules || die "cannot doins modules"

#	if use ibm
#	then
#		cp arch/ppc64/kernel-2.6-pSeries arch/ppc64/kernel-2.6
#	else
#		cp arch/ppc64/kernel-2.6.g5 arch/ppc64/kernel-2.6
#	fi

	# arch and default
	insinto /usr/share/kigen 	|| die "cannot insinto /usr/share/kigen"
	doins -r arch 				|| die "cannot doins -r arch"
	doins -r defaults 			|| die "cannot doins -r defaults"
	doins -r tools 				|| die "cannot doins -r tools"
	doins -r scripts			|| die "cannot doins -r scripts"

	# config file
	insinto /etc 		|| die "cannot insinto /etc"
	doins -r doc/kigen 	|| die  "doins doc/kigen.conf"

	# if USE doc is enabled
	if use doc
	then
		# man page
		doman doc/man/kigen.8 || die "doman kgen"
		# README file
		dodoc README.rst TODO || die "dodoc"
	fi

	# entry point
	dosbin kigen || die "dosbin kigen"
}

#pkg_preinst() {
#	rm ${ROOT}/usr/lib/`eselect python show --python2`/site-packages/kigen/*.py[co] 
#}

pkg_postinst() {
	ewarn
	ewarn "This is still experimental software, be cautious."
	ewarn
	ewarn "Tell me what works and breaks for you by dropping a comment at"
	ewarn "http://www.openchill.org/?cat=11"
	ewarn
}