Magellan Linux

Annotation of /smage/trunk/core/klibc/klibc-1.5.25-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1860 - (hide annotations) (download)
Thu Sep 29 15:19:10 2011 UTC (12 years, 8 months ago) by niro
File size: 1995 byte(s)
auto added: ver bump to 1.5.25-r1
1 niro 1859 # $Id$
2    
3     PNAME="klibc"
4     PVER="1.5.25"
5     PBUILD="r1"
6    
7     PCATEGORIE="dev-libs"
8    
9     DESCRIPTION="A minimal libc subset for use with initramfs."
10     HOMEPAGE="http://www.kernel.org/pub/linux/libs/klibc/"
11    
12     DEPEND=">= dev-lang/perl-5"
13     SDEPEND=">= virtual/kernel-sources"
14    
15     SRCFILE="${PNAME}-${PVER}.tar.bz2"
16     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17    
18     # global var: ${LINUX_SOURCES}
19     # location where they are
20     [[ -z ${LINUX_SOURCES} ]] && LINUX_SOURCES="/usr/src/linux"
21    
22     sminclude mtools
23    
24     SRC_URI=(
25     http://www.kernel.org/pub/linux/libs/${PNAME}/Current/${SRCFILE}
26 niro 1860 http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE}
27 niro 1859 mirror://${PNAME}/${SRCFILE}
28     mirror://${PNAME}/${PNAME}-1.5.15-mntproc-definitions.patch
29     )
30    
31     UP2DATE="updatecmd ${HOMEPAGE}/Current/'?C=M;O=A' | lasttarball"
32    
33     src_prepare()
34     {
35     munpack ${SRCFILE} || die
36     cd ${SRCDIR}
37    
38     # mntproc definitions are missing in newer kernels (>=2.6.31)
39     mpatch ${PNAME}-1.5.15-mntproc-definitions.patch || die
40    
41     ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die
42     }
43    
44     src_compile()
45     {
46     cd ${SRCDIR}
47    
48     mmake \
49     ARCH=${ARCH/i*86/i386} \
50     KLIBCARCH=${ARCH/i*86/i386} \
51     KLIBCASMARCH=${ARCH/i*86/x86} \
52     mandir=/usr/share/man \
53     libdir=/usr/$(mlibdir) \
54     INSTALLDIR=/usr/$(mlibdir)/klibc \
55     SHLIBDIR=/$(mlibdir) \
56     || die
57     }
58    
59     src_install()
60     {
61     cd ${SRCDIR}
62    
63     # needed directories
64     minstalldir /usr/share/aclocal || die
65    
66     mmake \
67     ARCH=${ARCH/i*86/i386} \
68     KLIBCARCH=${ARCH/i*86/i386} \
69     KLIBCASMARCH=${ARCH/[i|x]*86*/x86} \
70     INSTALLROOT=${BINDIR} \
71     mandir=/usr/share/man \
72     libdir=/usr/$(mlibdir) \
73     INSTALLDIR=/usr/$(mlibdir)/klibc \
74     SHLIBDIR=/$(mlibdir) \
75     install || die
76    
77     # remove hardlinks; use symlinks
78     rm ${BINDIR}/usr/$(mlibdir)/klibc/bin/{gunzip,zcat} || die
79     mlink gzip /usr/$(mlibdir)/klibc/bin/gunzip || die
80     mlink gzip /usr/$(mlibdir)/klibc/bin/zcat || die
81    
82     # missing ac-includes
83     minstallfile contrib/klibc.m4 /usr/share/aclocal || die
84    
85     # docs
86     minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die
87     }