]>
Commit | Line | Data |
---|---|---|
11ca4f20 MT |
1 | ############################################################################### |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = u-boot | |
67ae211c | 7 | version = 2012.10 |
11ca4f20 MT |
8 | release = 1 |
9 | sup_arches = armv5tel armv7hl | |
10 | ||
11 | groups = Development/Tools | |
12 | url = http://www.denx.de/wiki/U-Boot | |
13 | license = GPLv2+ | |
14 | summary = U-Boot utilities. | |
15 | ||
16 | description | |
17 | U-Boot is a Boot Loader, i.e. its primary purpose in the shipping | |
18 | system is to load some operating system. | |
19 | end | |
20 | ||
21 | source_dl = ftp://ftp.denx.de/pub/u-boot/ | |
22 | sources = %{thisapp}.tar.bz2 | |
23 | ||
24 | build | |
25 | build | |
67ae211c | 26 | while read arch platform targets; do |
11ca4f20 MT |
27 | # Skip all other architectures. |
28 | [ "${arch}" = "%{DISTRO_ARCH}" ] || continue | |
29 | ||
30 | builddir="$(pwd)/build-${platform}" | |
31 | mkdir -p ${builddir} | |
32 | ||
67ae211c MT |
33 | make CROSS_COMPILE="" O=${builddir} ${platform}_config |
34 | make HOSTCC="gcc %{CFLAGS}" CROSS_COMPILE="" O=${builddir} | |
11ca4f20 MT |
35 | done < %{DIR_SOURCE}/targets |
36 | ||
37 | # Build tools. | |
38 | # Need to create a config because the tools won't build without. | |
39 | make sheevaplug_config | |
40 | ||
41 | make tools HOSTCC="gcc %{CFLAGS}" HOSTSTRIP="/bin/true" CROSS_COMPILE="" | |
42 | make env HOSTCC="gcc %{CFLAGS}" HOSTSTRIP="/bin/true" | |
43 | end | |
44 | ||
45 | install | |
67ae211c | 46 | while read arch platform targets; do |
11ca4f20 MT |
47 | # Skip all other architectures. |
48 | [ "${arch}" = "%{DISTRO_ARCH}" ] || continue | |
49 | ||
50 | builddir="build-${platform}" | |
51 | installdir="%{BUILDROOT}/usr/lib/%{name}/${platform}" | |
52 | mkdir -pv ${installdir} | |
53 | ||
67ae211c MT |
54 | for target in ${targets}; do |
55 | install -D -m 644 ${builddir}/${target} ${installdir} | |
56 | done | |
57 | if [ -e "${builddir}/MLO" ]; then | |
58 | install -D -m 644 ${builddir}/MLO ${installdir} | |
59 | fi | |
60 | for f in ${builddir}/spl/*.bin; do | |
61 | [ -e "${f}" ] || continue | |
62 | install -D -m 644 ${f} ${installdir} | |
63 | done | |
11ca4f20 MT |
64 | done < %{DIR_SOURCE}/targets |
65 | ||
66 | # Install tools. | |
67 | mkdir -pv %{BUILDROOT}/usr/bin %{BUILDROOT}/usr/share/man/man1 | |
68 | install -p -m 0755 tools/mkimage %{BUILDROOT}/usr/bin | |
69 | install -p -m 0644 doc/mkimage.1 %{BUILDROOT}/usr/share/man/man1 | |
70 | install -p -m 0755 tools/env/fw_printenv %{BUILDROOT}/usr/bin | |
71 | ln -svf fw_printenv %{BUILDROOT}/usr/bin/fw_setenv | |
72 | end | |
73 | end | |
74 | ||
75 | packages | |
76 | package %{name} | |
77 | ||
78 | package %{name}-tools | |
79 | summary = U-Boot utilities. | |
80 | description | |
81 | This package contains a few U-Boot utilities - mkimage | |
82 | for creating boot images and fw_printenv/fw_setenv for | |
83 | manipulating the boot environment variables. | |
84 | end | |
85 | ||
86 | files | |
87 | /usr/bin | |
88 | /usr/share/man/man1 | |
89 | end | |
90 | end | |
42945a97 MT |
91 | |
92 | package %{name}-debuginfo | |
93 | template DEBUGINFO | |
94 | end | |
11ca4f20 | 95 | end |