Magellan Linux

Annotation of /trunk/core/klibc/klibc-1.5.15-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1495 - (hide annotations) (download)
Sat May 9 00:33:49 2009 UTC (15 years ago) by niro
File size: 2588 byte(s)
-typo
1 niro 1494 # $Id$
2    
3     PNAME="klibc"
4     PVER="1.5.15"
5 niro 1495 PBUILD="r3"
6 niro 1494
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}/Testing/${SRCFILE}
27     mirror://${PNAME}/${SRCFILE}
28     mirror://${PNAME}/${PNAME}-1.5.14-x86_64-fix-io.h.patch
29     mirror://${PNAME}/${PNAME}-${PVER}-fix-2.6.29-includes.patch
30     )
31    
32     UP2DATE="updatecmd ${HOMEPAGE}/Testing/ | lasttarball"
33    
34     src_prepare()
35     {
36     munpack ${SRCFILE} || die
37     cd ${SRCDIR}
38    
39     # fix errors in io.h header
40     mpatch ${PNAME}-1.5.14-x86_64-fix-io.h.patch || die
41    
42     # new include-layout in 2.6.29
43     mpatch ${PNAME}-${PVER}-fix-2.6.29-includes.patch || die
44    
45     ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die
46     }
47    
48     src_compile()
49     {
50     cd ${SRCDIR}
51    
52     mmake \
53     ARCH=${ARCH/i*86/i386} \
54     KLIBCARCH=${ARCH/i*86/i386} \
55     KLIBCASMARCH=${ARCH/i*86/x86} \
56     mandir=/usr/share/man \
57     libdir=/usr/$(mlibdir) \
58     INSTALLDIR=/usr/$(mlibdir)/klibc \
59     SHLIBDIR=/$(mlibdir) \
60     || die
61     }
62    
63     src_install()
64     {
65     cd ${SRCDIR}
66    
67     # needed directories
68     minstalldir /usr/share/aclocal || die
69    
70     mmake \
71     ARCH=${ARCH/i*86/i386} \
72     KLIBCARCH=${ARCH/i*86/i386} \
73     KLIBCASMARCH=${ARCH/[i|x]*86*/x86} \
74     INSTALLROOT=${BINDIR} \
75     mandir=/usr/share/man \
76     libdir=/usr/$(mlibdir) \
77     INSTALLDIR=/usr/$(mlibdir)/klibc \
78     SHLIBDIR=/$(mlibdir) \
79     install || die
80    
81     # remove hardlinks; use symlinks
82     rm ${BINDIR}/usr/$(mlibdir)/klibc/bin/{gunzip,zcat} || die
83     mlink gzip /usr/$(mlibdir)/klibc/bin/gunzip || die
84     mlink gzip /usr/$(mlibdir)/klibc/bin/zcat || die
85    
86     # missing ac-includes
87     minstallfile contrib/klibc.m4 /usr/share/aclocal || die
88    
89     # # broken due the patch
90     # mlink asm-x86 /usr/$(mlibdir)/klibc/include/asm || die
91    
92     # remove broken symlinks
93     if [[ -L ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} ]]
94     then
95     rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} || die
96     fi
97     if [[ -L ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/i386} ]]
98     then
99     rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/i386} || die
100     fi
101    
102     # copy missing adm includes
103     cp -a linux/arch/x86/include/asm/* ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/ || die
104    
105     # docs
106     minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die
107     }

Properties

Name Value
svn:keywords Id