source: scripts/scripts/target-scripts/target-iproute2.sh @ bc4ea88

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since bc4ea88 was bc4ea88, checked in by Jim Gifford <clfs@…>, 15 years ago

r1046@server (orig r1044): ryan | 2006-01-12 00:57:04 -0800

r1080@rei: lfs | 2006-01-12 19:14:27 +1100
Make configure script executable


  • Property mode set to 100755
File size: 2.1 KB
Line 
1#!/bin/bash
2
3# cross-lfs target iproute2 build
4# -------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=iproute2-target.log
13set_libdirname
14setup_multiarch
15
16unpack_tarball iproute2-${IPROUTE2_VER}
17cd ${PKGDIR}
18
19if [ "${USE_SYSROOT}" = "Y" ]; then
20   BUILD_BASEDIR=""
21   BUILD_PREFIX="/usr"
22   INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
23   INSTALL_OPTIONS="DESTDIR=${LFS}"
24else
25   BUILD_BASEDIR=${TGT_TOOLS}
26   BUILD_PREFIX=${TGT_TOOLS}
27   INSTALL_PREFIX=${TGT_TOOLS}
28   INSTALL_OPTIONS=""
29fi
30
31test -f tc/Makefile-ORIG || cp -p tc/Makefile tc/Makefile-ORIG
32chmod 666 tc/Makefile
33sed -e "s@/usr/lib@${BUILD_PREFIX}/${libdirname}@g" \
34    -e 's@\(install[-a-zA-Z0-9 ]*\)-s@\1@g' \
35    tc/Makefile-ORIG > tc/Makefile
36
37test -f misc/Makefile-ORIG || cp -p misc/Makefile misc/Makefile-ORIG
38chmod 666 misc/Makefile
39sed -e '/^TARGETS/s@arpd@@g' \
40    -e 's@\(install[-a-zA-Z0-9 ]*\)-s@\1@g' \
41    misc/Makefile-ORIG > misc/Makefile
42
43# Bleh, configure sometimes is not executable
44chmod 755 ./configure
45
46max_log_init iproute2 ${IPROUTE2_VER} "target (shared)" ${CONFLOGS} ${LOG}
47./configure ${INSTALL_PREFIX}/include \
48   >> ${LOGFILE} 2>&1 &&
49echo " o Configure OK" &&
50
51min_log_init ${BUILDLOGS} &&
52make CC="${TARGET}-gcc ${ARCH_CFLAGS} ${TGT_CFLAGS}" \
53     AR="${TARGET}-ar" \
54     SBINDIR="${BUILD_BASEDIR}/sbin" \
55     CONFDIR="${BUILD_BASEDIR}/etc/iproute2" \
56     DOCDIR="${BUILD_PREFIX}/share/doc/iproute2" \
57     KERNEL_INCLUDE="${BUILD_PREFIX}/include" \
58   >> ${LOGFILE} 2>&1 &&
59echo " o Build OK" &&
60
61min_log_init ${INSTLOGS} &&
62su -c "make CC=\"${TARGET}-gcc ${ARCH_CFLAGS}\" \
63     AR=\"${TARGET}-ar\" \
64     SBINDIR=\"${BUILD_BASEDIR}/sbin\" \
65     CONFDIR=\"${BUILD_BASEDIR}/etc/iproute2\" \
66     DOCDIR=\"${BUILD_PREFIX}/share/doc/iproute2\" \
67     KERNEL_INCLUDE=\"${BUILD_PREFIX}/include\" \
68     ${INSTALL_OPTIONS} install" \
69   >> ${LOGFILE} 2>&1 &&
70echo " o ALL OK" || barf
71
72if [ ! "${USE_SYSROOT}" = "Y" ]; then
73   # for LFS bootscripts
74   if [ ! -d ${LFS}/sbin ]; then mkdir -p ${LFS}/sbin ; fi
75   ln -sf ..${TGT_TOOLS}/sbin/ip ${LFS}/sbin
76fi
77
Note: See TracBrowser for help on using the repository browser.