/[gentoo-alt]/trunk/sys-kernel/freebsd-kernel/freebsd-kernel-5.3_rc1.ebuild
Gentoo

Contents of /trunk/sys-kernel/freebsd-kernel/freebsd-kernel-5.3_rc1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 112 - (show annotations) (download)
Wed Nov 10 00:49:38 2004 UTC (9 years, 8 months ago) by angusyoung
File size: 1747 byte(s)
FreeBSD's 5.3_rc1 kernel ebuild

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 inherit freebsd-utils flag-o-matic
6 #unalias make
7
8 MY_P=freebsd-sources-${PV}
9 MY_KERNCONF=GENERIC
10 CONTRIB=freebsd-contrib-${PV}
11 LIB=freebsd-lib-${PV}
12
13 DESCRIPTION="FreeBSD kernel sources"
14 HOMEPAGE="http://www.freebsd.org"
15 SRC_URI="${MY_P}.tar.bz2"
16
17 IUSE=""
18 DEPEND="sys-libs/freebsd-libc
19 sys-kernel/freebsd-headers"
20 PROVIDE="virtual/kernel virtual/sources"
21
22 S=${WORKDIR}/sys
23
24 src_unpack() {
25 unpack ${MY_P}.tar.bz2
26 unpack ${CONTRIB}.tar.bz2
27 unpack ${LIB}.tar.bz2
28 }
29
30 src_compile() {
31
32 # Let's avoid problems before they appear
33 strip-flags
34
35 einfo "Using ${MY_KERNCONF} as kernel configuration"
36 cd ${S}/i386/conf
37 if [ -f ${MY_KERNCONF} ] ; then
38 config ${MY_KERNCONF} || die "Unable do configure kernel"
39 else
40 die "Requested configuration file does not exist"
41 fi
42 cd ${S}/i386/compile/${MY_KERNCONF}
43
44 einfo "Building kernel dependencies"
45 CC=cc make depend || die "Unable to compile kernel dependencies"
46
47 # ATM it won't install withou these files.
48 #einfo "Building some boot files"
49 #cd ${S}/boot/i386
50 #CC=cc make || die "Unable to compile boot files"
51
52 einfo "Building kernel"
53 cd ${S}/i386/compile/${MY_KERNCONF}
54 CC=cc make || die "Unable to compile kernel"
55
56 }
57
58
59 src_install() {
60 dodir /boot
61
62 for FILE in $(ls /boot) ; do
63 if [ -f ${ROOT}/boot/${FILE} ] ; then
64 cp ${ROOT}/boot/${FILE} ${D}/boot/
65 fi
66 done
67 dodir /boot/defaults
68 cp ${ROOT}/boot/defaults/loader.conf ${D}/boot/defaults/
69
70 cd ${S}/i386/compile/${MY_KERNCONF}
71 make DESTDIR=${D} install || die "Kernel installation failed"
72 }
73
74 pkg_preinst() {
75 if [ -f /boot/kernel ] ; then
76 mv ${ROOT}/boot/kernel /${ROOT}/boot/kernel.old
77 fi
78 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20