Contents of /smage/trunk/core/klibc/klibc-1.5.21-r2.smage2
Parent Directory | Revision Log
Revision 1503 -
(show annotations)
(download)
Thu Mar 3 14:23:39 2011 UTC (13 years, 6 months ago) by niro
File size: 2543 byte(s)
Thu Mar 3 14:23:39 2011 UTC (13 years, 6 months ago) by niro
File size: 2543 byte(s)
-rev bump for mass rebuild
1 | # $Id: klibc-1.5.15-r4.smage2 3200 2009-10-16 11:22:56Z niro $ |
2 | |
3 | PNAME="klibc" |
4 | PVER="1.5.21" |
5 | PBUILD="r2" |
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}/Current/${SRCFILE} |
27 | 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 | # # broken due the patch |
86 | # mlink asm-x86 /usr/$(mlibdir)/klibc/include/asm || die |
87 | |
88 | # remove broken symlinks |
89 | if [[ -L ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} ]] |
90 | then |
91 | rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} || die |
92 | fi |
93 | if [[ -L ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/i386} ]] |
94 | then |
95 | rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/i386} || die |
96 | fi |
97 | |
98 | # copy missing adm includes |
99 | cp -a linux/arch/x86/include/asm/* ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/ || die |
100 | |
101 | # docs |
102 | minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die |
103 | } |