r3088 - in jhalfs/trunk: . common common/blfs-tool-deps

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Aug 29 11:18:07 PDT 2006


Author: manuel
Date: 2006-08-29 12:18:06 -0600 (Tue, 29 Aug 2006)
New Revision: 3088

Added:
   jhalfs/trunk/common/blfs-tool-deps/
Modified:
   jhalfs/trunk/Config.in
   jhalfs/trunk/blfs-tool
   jhalfs/trunk/common/blfs-tool-deps/901-libxml2
   jhalfs/trunk/common/blfs-tool-deps/902-libxslt
   jhalfs/trunk/common/blfs-tool-deps/903-docbook-xsl
   jhalfs/trunk/common/blfs-tool-deps/904-gpm
   jhalfs/trunk/common/blfs-tool-deps/905-links
   jhalfs/trunk/common/blfs-tool-deps/906-sudo
   jhalfs/trunk/common/blfs-tool-deps/907-wget
   jhalfs/trunk/common/blfs-tool-deps/908-subversion
   jhalfs/trunk/common/common-functions
   jhalfs/trunk/common/func_validate_configs.sh
   jhalfs/trunk/jhalfs
Log:
Merged r3073:3085 from experimental:
blfs-tool support integration.

Modified: jhalfs/trunk/Config.in
===================================================================
--- jhalfs/trunk/Config.in	2006-08-29 18:16:27 UTC (rev 3087)
+++ jhalfs/trunk/Config.in	2006-08-29 18:18:06 UTC (rev 3088)
@@ -283,11 +283,99 @@
 		default "uclibc"	if LIB_UCLIBC
 	#--- End HLFS specific params
 
+	#--- blfs-tool Support
+	config BLFS_TOOL
+		bool	"Add blfs-tool support"
+		default	n
+		depends on !BOOK_BLFS
+		help
+			#--- Activating this option additional packages needed to
+			#    use blfs-tool will be installed.
+			#
+			#    The blfs-tool files will be installed under
+			#    $BUILD_DIR/blfs_root.
+
+			#    After booting the new xLFS system you should to
+			#    create an user account and move the blfs-root
+			#    directory to the user's home, making he the
+			#    directory and files owner, before start
+			#    using blfs-tool.
+			#
+			#    Also, be sure to create the $TRACKING_DIR directory
+			#    and bring to the build user the right privileges
+			#    over it.
+			#
+			#    And don't forget to configure sudo properly.
+
+	choice
+		prompt	"BLFS Release"
+		default	BLFS_SVN
+		depends on BLFS_TOOL
+		config	BLFS_SVN
+			bool	"BLFS SVN"
+			help
+				#-- Current development version as in trunk
+
+		config	BLFS_BRANCH
+			bool	"BLFS Branch or stable book"
+			help
+				#-- A supported SVN branch or stable released book
+	endchoice
+
+	config	BLFS_BRANCH_ID
+		string	"BLFS Book Version (mandatory)"
+		default	"**EDIT ME**"
+		depends on BLFS_BRANCH
+		help
+			#-- A list of valid branches and stable books ID's is available here.
+			#   http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
+
+	menu "blfs-tool dependencies"
+		depends on BLFS_TOOL
+
+		config	DEP_LIBXML
+		bool	"libxml2 (required)"
+		default	y
+
+		config	DEP_LIBXSLT
+		bool	"libxslt (required)"
+		default	y
+
+		config	DEP_DBXSL
+		bool	"DocBook XSL (required)"
+		default	y
+
+		config	DEP_LINKS
+		bool	"links (required)"
+		default	y
+
+		config	DEP_SUDO
+		bool	"sudo (recommended)"
+		default	y
+
+		config	DEP_WGET
+		bool	"wget (recommended)"
+		default	y
+
+		config	DEP_SVN
+		bool	"SVN client (optional)"
+		default	y
+
+		config	DEP_GPM
+		bool	"GPM (optional, see help)"
+		default	y
+		help
+			#-- You MUST to install manually the gpm bootscript
+			#   and create its configuration file
+	endmenu
+	#--- End blfs-tool Support
+
 	#--- BLFS specific params
 	config	BLFS_ROOT
 		string "Directory root"
-		default "$HOME/blfs_root"
-		depends on BOOK_BLFS
+		default "$HOME/blfs_root" if BOOK_BLFS
+		default "/blfs_root" if BLFS_TOOL
+		depends on BOOK_BLFS || BLFS_TOOL
 		help
 			#-- Full path to the directory where all required
 			#   files and scripts will be stored.
