Magellan Linux

Contents of /branches/magellan-next/core/klibc/klibc-1.5.24-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8772 - (show annotations) (download)
Thu Jul 28 16:23:55 2011 UTC (12 years, 9 months ago) by niro
File size: 1915 byte(s)
auto added: ver bump to 1.5.24-r1
1 # $Id$
2
3 PNAME="klibc"
4 PVER="1.5.24"
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 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${PNAME}-1.5.15-mntproc-definitions.patch
28 )
29
30 UP2DATE="updatecmd ${HOMEPAGE}/Current/'?C=M;O=A' | lasttarball"
31
32 src_prepare()
33 {
34 munpack ${SRCFILE} || die
35 cd ${SRCDIR}
36
37 # mntproc definitions are missing in newer kernels (>=2.6.31)
38 mpatch ${PNAME}-1.5.15-mntproc-definitions.patch || die
39
40 ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die
41 }
42
43 src_compile()
44 {
45 cd ${SRCDIR}
46
47 mmake \
48 ARCH=${ARCH/i*86/i386} \
49 KLIBCARCH=${ARCH/i*86/i386} \
50 KLIBCASMARCH=${ARCH/i*86/x86} \
51 mandir=/usr/share/man \
52 libdir=/usr/$(mlibdir) \
53 INSTALLDIR=/usr/$(mlibdir)/klibc \
54 SHLIBDIR=/$(mlibdir) \
55 || die
56 }
57
58 src_install()
59 {
60 cd ${SRCDIR}
61
62 # needed directories
63 minstalldir /usr/share/aclocal || die
64
65 mmake \
66 ARCH=${ARCH/i*86/i386} \
67 KLIBCARCH=${ARCH/i*86/i386} \
68 KLIBCASMARCH=${ARCH/[i|x]*86*/x86} \
69 INSTALLROOT=${BINDIR} \
70 mandir=/usr/share/man \
71 libdir=/usr/$(mlibdir) \
72 INSTALLDIR=/usr/$(mlibdir)/klibc \
73 SHLIBDIR=/$(mlibdir) \
74 install || die
75
76 # remove hardlinks; use symlinks
77 rm ${BINDIR}/usr/$(mlibdir)/klibc/bin/{gunzip,zcat} || die
78 mlink gzip /usr/$(mlibdir)/klibc/bin/gunzip || die
79 mlink gzip /usr/$(mlibdir)/klibc/bin/zcat || die
80
81 # missing ac-includes
82 minstallfile contrib/klibc.m4 /usr/share/aclocal || die
83
84 # docs
85 minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die
86 }