r2946 - in jhalfs/trunk/BLFS: . libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon Aug 14 11:45:32 PDT 2006


Author: manuel
Date: 2006-08-14 12:45:31 -0600 (Mon, 14 Aug 2006)
New Revision: 2946

Modified:
   jhalfs/trunk/BLFS/envars.conf
   jhalfs/trunk/BLFS/libs/scripts.xsl
Log:
Making configurable the top-level sources build directory.

Modified: jhalfs/trunk/BLFS/envars.conf
===================================================================
--- jhalfs/trunk/BLFS/envars.conf	2006-08-14 18:33:05 UTC (rev 2945)
+++ jhalfs/trunk/BLFS/envars.conf	2006-08-14 18:45:31 UTC (rev 2946)
@@ -4,7 +4,7 @@
 #
 # $Id$
 #
-# Set default SRC_ARCHIVE and FTP_DIR
+# Set default envars used in the build scripts
 #
 #####
 
@@ -14,9 +14,15 @@
 #    if the user has the right priviledges.
 export SRC_ARCHIVE=$SRC_ARCHIVE
 
-# --- Server used if the file isn't found in SRC_ARCHIVE.
+#--- Server used if the file isn't found in SRC_ARCHIVE.
 # As a last resort, the file will dowloaded from upstream, if possible.
 #
 # The server path MUST be set as listed in
 # http://www.linuxfromscratch.org/blfs/download.html
 export FTP_SERVER=ftp://anduin.linuxfromscratch.org/BLFS/
+
+
+#--- The sources directory.
+#    Full path to the top level directory where packages will be stored,
+#    unpacked, and compiled.
+export SRC_DIR=$HOME/sources

Modified: jhalfs/trunk/BLFS/libs/scripts.xsl
===================================================================
--- jhalfs/trunk/BLFS/libs/scripts.xsl	2006-08-14 18:33:05 UTC (rev 2945)
+++ jhalfs/trunk/BLFS/libs/scripts.xsl	2006-08-14 18:45:31 UTC (rev 2946)
@@ -97,14 +97,14 @@
             <xsl:value-of select="$package"/>
             <xsl:text>&#xA;PKG_DIR=</xsl:text>
             <xsl:value-of select="$ftpdir"/>
-            <xsl:text>&#xA;&#xA;</xsl:text>
+            <xsl:text>SRC_DIR=$SRC_DIR&#xA;&#xA;</xsl:text>
             <!-- Download code and build commands -->
             <xsl:apply-templates select="sect2">
               <xsl:with-param name="package" select="$package"/>
               <xsl:with-param name="ftpdir" select="$ftpdir"/>
             </xsl:apply-templates>
             <!-- Clean-up -->
-            <xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
+            <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
             <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
           </xsl:when>
           <!-- Non-package page -->
@@ -125,8 +125,8 @@
     <xsl:param name="ftpdir" select="foo"/>
     <xsl:choose>
       <xsl:when test="@role = 'package'">
-        <xsl:text>mkdir -p ~/sources/$PKG_DIR&#xA;</xsl:text>
-        <xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
+        <xsl:text>mkdir -p $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
+        <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
         <xsl:apply-templates select="itemizedlist/listitem/para">
           <xsl:with-param name="package" select="$package"/>
           <xsl:with-param name="ftpdir" select="$ftpdir"/>




More information about the alfs-log mailing list