@@ -295,19 +383,21 @@
 	config	BLFS_XML
 		string "BLFS sources directory"
 		default "blfs-xml"
-		depends on BOOK_BLFS
+		depends on BOOK_BLFS || BLFS_TOOL
 		help
-			#-- The directory name where BLFS book sources
-			#   will be checkout.
+			#-- The directory name under $BLFS_ROOT where BLFS book
+			#   sources will be checkout.
 
 	config	TRACKING_DIR
 		string "Installed packages database directory"
 		default "/var/lib/jhalfs/BLFS"
-		depends on BOOK_BLFS
+		depends on BOOK_BLFS || BLFS_TOOL
 		help
 			#-- Full path to the directory where the installed
 			#   packages database will be created.
 			#
+			#   You MUST to create manually this directory.
+			#
 			#   Note that the user that will build the packages must
 			#   have read and write privileges on that directory.
 	#--- End BLFS specific params

Modified: jhalfs/trunk/blfs-tool
===================================================================
--- jhalfs/trunk/blfs-tool	2006-08-29 18:16:27 UTC (rev 3087)
+++ jhalfs/trunk/blfs-tool	2006-08-29 18:18:06 UTC (rev 3088)
@@ -86,13 +86,12 @@
 
 # Set the SVN tree
 case $BRANCH_ID in
-  dev* | SVN | trunk )  TREE=trunk/BOOK ;;
-              *EDIT* )  echo " You forgot to set the branch or stable book version."
-                        echo " Please rerun make and fix the configuration."
-                        exit 2
-                        ;;
-            branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
-                   * )  TREE=tags/${BRANCH_ID}/BOOK ;;
+  development )  TREE=trunk/BOOK ;;
+       *EDIT* )  echo " You forgot to set the branch or stable book version."
+                 echo " Please rerun make and fix the configuration."
+                 exit 2 ;;
+     branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
+            * )  TREE=tags/${BRANCH_ID}/BOOK ;;
 esac
 
 # For consistency with other books

Copied: jhalfs/trunk/common/blfs-tool-deps (from rev 3087, jhalfs/branches/experimental/common/blfs-tool-deps)

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-08-29 18:16:27 UTC (rev 3087)
+++ jhalfs/trunk/common/common-functions	2006-08-29 18:18:06 UTC (rev 3088)
@@ -577,6 +577,8 @@
     *) exit 1 ;;
   esac
 
+  [[ "${BLFS_TOOL}" = "y" ]] && copy_blfs_deps_scripts
+
   echo " ...OK"
 
   # Make the scripts executable.
@@ -610,6 +612,22 @@
                  $BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
       ;;
   esac
+
+  if [[ "${BLFS_TOOL}" = "y" ]] ; then
+(
+cat << EOF
+$LIBXML_PKG
+$LIBXSLT_PKG
+$DBXSL_PKG
+$LINKS_PKG
+$SUDO_PKG
+$WGET_PKG
+$SVN_PKG
+$GPM_PKG
+EOF
+) >> pkg_tarball_list
+  fi
+
   echo " ...OK"
 
 }
@@ -780,4 +798,91 @@
   esac
 
   cd $BUILDDIR/sources
+
+  [[ "${BLFS_TOOL}" = "y" ]] && add_blfs_deps_urls
 }
