source: scripts/native-scripts/native-bzip2.sh@ 60454e2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 60454e2 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: 1.5 KB
RevLine 
[617118d]1#!/bin/bash
2
3# cross-lfs native bzip2 build
4# ----------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG="bzip2-native.log"
13
14SELF=`basename ${0}`
15set_buildenv
16set_libdirname
17setup_multiarch
18
19unpack_tarball bzip2-${BZIP2_VER} &&
20cd ${PKGDIR}
21
22# Edit Makefiles
23for file in Makefile-libbz2_so Makefile ; do
24 test -f ${file}-ORIG ||
25 mv ${file} ${file}-ORIG
26
27 sed -e "s@/lib\(/\| \|$\)@/${libdirname}\1@g" \
28 ${file}-ORIG > ${file}
29done
30
31max_log_init Bzip2 ${BZIP2_VER} "target (shared)" ${BUILDLOGS} ${LOG}
32make \
33 CC="${CC-gcc} ${ARCH_CFLAGS}" \
34 CXX="${CXX-g++} ${ARCH_CFLAGS}" \
35 LDFLAGS="-s" -f Makefile-libbz2_so \
36 >> ${LOGFILE} 2>&1 &&
37echo -e "\n${BRKLN}" >> ${LOGFILE} &&
38make ${PMFLAGS} \
39 CC="${CC-gcc} ${ARCH_CFLAGS}" \
40 CXX="${CXX-g++} ${ARCH_CFLAGS}" \
41 LDFLAGS="-s" \
42 -f Makefile-libbz2_so \
43 >> ${LOGFILE} 2>&1 &&
44echo " o Build OK" || barf
45
46# Remove existing symlinks/files
47rm -f /usr/bin/bz* /bin/bz* &&
48
49min_log_init ${INSTLOGS} &&
50make \
51 CC="${CC-gcc} ${ARCH_CFLAGS}" \
52 CXX="${CXX-g++} ${ARCH_CFLAGS}" \
53 PREFIX=/usr install \
54 >> ${LOGFILE} 2>&1 &&
55echo " o ALL OK" || barf
56
57cp -f bzip2-shared /bin/bzip2
58cp -af libbz2.so* /${libdirname} &&
59ln -sf ../../${libdirname}/libbz2.so.1.0 /usr/${libdirname}/libbz2.so &&
60rm -f /usr/bin/{bunzip2,bzcat,bzip2} &&
61mv -f /usr/bin/{bzip2recover,bzless,bzmore} /bin &&
62ln -sf bzip2 /bin/bunzip2 &&
63ln -sf bzip2 /bin/bzcat &&
64
65/sbin/ldconfig
66
Note: See TracBrowser for help on using the repository browser.