Annotation of /trunk/toolchain/toolchain-wget/toolchain-wget-1.9.1-r1.smage2
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1376 byte(s)
Mon Jul 4 00:41:38 2005 UTC (19 years, 2 months ago) by niro
File size: 1376 byte(s)
new toolchain create utilities and smages
1 | niro | 153 | # $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-wget/toolchain-wget-1.9.1-r1.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ |
2 | |||
3 | PNAME="toolchain-wget" | ||
4 | PVER="1.9.1" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | SRCFILE="wget-${PVER}.tar.gz" | ||
8 | SRCDIR="${BUILDDIR}/wget-${PVER}" | ||
9 | |||
10 | SRC_URI=( | ||
11 | mirror://wget/${SRCFILE} | ||
12 | ) | ||
13 | |||
14 | ## global toolchain var ## | ||
15 | # export CFLAGS, CHOST, TOOLCHAIN_PREFIX | ||
16 | export CFLAGS="-mtune=i486 -Os -pipe" | ||
17 | export CXXFLAGS="${CFLAGS}" | ||
18 | export TOOLCHAIN_PREFIX="/tools" | ||
19 | |||
20 | zapmost() { | ||
21 | local rootdir | ||
22 | rootdir="${1}/" | ||
23 | [ ! -e "$rootdir" ] && echo "zapmost: $rootdir not found; skipping..." && return 1 | ||
24 | install -d ${BUILDDIR}/zap | ||
25 | local dirs | ||
26 | shift | ||
27 | local x | ||
28 | for x in ${*} | ||
29 | do | ||
30 | if [ "${x##*/}" = "${x}" ] | ||
31 | then | ||
32 | #one deep | ||
33 | mv ${rootdir}${x} ${BUILDDIR}/zap | ||
34 | else | ||
35 | #more than one deep; create intermediate directories | ||
36 | dirs=${x%/*} | ||
37 | install -d ${BUILDDIR}/zap/${dirs} | ||
38 | mv ${rootdir}${x} ${BUILDDIR}/zap/${x} | ||
39 | fi | ||
40 | done | ||
41 | rm -rf ${rootdir}* | ||
42 | mv ${BUILDDIR}/zap/* ${rootdir} | ||
43 | } | ||
44 | |||
45 | src_prepare() { | ||
46 | munpack ${SRCFILE} || die | ||
47 | } | ||
48 | |||
49 | src_compile() { | ||
50 | cd ${SRCDIR} | ||
51 | |||
52 | ./configure \ | ||
53 | --host=${CHOST} \ | ||
54 | --prefix=${TOOLCHAIN_PREFIX} \ | ||
55 | --disable-nls \ | ||
56 | --without-ssl \ | ||
57 | || die | ||
58 | |||
59 | mmake || die | ||
60 | } | ||
61 | |||
62 | src_install() { | ||
63 | cd ${SRCDIR} | ||
64 | make DESTDIR=${BINDIR} install || die | ||
65 | |||
66 | # remove unwanted stuff | ||
67 | KEEPFILES="bin/wget etc/wgetrc" | ||
68 | zapmost ${BINDIR}/${TOOLCHAIN_PREFIX} ${KEEPFILES} || die | ||
69 | } |