+
+#----------------------------# Hardcoded URLs and MD5.
+add_blfs_deps_urls() {       # No easy way to extract it.
+#----------------------------# Some FTP mirrors may not work
+
+  local BLFS_SERVER="${SERVER}/pub/blfs/conglomeration/"
+
+  if [[ "${DEP_LIBXML}" = "y" ]] ; then
+    echo "${LIBXML_URL} ${BLFS_SERVER}libxml2/${LIBXML_PKG} ${LIBXML_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
+    echo "${LIBXSLT_URL} ${BLFS_SERVER}libxslt/${LIBXSLT_PKG} ${LIBXSLT_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_DBXSL}" = "y" ]] ; then
+    echo "${DBXSL_URL} ${BLFS_SERVER}docbook-xsl/${DBXSL_PKG} ${DBXSL_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_LINKS}" = "y" ]] ; then
+    echo "${LINKS_URL} ${BLFS_SERVER}links/${LINKS_PKG} ${LINKS_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_SUDO}" = "y" ]] ; then
+    echo "${SUDO_URL} ${BLFS_SERVER}sudo/${SUDO_PKG} ${SUDO_MD5}" >> urls.lst
+    echo "${SUDO_PATCH_URL} ${BLFS_SERVER}sudo/${SUDO_PATCH} ${SUDO_PATCH_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_WGET}" = "y" ]] ; then
+    echo "${WGET_URL} ${BLFS_SERVER}wget/${WGET_PKG} ${WGET_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_SVN}" = "y" ]] ; then
+    echo "${SVN_URL} ${BLFS_SERVER}subversion/${SVN_PKG} ${SVN_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_GPM}" = "y" ]] ; then
+    echo "${GPM_URL} ${BLFS_SERVER}gpm/${GPM_PKG} ${GPM_MD5}" >> urls.lst
+    echo "${GPM_PATCH_1_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_1} ${GPM_PATCH_1_MD5}" >> urls.lst
+    echo "${GPM_PATCH_2_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_2} ${GPM_PATCH_2_MD5}" >> urls.lst
+  fi
+
+}
+
+#----------------------------# Maybe there is a better way to do this, but this
+copy_blfs_deps_scripts() {   # method avoid to place the test on all
+#----------------------------# $PROGNAME/master.sh scripts.
+
+  mkdir -p ${PROGNAME}-commands/blfs-tool-deps
+
+  if [[ "${DEP_LIBXML}" = "y" ]] ; then
+    mv blfs-tool-deps/901-libxml2 ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
+    mv blfs-tool-deps/902-libxslt ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_DBXSL}" = "y" ]] ; then
+    mv blfs-tool-deps/903-docbook-xsl ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_LINKS}" = "y" ]] ; then
+    mv blfs-tool-deps/905-links ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_SUDO}" = "y" ]] ; then
+    mv blfs-tool-deps/906-sudo ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_WGET}" = "y" ]] ; then
+    mv blfs-tool-deps/907-wget ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_SVN}" = "y" ]] ; then
+    mv blfs-tool-deps/908-subversion ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_GPM}" = "y" ]] ; then
+    mv blfs-tool-deps/904-gpm ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  rm -rf blfs-tool-deps
+
+}

Modified: jhalfs/trunk/common/func_validate_configs.sh
===================================================================
--- jhalfs/trunk/common/func_validate_configs.sh	2006-08-29 18:16:27 UTC (rev 3087)
+++ jhalfs/trunk/common/func_validate_configs.sh	2006-08-29 18:18:06 UTC (rev 3088)
@@ -20,14 +20,16 @@
 inline_doc
 
   # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
-  local -r  hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL  GRSECURITY_HOST      TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL LUSER LGROUP"
-  local -r  clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
-  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET                         OPTIMIZE REPORT                                      STRIP FSTAB             CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
-  local -r   lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                             TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
+  local -r  hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL  GRSECURITY_HOST      TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL"
+  local -r  clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL"
+  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET                         OPTIMIZE REPORT                                      STRIP FSTAB             CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL"
+  local -r   lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                             TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL"
   local -r  blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
 
+  local -r  blfs_tool_PARAM_LIST="BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR DEP_LIBXML DEP_LIBXSLT DEP_DBXSL DEP_LINKS DEP_SUDO DEP_WGET DEP_SVN DEP_GPM"
+
   local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
-  local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'
+  local -r ERROR_MSG_pt2='rerun make and fix your configuration settings${OFF}'
   local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
 
   local    PARAM_LIST=
@@ -107,6 +109,7 @@
       ARCH            | \
       TARGET          | \
       GRSECURITY_HOST | \
+      BLFS_TOOL       | \
       TIMEZONE        | \
       PAGE)   echo -e "`eval echo $PARAM_VALS`" ;;
 
@@ -141,7 +144,7 @@
                   fi ;;
 
         # BOOK validation. Very ugly, need be fixed
-      BOOK)        if [[ "${WC}" = "1" ]] ; then
+      BOOK)        if [[ "${WORKING_COPY}" = "y" ]] ; then
                      validate_dir -z -d
                    else
                      echo -e "`eval echo $PARAM_VALS`"
@@ -185,6 +188,14 @@
 
     esac
   done
