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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Sep 3 21:59:41 2012 UTC (23 months, 3 weeks ago) by sping
Branch: MAIN
Changes since 1.4: +2 -2 lines
Fix genkernel.conf location regression (bug #433111)

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

  ViewVC Help
Powered by ViewVC 1.1.20