Contents of /trunk/deprecated/klibc/klibc-2.0.1-r1.smage2
Parent Directory | Revision Log
Revision 12884 -
(show annotations)
(download)
Thu Jul 5 13:00:30 2012 UTC (12 years, 2 months ago) by niro
File size: 1739 byte(s)
Thu Jul 5 13:00:30 2012 UTC (12 years, 2 months ago) by niro
File size: 1739 byte(s)
-moved to 'deprecated'
1 | # $Id$ |
2 | |
3 | PNAME="klibc" |
4 | PVER="2.0.1" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="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.xz" |
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}/${PVER%.*}/${SRCFILE} |
26 | mirror://${PNAME}/${SRCFILE} |
27 | ) |
28 | |
29 | UP2DATE="updatecmd ${HOMEPAGE}/Current/'?C=M;O=A' | lasttarball xz" |
30 | |
31 | src_prepare() |
32 | { |
33 | munpack ${SRCFILE} || die |
34 | cd ${SRCDIR} |
35 | |
36 | ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die |
37 | } |
38 | |
39 | src_compile() |
40 | { |
41 | cd ${SRCDIR} |
42 | |
43 | mmake \ |
44 | ARCH=${ARCH/i*86/i386} \ |
45 | KLIBCARCH=${ARCH/i*86/i386} \ |
46 | KLIBCASMARCH=${ARCH/i*86/x86} \ |
47 | mandir=/usr/share/man \ |
48 | libdir=/usr/$(mlibdir) \ |
49 | INSTALLDIR=/usr/$(mlibdir)/klibc \ |
50 | SHLIBDIR=/usr/$(mlibdir) \ |
51 | || die |
52 | } |
53 | |
54 | src_install() |
55 | { |
56 | cd ${SRCDIR} |
57 | |
58 | # needed directories |
59 | minstalldir /usr/share/aclocal || die |
60 | |
61 | mmake \ |
62 | ARCH=${ARCH/i*86/i386} \ |
63 | KLIBCARCH=${ARCH/i*86/i386} \ |
64 | KLIBCASMARCH=${ARCH/[i|x]*86*/x86} \ |
65 | INSTALLROOT=${BINDIR} \ |
66 | mandir=/usr/share/man \ |
67 | libdir=/usr/$(mlibdir) \ |
68 | INSTALLDIR=/usr/$(mlibdir)/klibc \ |
69 | SHLIBDIR=/usr/$(mlibdir) \ |
70 | install || die |
71 | |
72 | # remove hardlinks; use symlinks |
73 | rm ${BINDIR}/usr/$(mlibdir)/klibc/bin/{gunzip,zcat} || die |
74 | mlink gzip /usr/$(mlibdir)/klibc/bin/gunzip || die |
75 | mlink gzip /usr/$(mlibdir)/klibc/bin/zcat || die |
76 | |
77 | # missing ac-includes |
78 | minstallfile contrib/klibc.m4 /usr/share/aclocal || die |
79 | |
80 | # docs |
81 | minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die |
82 | } |