source: scripts/target-scripts/target-iproute2.sh@ 873009c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 873009c was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 2.0 KB
RevLine 
[617118d]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
43max_log_init iproute2 ${IPROUTE2_VER} "target (shared)" ${CONFLOGS} ${LOG}
44./configure ${INSTALL_PREFIX}/include \
45 >> ${LOGFILE} 2>&1 &&
46echo " o Configure OK" &&
47
48min_log_init ${BUILDLOGS} &&
49make CC="${TARGET}-gcc ${ARCH_CFLAGS} ${TGT_CFLAGS}" \
50 AR="${TARGET}-ar" \
51 SBINDIR="${BUILD_BASEDIR}/sbin" \
52 CONFDIR="${BUILD_BASEDIR}/etc/iproute2" \
53 DOCDIR="${BUILD_PREFIX}/share/doc/iproute2" \
54 KERNEL_INCLUDE="${BUILD_PREFIX}/include" \
55 >> ${LOGFILE} 2>&1 &&
56echo " o Build OK" &&
57
58min_log_init ${INSTLOGS} &&
59su -c "make CC=\"${TARGET}-gcc ${ARCH_CFLAGS}\" \
60 AR=\"${TARGET}-ar\" \
61 SBINDIR=\"${BUILD_BASEDIR}/sbin\" \
62 CONFDIR=\"${BUILD_BASEDIR}/etc/iproute2\" \
63 DOCDIR=\"${BUILD_PREFIX}/share/doc/iproute2\" \
64 KERNEL_INCLUDE=\"${BUILD_PREFIX}/include\" \
65 ${INSTALL_OPTIONS} install" \
66 >> ${LOGFILE} 2>&1 &&
67echo " o ALL OK" || barf
68
69if [ ! "${USE_SYSROOT}" = "Y" ]; then
70 # for LFS bootscripts
71 if [ ! -d ${LFS}/sbin ]; then mkdir -p ${LFS}/sbin ; fi
72 ln -sf ..${TGT_TOOLS}/sbin/ip ${LFS}/sbin
73fi
74
Note: See TracBrowser for help on using the repository browser.