Contents of /branches/magellan-next/core/klibc/klibc-1.5.22-r1.smage2
Parent Directory | Revision Log
Revision 7602 -
(show annotations)
(download)
Fri May 27 18:33:13 2011 UTC (13 years, 4 months ago) by niro
File size: 1932 byte(s)
Fri May 27 18:33:13 2011 UTC (13 years, 4 months ago) by niro
File size: 1932 byte(s)
auto added: ver bump to 1.5.22-r1
1 | # $Id$ |
2 | |
3 | PNAME="klibc" |
4 | PVER="1.5.22" |
5 | PBUILD="r1" |
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 | # docs |
86 | minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die |
87 | } |