/[gentoo-x86]/sys-kernel/genkernel/genkernel-9999.ebuild
Gentoo

Contents of /sys-kernel/genkernel/genkernel-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.43 - (show annotations) (download)
Mon Sep 10 01:33:51 2012 UTC (23 months, 2 weeks ago) by sping
Branch: MAIN
Changes since 1.42: +2 -2 lines
sys-kernel/genkernel: 3.4.42

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-9999.ebuild,v 1.42 2012/08/14 15:56:50 ryao Exp $
4
5 # genkernel-9999 -> latest Git branch "master"
6 # genkernel-VERSION -> normal genkernel release
7
8 EAPI="3"
9
10 VERSION_BUSYBOX='1.20.2'
11 VERSION_DMRAID='1.0.0.rc16-3'
12 VERSION_MDADM='3.1.5'
13 VERSION_FUSE='2.8.6'
14 VERSION_ISCSI='2.0-872'
15 VERSION_LVM='2.02.88'
16 VERSION_UNIONFS_FUSE='0.24'
17 VERSION_GPG='1.4.11'
18
19 RH_HOME="ftp://sources.redhat.com/pub"
20 DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
21 BB_HOME="http://www.busybox.net/downloads"
22
23 COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
24 ${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
25 mirror://kernel/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.bz2
26 ${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
27 ${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
28 ${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
29 http://www.open-iscsi.org/bits/open-iscsi-${VERSION_ISCSI}.tar.gz
30 mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
31 http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2
32 mirror://gnupg/gnupg/gnupg-${VERSION_GPG}.tar.bz2"
33
34 if [[ ${PV} == 9999* ]]
35 then
36 EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${PN}.git
37 http://git.overlays.gentoo.org/gitroot/proj/${PN}.git"
38 inherit git-2 bash-completion-r1 eutils
39 S="${WORKDIR}/${PN}"
40 SRC_URI="${COMMON_URI}"
41 KEYWORDS=""
42 else
43 inherit bash-completion-r1 eutils
44 SRC_URI="mirror://gentoo/${P}.tar.bz2
45 ${COMMON_URI}"
46 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
47 fi
48
49 DESCRIPTION="Gentoo automatic kernel building scripts"
50 HOMEPAGE="http://www.gentoo.org"
51
52 LICENSE="GPL-2"
53 SLOT="0"
54 RESTRICT=""
55 IUSE="crypt cryptsetup ibm selinux" # Keep 'crypt' in to keep 'use crypt' below working!
56
57 DEPEND="sys-fs/e2fsprogs
58 selinux? ( sys-libs/libselinux )"
59 RDEPEND="${DEPEND}
60 cryptsetup? ( sys-fs/cryptsetup )
61 app-arch/cpio
62 >=app-misc/pax-utils-0.2.1
63 !<sys-apps/openrc-0.9.9"
64 # pax-utils is used for lddtree
65
66 if [[ ${PV} == 9999* ]]; then
67 DEPEND="${DEPEND} app-text/asciidoc"
68 fi
69
70 src_unpack() {
71 if [[ ${PV} == 9999* ]] ; then
72 git-2_src_unpack
73 else
74 unpack ${P}.tar.bz2
75 fi
76 }
77
78 src_prepare() {
79 use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
80
81 # Update software.sh
82 sed -i \
83 -e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
84 -e "s:VERSION_MDADM:$VERSION_MDADM:" \
85 -e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
86 -e "s:VERSION_FUSE:$VERSION_FUSE:" \
87 -e "s:VERSION_ISCSI:$VERSION_ISCSI:" \
88 -e "s:VERSION_LVM:$VERSION_LVM:" \
89 -e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
90 -e "s:VERSION_GPG:$VERSION_GPG:" \
91 "${S}"/defaults/software.sh \
92 || die "Could not adjust versions"
93 }
94
95 src_compile() {
96 if [[ ${PV} == 9999* ]]; then
97 emake || die
98 fi
99 }
100
101 src_install() {
102 insinto /etc
103 doins "${S}"/genkernel.conf || die "doins genkernel.conf"
104
105 doman genkernel.8 || die "doman"
106 dodoc AUTHORS ChangeLog README TODO || die "dodoc"
107
108 dobin genkernel || die "dobin genkernel"
109
110 rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
111
112 insinto /usr/share/genkernel
113 doins -r "${S}"/* || die "doins"
114 use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
115 cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
116
117 # Copy files to /var/cache/genkernel/src
118 elog "Copying files to /var/cache/genkernel/src..."
119 mkdir -p "${D}"/var/cache/genkernel/src
120 cp -f \
121 "${DISTDIR}"/mdadm-${VERSION_MDADM}.tar.bz2 \
122 "${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
123 "${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
124 "${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
125 "${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
126 "${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
127 "${DISTDIR}"/gnupg-${VERSION_GPG}.tar.bz2 \
128 "${DISTDIR}"/open-iscsi-${VERSION_ISCSI}.tar.gz \
129 "${D}"/var/cache/genkernel/src || die "Copying distfiles..."
130
131 newbashcomp "${FILESDIR}"/genkernel.bash "${PN}"
132 insinto /etc
133 doins "${FILESDIR}"/initramfs.mounts
134 }
135
136 pkg_postinst() {
137 echo
138 elog 'Documentation is available in the genkernel manual page'
139 elog 'as well as the following URL:'
140 echo
141 elog 'http://www.gentoo.org/doc/en/genkernel.xml'
142 echo
143 ewarn "This package is known to not work with reiser4. If you are running"
144 ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
145 ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
146 ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
147 ewarn "even reiser3."
148 echo
149 ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
150 ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
151 echo
152 if use crypt && ! use cryptsetup ; then
153 ewarn "Local use flag 'crypt' has been renamed to 'cryptsetup' (bug #414523)."
154 ewarn "Please set flag 'cryptsetup' for this very package if you would like"
155 ewarn "to have genkernel create an initramfs with LUKS support."
156 ewarn "Sorry for the inconvenience."
157 echo
158 fi
159 }

  ViewVC Help
Powered by ViewVC 1.1.20