+
+  if [[ "${BLFS_TOOL}" = "y" ]] ; then
+    echo "${nl_}    ${BLUE}blfs-tool settings${OFF}"
+    for config_param in ${blfs_tool_PARAM_LIST}; do
+      echo -e "`eval echo $PARAM_VALS`"
+    done
+  fi
+
   set -e
   echo "${nl_}***${BOLD}${GREEN} ${PARAM_GROUP%%_*T} config parameters look good${OFF} ***${nl_}"
 }

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2006-08-29 18:16:27 UTC (rev 3087)
+++ jhalfs/trunk/jhalfs	2006-08-29 18:18:06 UTC (rev 3088)
@@ -90,43 +90,10 @@
 [[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1
 [[ $VERBOSITY > 0 ]] && echo "OK"
 
-      #--- Envars not sourced from configuration (yet)
+      #--- Envars not sourced from configuration
 declare -r SVN="svn://svn.linuxfromscratch.org"
 declare -r LOG=000-masterscript.log
 
-case $PROGNAME in
-  clfs2) LFSVRS=development; TREE=branches/clfs-2.0/BOOK ;;
-      *) LFSVRS=development; TREE=trunk/BOOK             ;;
-esac
-
-if [[ ! -z ${BRANCH_ID} ]]; then
-  case $BRANCH_ID in
-    dev* | SVN | trunk )
-      case $PROGNAME in
-        clfs2 ) TREE=branches/clfs-2.0/BOOK ;;
-             *) TREE=trunk/BOOK ;;
-      esac
-      LFSVRS=development
-      ;;
-    branch-* )
-      LFSVRS=${BRANCH_ID}
-      TREE=branches/${BRANCH_ID#branch-}/BOOK
-      ;;
-    * )
-      case $PROGNAME in
-        lfs | hlfs )
-          LFSVRS=${BRANCH_ID}
-          TREE=tags/${BRANCH_ID}/BOOK
-          ;;
-        clfs | clfs2 )
-          LFSVRS=${BRANCH_ID}
-          TREE=tags/${BRANCH_ID}
-          ;;
-      esac
-      ;;
-  esac
-fi
-
 # These are boolean vars generated from Config.in.
 # ISSUE: If a boolean parameter is not set <true> that
 # variable is not defined by the menu app. This can
@@ -146,9 +113,100 @@
 KEYMAP=${KEYMAP:=none}
 GRSECURITY_HOST=${GRSECURITY_HOST:-n}
 
+# Book surces envars
+BRANCH_ID=${BRANCH_ID:=development}
+
+case $BRANCH_ID in
+  development )
+    case $PROGNAME in
+      clfs2 ) TREE=branches/clfs-2.0/BOOK ;;
+           *) TREE=trunk/BOOK ;;
+    esac
+    LFSVRS=development
+    ;;
+  *EDIT* )  echo " You forgot to set the branch or stable book version."
+            echo " Please rerun make and fix the configuration."
+            exit 2 ;;
+  branch-* )
+    LFSVRS=${BRANCH_ID}
+    TREE=branches/${BRANCH_ID#branch-}/BOOK
+    ;;
+  * )
+    case $PROGNAME in
+      lfs | hlfs )
+        LFSVRS=${BRANCH_ID}
+        TREE=tags/${BRANCH_ID}/BOOK
+        ;;
+      clfs | clfs2 )
+        LFSVRS=${BRANCH_ID}
+        TREE=tags/${BRANCH_ID}
+        ;;
+    esac
+    ;;
+esac
+
 # Set the document location...
 BOOK=${BOOK:=$PROGNAME-$LFSVRS}
 
