r2133 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Oct 28 11:48:54 PDT 2005


Author: manuel
Date: 2005-10-28 12:48:53 -0600 (Fri, 28 Oct 2005)
New Revision: 2133

Modified:
   jhalfs/trunk/dump-lfs-scripts.xsl
   jhalfs/trunk/functions
   jhalfs/trunk/jhalfs
Log:
Now packages in tar.gz format are supported also.

Modified: jhalfs/trunk/dump-lfs-scripts.xsl
===================================================================
--- jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-26 18:42:48 UTC (rev 2132)
+++ jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-28 18:48:53 UTC (rev 2133)
@@ -99,7 +99,7 @@
       <!-- Estandarized package formats -->
       <xsl:when test="contains(string(),'tar.gz')">
         <xsl:value-of select="substring-before(string(),'tar.gz')"/>
-        <xsl:text>tar.bz2</xsl:text>
+        <xsl:text>tar.*</xsl:text>
         <xsl:value-of select="substring-after(string(),'tar.gz')"/>
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>

Modified: jhalfs/trunk/functions
===================================================================
--- jhalfs/trunk/functions	2005-10-26 18:42:48 UTC (rev 2132)
+++ jhalfs/trunk/functions	2005-10-28 18:48:53 UTC (rev 2133)
@@ -13,9 +13,17 @@
 endef
 
 define unpack
-        @cd $(LFS)$(SRC) ; tar -xvjf $(1) > /tmp/unpacked
+  @if [ -f $(LFS)$(SRC)/$(1).bz2 ] ; then \
+    cd $(LFS)$(SRC) ; tar -xvjf $(1).bz2 > /tmp/unpacked ; \
+  else \
+    cd $(LFS)$(SRC) ; tar -xvzf $(1).gz > /tmp/unpacked ; \
+  fi ;
 endef
 
+define unpack2
+  @cd $(LFS)$(SRC) ; /tools/bin/tar -xvf $(1) > /tmp/unpacked
+endef
+
 define echo_finished
   @echo $(BRW)
   @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-10-26 18:42:48 UTC (rev 2132)
+++ jhalfs/trunk/jhalfs	2005-10-28 18:48:53 UTC (rev 2133)
@@ -359,9 +359,9 @@
     # If $vrs isn't empty, we've got a package...
     if [ "$vrs" != "" ] ; then
       if [ "$name" = "tcl" ] ; then
-        FILE="$name$vrs-src.tar.bz2"
+        FILE="$name$vrs-src.tar"
       else
-        FILE="$name-$vrs.tar.bz2"
+        FILE="$name-$vrs.tar"
       fi
 
       # Insert instructions for unpacking the package and to set
@@ -511,10 +511,10 @@
     # If $vrs isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
     if [ "$vrs" != "" ] ; then
-      FILE="$name-$vrs.tar.bz2"
+      FILE="$name-$vrs.tar.*"
 (
     cat  << EOF
-	@\$(call unpack,$FILE)
+	@\$(call unpack2,$FILE)
 	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "PKGDIR=\$(SRC)/\$\$ROOT" > envars && \\
 	echo "export PKGDIR" >> envars
@@ -647,14 +647,14 @@
     if [[ `_IS_ $i bootscripts` ]] || [[ `_IS_ $i kernel` ]] ; then
       if [[ `_IS_ $i bootscripts` ]] ; then
         vrs=`grep "^lfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
-        FILE="lfs-bootscripts-$vrs.tar.bz2"
+        FILE="lfs-bootscripts-$vrs.tar.*"
       elif [[ `_IS_ $i kernel` ]] ; then
         vrs=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
-        FILE="linux-$vrs.tar.bz2"
+        FILE="linux-$vrs.tar.*"
       fi
 (
     cat  << EOF
-	@\$(call unpack,$FILE)
+	@\$(call unpack2,$FILE)
 	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "PKGDIR=\$(SRC)/\$\$ROOT" > envars && \\
 	echo "export PKGDIR" >> envars




More information about the alfs-log mailing list