source: scripts/build-blfs.sh@ 57d97a5

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 57d97a5 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: 4.6 KB
RevLine 
[617118d]1#!/bin/bash
2
3# build-blfs.sh
4#
5# Script to build blfs packages
6#
7# Authors: Ryan Oliver <ryan.oliver@pha.com.au
8#
9# $LastChangedBy: ryan $
10# $LastChangedDate: 2004-09-28 17:23:32 +1000 (Tue, 28 Sep 2004) $
11# $LastChangedRevision: 238 $
12
13# Set SELF to be name of script called, minus any path...
14SELF=$(basename ${0})
15echo "Running ${SELF}"
16VERSION="3.0.1"
17DATE=$(date +'%Y%m%d')
18export DATE
19
20# Read in build configuration information
21# plfs-config should reside in the same directory as this script.
22# We need to use dirname to determine where to find it as SCRIPTS
23# env var is not set yet (set in plfs-config itself)
24. `dirname ${0}`/plfs-config
25
26# Sanity check, are ${LFS}, ${HST_TOOLS} and ${TGT_TOOLS} set?
27if [ "X${LFS}" = "X" -o "X${HST_TOOLS}" = "X" -o "X${TGT_TOOLS}" = "X" ]; then
28 echo "Error: Not all required environment vars have been set." 1>&2
29 echo " Check plfs-config" 1>&2
30 exit 1
31fi
32
33export LFS=""
34
35# Get package version information
36. ${SCRIPTS}/plfs-packages
37. ${SCRIPTS}/blfs-packages
38
39# Source Functions and definitions
40. ${SCRIPTS}/build-init.sh
41
42
43set +x
44unset LD_LIBRARY_PATH
45unset LD_PRELOAD
46
47# Configure uses these if set, and will not look for a cross-compiler
48unset CC CXX
49
50export LDFLAGS="-s"
51
52# Setup PATH
53export PATH=/bin:/sbin:/usr/bin:/usr/sbin
54
55# If ${SRC} does not exist, create it
56test -d ${SRC} || mkdir -p ${SRC}
57
58mkdir -p ${CONFLOGS}
59mkdir -p ${BUILDLOGS}
60mkdir -p ${INSTLOGS}
61mkdir -p ${TESTLOGS}
62cd ${SRC}
63
64#scripts_dir="cross-scripts-${VERSION}"
65scripts_dir="blfs-scripts"
66
67# scripts for building target tools
68
69##############
70# NFS support
71##############
72test "Y" = "${MULTIARCH}" &&
73{
74script_list="blfs-tcp-wrappers-32.sh
75blfs-tcp-wrappers-64.sh"
76} || {
77script_list="blfs-tcp-wrappers.sh"
78}
79
80script_list="${script_list}
81blfs-portmap.sh
82blfs-nfs-utils.sh"
83
84###################
85#
86###################
87# TCL here so we can test kerberos.
88# BDB also dependant
89test "Y" = "${MULTIARCH}" &&
90{
91script_list="${script_list}
92blfs-tcl-32.sh
93blfs-tcl-64.sh"
94} || {
95script_list="${script_list}
96blfs-tcl.sh"
97}
98
99test "Y" = "${MULTIARCH}" &&
100{
101script_list="${script_list}
102blfs-cracklib-32.sh
103blfs-cracklib-64.sh
104blfs-linux-pam-32.sh
105blfs-linux-pam-64.sh
106blfs-mit-krb5-32.sh
107blfs-mit-krb5-64.sh
108blfs-bdb-32.sh
109blfs-bdb-64.sh"
110} || {
111script_list="${script_list}
112blfs-cracklib.sh
113blfs-linux-pam.sh
114blfs-mit-krb5.sh
115blfs-bdb.sh"
116}
117#script_list="blfs-shadow-pam.sh"
118
119####################
120# OPENSSL + OPENSSH
121####################
122# Depends on krb5 libs (MIT)
123test "Y" = "${MULTIARCH}" &&
124{
125script_list="${script_list}
126blfs-openssl-32.sh
127blfs-openssl-64.sh
128blfs-openssh.sh"
129} || {
130script_list="${script_list}
131blfs-openssl.sh
132blfs-openssh.sh"
133}
134
135# reqs openssl, krb5, bdb, tcpwrappers (ldap)
136test "Y" = "${MULTIARCH}" &&
137{
138script_list="${script_list}
139blfs-cyrus-sasl-32.sh
140blfs-cyrus-sasl-64.sh
141blfs-openldap-32.sh
142blfs-openldap-64.sh
143blfs-nssldap-32.sh
144blfs-nssldap-64.sh
145blfs-ntp.sh"
146} || {
147script_list="${script_list}
148blfs-cyrus-sasl.sh
149blfs-openldap.sh
150blfs-nssldap.sh
151blfs-ntp.sh"
152}
153
154# TODO: have to do something with catering for 2 freetype-configs
155# for biarch, specifying the right freetype-config for
156# fontconfig, and fix the biarch libtool issues w fontconfig
157test "Y" = "${MULTIARCH}" &&
158{
159script_list="${script_list}
160blfs-libpng-32.sh
161blfs-libpng-64.sh
162blfs-freetype2-32.sh
163blfs-freetype2-64.sh
164blfs-expat-32.sh
165blfs-expat-64.sh"
166} || {
167script_list="${script_list}
168blfs-libpng.sh
169blfs-freetype2.sh
170blfs-expat.sh"
171}
172
173test "Y" = "${MULTIARCH}" &&
174{
175script_list="${script_list}
176blfs-fontconfig-32.sh
177blfs-fontconfig-64.sh
178blfs-xorg-32.sh
179blfs-xorg-64.sh"
180} || {
181script_list="${script_list}
182blfs-fontconfig.sh
183blfs-xorg.sh"
184}
185
186SCRIPTLIST=`echo "${script_list}" | \
187 sed "s@\(.*\)@${scripts_dir}/\1@"`
188
189# Check if we are resuming from a particular script
190test ! -z "${1}" &&
191{
192 SCRIPTLIST=`echo ${SCRIPTLIST} | sed "s@.*\(${1}.*\)@\1@g"`
193}
194
195echo ' o Checking for needed sources and tarballs'
196check_tarballs ${SCRIPTLIST}
197
198for script in ${SCRIPTLIST}; do
199 echo "Running ${SCRIPTS}/${script}"
200 # HACK: export SELF to be the script we are running
201 # (keeps logfile output correct)
202 export SELF=${script}
203 ${SCRIPTS}/${script}
204
205 test 0 = ${?} ||
206 {
207 echo
208 echo "Failed script was ${script}"
209 echo "Please fix the error above from"
210 echo " ${SCRIPTS}/${script}"
211 echo "and rerun the build with the command"
212 echo
213 echo " ${0} $script"
214 echo
215 echo "to resume the build."
216 exit 1
217 }
218done
Note: See TracBrowser for help on using the repository browser.