+# blfs-tool envars
+BLFS_TOOL=${BLFS_TOOL:-n}
+if [[ "${BLFS_TOOL}" = "y" ]] ; then
+  BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
+  case $BLFS_BRANCH_ID in
+    development )  BLFS_TREE=trunk/BOOK ;;
+         *EDIT* )  echo " You forgot to set the BLFS branch or stable book version."
+                   echo " Please rerun make and fix the configuration."
+                   exit 2 ;;
+       branch-* )  BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
+              * )  BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
+  esac
+  # dependencies envars, to can update it more easy.
+    # libxml2
+  LIBXML_PKG="libxml2-2.6.26.tar.gz"
+  LIBXML_URL="ftp://xmlsoft.org/libxml2/${LIBXML_PKG}"
+  LIBXML_MD5="2d8d3805041edab967368b497642f981"
+    # libxslt
+  LIBXSLT_PKG="libxslt-1.1.17.tar.gz"
+  LIBXSLT_URL="ftp://xmlsoft.org/libxslt/${LIBXSLT_PKG}"
+  LIBXSLT_MD5="fde6a7a93c0eb14cba628692fa3a1000"
+    # DocBook XSL
+  DBXSL_PKG="docbook-xsl-1.69.1.tar.bz2"
+  DBXSL_URL="http://prdownloads.sourceforge.net/docbook/${DBXSL_PKG}"
+  DBXSL_MD5="6ebd29a67f2dcc3f2220f475ee6f6552"
+    # Links
+  LINKS_PKG="links-2.1pre21.tar.bz2"
+  LINKS_URL="http://links.twibright.com/download/${LINKS_PKG}"
+  LINKS_MD5="7687e2c32e337e11c6e9d8cd8c5202c9"
+    # sudo
+  SUDO_PKG="sudo-1.6.8p12.tar.gz"
+  SUDO_URL="http://www.courtesan.com/sudo/dist/${SUDO_PKG}"
+  SUDO_MD5="b29893c06192df6230dd5f340f3badf5"
+    # sudo envar fix patch
+  SUDO_PATCH="sudo-1.6.8p12-envvar_fix-1.patch"
+  SUDO_PATCH_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${SUDO_PATCH}"
+  SUDO_PATCH_MD5="454925aedfe054dff8fe0d03b209f986"
+    # wget
+  WGET_PKG="wget-1.10.2.tar.gz"
+  WGET_URL="ftp://ftp.gnu.org/gnu/wget/${WGET_PKG}"
+  WGET_MD5="795fefbb7099f93e2d346b026785c4b8"
+    # Subversion
+  SVN_PKG="subversion-1.3.1.tar.bz2"
+  SVN_URL="http://subversion.tigris.org/tarballs/${SVN_PKG}"
+  SVN_MD5="07b95963968ae345541ca99d0e7bf082"
+    # GPM
+  GPM_PKG="gpm-1.20.1.tar.bz2"
+  GPM_URL="ftp://arcana.linux.it/pub/gpm/${GPM_PKG}"
+  GPM_MD5="2c63e827d755527950d9d13fe3d87692"
+    # GPM segfaul patch
+  GPM_PATCH_1="gpm-1.20.1-segfault-1.patch"
+  GPM_PATCH_1_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${GPM_PATCH_1}"
+  GPM_PATCH_1_MD5="8c88f92990ba7613014fcd1db14ca7ac"
+    # GPM silent patch
+  GPM_PATCH_2="gpm-1.20.1-silent-1.patch"
+  GPM_PATCH_2_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${GPM_PATCH_2}"
+  GPM_PATCH_2_MD5="bf6cbefe20c6f15b587f19ebc1c8a37a"
+fi
+
 # Set true internal variables
 COMMON_DIR="common"
 PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z])
@@ -285,9 +343,43 @@
 sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
 export XSL=$JHALFSDIR/${XSL}
 
+# Install blfs-tool, if requested.
+if [[ "${BLFS_TOOL}" = "y" ]] ; then
+  # Install the files
+  [[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -p ${BUILDDIR}${BLFS_ROOT}
+  cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
+  cp -r menu ${BUILDDIR}${BLFS_ROOT}
+  cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
+  cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
+  # Clean-up
+  rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
+  rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
+  rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
+  # Set some harcoded envars to their proper values
+  sed -i 's,blfs-xml,'$BLFS_XML',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,libs/book.xsl}
+  sed -i 's,tracking-dir,'$TRACKING_DIR',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,gen-makefile.sh}
+  # Copy the dependencies build scripts
+  cp -r $COMMON_DIR/blfs-tool-deps $JHALFSDIR/
+fi
+
 get_book
 echo "${SD_BORDER}${nl_}"
 
+# Get the BLFS book, if requested.
+if [[ "${BLFS_TOOL}" = "y" ]] ; then
+  echo -n "Downloading the BLFS document, $BLFS_BRANCH_ID version... "
+  if [[ ! -d ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} ]] ; then
+    mkdir -p ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML}
+    svn co $SVN/BLFS/$TREE ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} >>$LOGDIR/$LOG 2>&1
+  else
+    pushd ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} 1> /dev/null
+      svn up >>$LOGDIR/$LOG 2>&1
+    popd 1> /dev/null
+  fi
+  echo -ne "done\n"
+  echo "${SD_BORDER}${nl_}"
+fi
+
 build_Makefile
 echo "${SD_BORDER}${nl_}"
 




More information about the alfs-log mailing list