source: scripts/native-scripts/native-e2fsprogs.sh @ 617118d

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 617118d was 617118d, checked in by Jim Gifford <clfs@…>, 18 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.7 KB
Line 
1#!/bin/bash
2
3# cross-lfs native e2fsprogs build
4# --------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=e2fsprogs-native.log
13
14set_libdirname
15setup_multiarch
16
17unpack_tarball e2fsprogs-${E2FSPROGS_VER}
18
19# Apply patch for HTREE problem posted by GS 3/19/2003
20cd ${PKGDIR}
21#apply_patch e2fsprogs-${E2FSPROGS_VER}
22
23case ${KERNEL_VER} in
24   2.6* )
25   # patch util.c to remove SCSI_BLOCK_MAJOR references
26   # SCSI_DISK_MAJOR is no longer defined in linux/major.h for 2.6 kernel
27   # TODO: check future e2fsprogs versions to see if this is fixed
28   case ${E2FSPROGS_VER} in
29      1.34* )
30         # check if SCSI_DISK_MAJOR defined in linux/major.h
31         grep SCSI_DISK_MAJOR /usr/include/linux/major.h > /dev/null 2>&1 ||
32            apply_patch e2fsprogs-${E2FSPROGS_VER}-2.6.0hdr-fix
33      ;;
34   esac
35   ;;
36esac
37
38# Fix some permissions issues when building the e2fsprogs 1.35 tarball
39# as a normal user. Need to check if previous versions are affected
40case ${E2FSPROGS_VER} in
41   1.35 )
42      chmod 755 configure
43      chmod 644 po/*
44   ;;
45   1.37 )
46      # Fix braindead error in e2p tests where include paths aren't
47      # being passed
48      if [ ! -f lib/e2p/Makefile.in-ORIG ]; then
49         mv lib/e2p/Makefile.in lib/e2p/Makefile.in-ORIG
50      fi
51
52      sed 's@-DTEST_PROGRAM@$(ALL_CFLAGS) &@g' \
53         lib/e2p/Makefile.in-ORIG > lib/e2p/Makefile.in         
54   ;;
55esac
56
57# Edit configure so libdir and root_libdir point at */lib64 .
58# Also handles additional_libdir (used if --with-libiconv-prefix is set,
59# if we did set it (which we dont) we'd want the 64bit one anyway) ...
60test -f configure-ORIG ||
61   cp -p configure configure-ORIG
62
63sed "/libdir=.*\/lib/s@/lib@/${libdirname}@g" \
64   configure-ORIG > configure
65
66cd ${SRC}
67
68test -d ${SRC}/e2fsprogs-${E2FSPROGS_VER}-build &&
69    rm -rf ${SRC}/e2fsprogs-${E2FSPROGS_VER}-build
70
71mkdir ${SRC}/e2fsprogs-${E2FSPROGS_VER}-build &&
72cd ${SRC}/e2fsprogs-${E2FSPROGS_VER}-build
73
74max_log_init E2fsprogs ${E2FSPROGS_VER} "native (shared)" ${CONFLOGS} ${LOG}
75CC="${CC-gcc} ${ARCH_CFLAGS}" \
76CFLAGS="-O2 -pipe" \
77../${PKGDIR}/configure \
78   --prefix=/usr \
79   --with-root-prefix="" \
80   --enable-elf-shlibs \
81   --mandir=/usr/share/man \
82   --infodir=/usr/share/info \
83   >> ${LOGFILE} 2>&1 &&
84echo " o Configure OK" &&
85
86min_log_init ${BUILDLOGS} &&
87make LDFLAGS="-s" \
88   >> ${LOGFILE} 2>&1 &&
89echo " o Build OK" &&
90
91min_log_init ${TESTLOGS} &&
92make check \
93   >>  ${LOGFILE} 2>&1 &&
94echo " o Test OK" &&
95
96min_log_init ${INSTLOGS} &&
97make install \
98   >> ${LOGFILE} 2>&1 &&
99make install-libs \
100   >> ${LOGFILE} 2>&1 &&
101install-info /usr/share/info/libext2fs.info /usr/share/info/dir &&
102echo " o ALL OK" || barf
103
104/sbin/ldconfig
105
Note: See TracBrowser for help on using the repository browser.