Magellan Linux

Contents of /trunk/core/klibc/klibc-1.5.14-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 279 - (show annotations) (download)
Thu Dec 18 22:14:01 2008 UTC (15 years, 5 months ago) by niro
File size: 2237 byte(s)
-fixed packaging issues
1 # $Header: /magellan-cvs/smage/klibc/klibc-1.5-r5.smage2,v 1.1 2008/05/02 10:18:25 niro Exp $
2
3 PNAME="klibc"
4 PVER="1.5.14"
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}/Testing/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-${PVER}-x86_64-fix-io.h.patch
29 )
30
31 UP2DATE="updatecmd ${HOMEPAGE}/Testing/ | lasttarball"
32
33 src_prepare()
34 {
35 munpack ${SRCFILE} || die
36 cd ${SRCDIR}
37
38 # fix errors in io.h header
39 mpatch ${PNAME}-${PVER}-x86_64-fix-io.h.patch || die
40
41 ln -snf ${LINUX_SOURCES} ${SRCDIR}/linux || die
42 }
43
44 src_compile()
45 {
46 cd ${SRCDIR}
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 # # broken due the patch
85 # mlink asm-x86 /usr/$(mlibdir)/klibc/include/asm || die
86
87 # remove broken symlink
88 if [[ ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} ]]
89 then
90 rm ${BINDIR}/usr/$(mlibdir)/klibc/include/asm/asm-${ARCH/i*86/x86} || die
91 fi
92
93 # docs
94 minstalldocs README usr/klibc/{CAVEATS,LICENSE} usr/dash/README.klibc || die
95 }

Properties

Name Value
svn:keywords Id