sys-libs/uclibc-0.9.33.1: mark mips stable
[proj/hardened-dev.git] / sys-libs / uclibc / uclibc-0.9.33.1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30.1-r1.ebuild,v 1.9 2011/04/20 18:10:38 ulm Exp $
4
5 EAPI="4"
6
7 inherit savedconfig
8
9 MY_P=uClibc-${PV}
10 DESCRIPTION="C library for developing embedded Linux systems"
11 HOMEPAGE="http://www.uclibc.org/"
12 SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2"
13
14 LICENSE="LGPL-2"
15 SLOT="0"
16 KEYWORDS="-* amd64 x86 mips ~ppc"
17 IUSE=""
18 RESTRICT="strip"
19
20 RDEPEND=""
21 DEPEND=""
22
23 S=${WORKDIR}/${MY_P}
24
25 src_configure() {
26         if use savedconfig; then
27                 restore_config config/.config
28         else
29                 cp "${FILESDIR}"/uclibc-${ARCH}.${PV}.config .config || die "${ARCH} is not supported"
30         fi
31         yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig"
32 }
33
34 src_compile() {
35         emake headers
36         emake
37         emake utils
38 }
39
40 src_install() {
41         emake DESTDIR="${D}" install
42
43         # remove files coming from kernel-headers
44         rm -rf "${D}"/usr/include/{linux,asm*}
45
46         emake DESTDIR="${D}" install_utils
47         dobin extra/scripts/getent
48         dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
49
50         if use savedconfig; then
51                 save_config config/.config
52         fi
53 }
54
55 pkg_postinst() {
56         echo "UTC" > "${ROOT}"/etc/TZ
57         /sbin/ldconfig
58         [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null
59 }