Magellan Linux

Contents of /trunk/core/klibc/klibc-1.5-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (show annotations) (download)
Fri Oct 10 19:14:58 2008 UTC (15 years, 6 months ago) by niro
File size: 1902 byte(s)
-cross-compile support
1 # $Header: /magellan-cvs/smage/klibc/klibc-1.5-r5.smage2,v 1.1 2008/05/02 10:18:25 niro Exp $
2
3 PNAME="klibc"
4 PVER="1.5"
5 PBUILD="r5"
6
7 PCATEGORIE="dev-libs"
8 STATE="unstable"
9
10 DESCRIPTION="A minimal libc subset for use with initramfs."
11 HOMEPAGE="http://www.kernel.org/pub/linux/libs/klibc/"
12
13 DEPEND=">= dev-lang/perl-5"
14 SDEPEND=">= virtual/kernel-sources"
15
16 SRCFILE="${PNAME}-${PVER}.tar.bz2"
17 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
18
19 # global var: ${LINUX_SOURCES}
20 # location where they are
21 [[ -z ${LINUX_SOURCES} ]] && LINUX_SOURCES="/usr/src/linux"
22
23 sminclude mtools
24
25 SRC_URI=(
26 http://www.kernel.org/pub/linux/libs/${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-${PVER}-2.6.24.patch
29 )
30
31 UP2DATE="updatecmd ${HOMEPAGE} | lasttarball"
32
33 src_prepare()
34 {
35 munpack ${SRCFILE} || die
36 cd ${SRCDIR}
37
38 # fixes include issues with merged x86/x86_64 asm trees
39 mpatch ${PNAME}-${PVER}-2.6.24.patch || die
40
41 ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die
42 }
43
44 src_compile()
45 {
46 cd ${SRCDIR}
47 mmake \
48 ARCH=${ARCH/i*86/i386} \
49 mandir=/usr/share/man \
50 libdir=/usr/$(mlibdir) \
51 INSTALLDIR=/usr/$(mlibdir)/klibc \
52 SHLIBDIR=/$(mlibdir) \
53 || die
54 }
55
56 src_install()
57 {
58 cd ${SRCDIR}
59
60 # needed directories
61 minstalldir /usr/share/aclocal || die
62
63 mmake \
64 ARCH=${ARCH/i*86/i386} \
65 INSTALLROOT=${BINDIR} \
66 mandir=/usr/share/man \
67 libdir=/usr/$(mlibdir) \
68 INSTALLDIR=/usr/$(mlibdir)/klibc \
69 SHLIBDIR=/$(mlibdir) \
70 install || die
71
72 # remove hardlinks; use symlinks
73 rm ${BINDIR}/usr/$(mlibdir)/klibc/bin/{gunzip,zcat} || die
74 mlink gzip /usr/$(mlibdir)/klibc/bin/gunzip || die
75 mlink gzip /usr/$(mlibdir)/klibc/bin/zcat || die
76
77 # missing ac-includes
78 minstallfile contrib/klibc.m4 /usr/share/aclocal || die
79
80 # broken due the patch
81 mlink asm-x86 /usr/$(mlibdir)/klibc/include/asm || die
82
83 # docs
84 minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die
85 }

Properties

Name Value
svn:keywords Id