uclibc: backport fix for conflicting getline definitions
[qi-bootmenu-system/guyou.git] / build.sh
bloba30bac32d8e1ae1ae7861d2142f4c1a3b7ad2104
1 #!/bin/bash
3 # Get lots of predefined environment variables and shell functions.
5 source sources/include.sh || exit 1
7 ./download.sh || exit 1
9 if [ -z "$CC" ]; then
10 if [ -z "$CROSS" ]; then
11 export CC="gcc"
12 else
13 export CC="${CROSS}gcc"
17 [ -z $(which "$CC") ] && echo "Compiler '$CC' not found in \$PATH." && exit 1
19 echo "=== Building"
21 blank_tempdir "$WORK"
23 if [ $# -eq 0 ]
24 then
25 rm -f "$TOP/initramfs-files"
26 blank_tempdir "$STAGING_DIR"
27 ln -s "usr/lib" "$STAGING_DIR/lib"
28 blank_tempdir "$ROOT_DIR"
31 if [[ ! -d "$ROOT_DIR" || ! -d "$ROOT_DIR/usr" ]]
32 then
33 mkdir -p "$ROOT_DIR"/{tmp,proc,sys,dev,home/root} || dienow
34 for i in bin sbin lib etc
36 mkdir -p "$ROOT_DIR/usr/$i" || dienow
37 ln -s "usr/$i" "$ROOT_DIR/$i" || dienow
38 done
41 if [ $# -ne 0 ]
42 then
43 for arg in "$@"
45 build_package "$arg"
46 done
47 exit
50 build_package linux-headers
51 build_package uClibc
52 build_package busybox
53 build_package kexec-tools
54 build_package zlib
55 build_package libjpeg
56 build_package tslib
57 build_package freetype
58 build_package eina
59 build_package eet
60 build_package evas
61 build_package ecore
62 build_package embryo
63 build_package lua
64 build_package edje
65 build_package elementary
66 build_package dropbear
67 build_package dialog-elementary
69 echo "Build complete now run ./initramfs.sh"