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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Aug 14 15:56:50 2012 UTC (23 months, 1 week ago) by ryao
Branch: MAIN
Changes since 1.4: +13 -9 lines
Move sed invocations to src_prepare

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

  ViewVC Help
Powered by ViewVC 1.1.20