source: scripts/native-scripts/native-util-linux.sh@ 1a625f6

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1a625f6 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.2 KB
Line 
1#!/bin/bash
2
3# cross-lfs native util-linux build
4# ---------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=util-linux-native.log
13
14set_libdirname
15setup_multiarch
16
17unpack_tarball util-linux-${UTILLINUX_VER} &&
18cd ${PKGDIR}
19
20case ${UTILLINUX_VER} in
21 2.12 | 2.12a )
22 case ${KERNEL_VER} in
23 2.[56].* )
24 # Fixes for utillinux 2.12 + 2.12a for building against 2.6
25 # kernel headers
26 apply_patch util-linux-2.12a-kernel_headers-1
27 ;;
28 esac
29 ;;
30 2.12[k-q] )
31 # fix cramfs
32 apply_patch util-linux-2.12q-cramfs-1
33 ;;
34esac
35
36case ${UTILLINUX_VER} in
37 2.12[a-m] )
38 # Patch to fix fdiskbsdlabel.h for m68k, also adds unistd.h to list
39 # of includes for swapon.c
40 apply_patch util-linux-2.12a-cross-lfs-fixes
41 ;;
42 2.12* )
43 # Patch to fix fdiskbsdlabel.h for m68k
44 apply_patch util-linux-2.12n-cross-lfs-fixes
45 ;;
46esac
47
48# Make FHS compliant
49# Get list of files which reference etc/adjtime
50filelist=`grep -l -d recurse etc/adjtime *`
51
52# Edit each file in turn
53for file in ${filelist} ; do
54 test -f ${file}-ORIG ||
55 cp ${file} ${file}-ORIG
56 # Change instance of etc/adjtime to var/lib/hwclock/adjtime
57 sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
58 ${file}-ORIG > ${file}
59done
60mkdir -p /var/lib/hwclock &&
61
62# Optimization defaults to -O2
63max_log_init Util-linux ${UTILLINUX_VER} "native (shared)" ${CONFLOGS} ${LOG}
64export CC="${CC-gcc} ${ARCH_CFLAGS}"
65
66# Here it is just plain ugly. We set CPU and ARCH to something that wont trigger
67# anything in MCONFIG
68export CPU=m68k
69export ARCH=m68k
70export DESTDIR=${LFS}
71
72./configure \
73 >> ${LOGFILE} 2>&1 &&
74echo " o Configure OK" &&
75
76# Don't build kill or sln
77# (procps supplies kill and glibc supplies sln)
78# No need to supply LDFLAGS="-s", taken care of during configure
79#
80# Optionally, for x86, unset CPUOPT (defaults to i486 if cpu not i386)
81# or set specifically for your cpu type.
82# See MCONFIG...
83
84min_log_init ${BUILDLOGS} &&
85make HAVE_KILL=yes HAVE_SLN=yes CPUOPT="" \
86 >> ${LOGFILE} 2>&1 &&
87echo " o Build OK" &&
88
89min_log_init ${INSTLOGS} &&
90make HAVE_KILL=yes HAVE_SLN=yes install \
91 >> ${LOGFILE} 2>&1 &&
92echo " o ALL OK" || barf
93
Note: See TracBrowser for help on using the repository browser.