r3507 - in jhalfs/branches/experimental: XSL common/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Sep 29 10:19:31 PDT 2007


Author: manuel
Date: 2007-09-29 11:19:31 -0600 (Sat, 29 Sep 2007)
New Revision: 3507

Modified:
   jhalfs/branches/experimental/XSL/blfs-tool.xsl
   jhalfs/branches/experimental/common/libs/func_blfs_deps
   jhalfs/branches/experimental/common/libs/func_download_pkgs
Log:
Updated blfs-tool-deps download code.

Modified: jhalfs/branches/experimental/XSL/blfs-tool.xsl
===================================================================
--- jhalfs/branches/experimental/XSL/blfs-tool.xsl	2007-09-29 15:53:56 UTC (rev 3506)
+++ jhalfs/branches/experimental/XSL/blfs-tool.xsl	2007-09-29 17:19:31 UTC (rev 3507)
@@ -20,8 +20,8 @@
 PKG_PHASE=libxml2
 PACKAGE=libxml2
 VERSION=2.6.29
-TARBALL=${PACKAGE}-${VERSION}.tar.gz
-DOWNLOAD=ftp://xmlsoft.org/libxml2/${TARBALL}
+TARBALL=libxml2-2.6.29.tar.gz
+DOWNLOAD=ftp://xmlsoft.org/libxml2/libxml2-2.6.29.tar.gz
 MD5SUM=8b99b6e8b08e838438d9e6b639d79ebd
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -44,8 +44,8 @@
 PKG_PHASE=libxslt
 PACKAGE=libxslt
 VERSION=1.1.21
-TARBALL=${PACKAGE}-${VERSION}.tar.gz
-DOWNLOAD=ftp://xmlsoft.org/libxslt/${TARBALL}
+TARBALL=libxslt-1.1.21.tar.gz
+DOWNLOAD=ftp://xmlsoft.org/libxslt/libxslt-1.1.21.tar.gz
 MD5SUM=59fe34e85692f71df2a38c2ee291b3ca
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -68,8 +68,8 @@
 PKG_PHASE=html-tidy
 PACKAGE=tidy
 VERSION=cvs_20070326
-TARBALL=${PACKAGE}-${VERSION}.tar.bz2
-DOWNLOAD=http://anduin.linuxfromscratch.org/files/BLFS/sources/${TARBALL}
+TARBALL=tidy-cvs_20070326.tar.bz2
+DOWNLOAD=http://anduin.linuxfromscratch.org/files/BLFS/sources/tidy-cvs_20070326
 MD5SUM=468bfaa5cf917a8ecbe7834c13a61376
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -93,11 +93,11 @@
 PKG_PHASE=unzip
 PACKAGE=unzip
 VERSION=552
-TARBALL=${PACKAGE}${VERSION}.tar.gz
-DOWNLOAD=http://downloads.sourceforge.net/infozip/${TARBALL}
+TARBALL=unzip552.tar.gz
+DOWNLOAD=http://downloads.sourceforge.net/infozip/unzip552.tar.gz
 MD5SUM=9d23919999d6eac9217d1f41472034a9
 
-PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/unzip-5.52-security_fix-1.patch 00ebf64fdda2ad54ddfc619f85f328bb"
+PATCH="http://www.linuxfromscratch.org/patches/blfs/svn/unzip-5.52-security_fix-1.patch 00ebf64fdda2ad54ddfc619f85f328bb"
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
       <xsl:call-template name="unpack"/>
@@ -119,8 +119,8 @@
 PKG_PHASE=DocBook
 PACKAGE=docbook-xml
 VERSION=4.5
-TARBALL=${PACKAGE}-${VERSION}.zip
-DOWNLOAD=http://www.docbook.org/xml/4.5/${TARBALL}
+TARBALL=docbook-xml-4.5.zip
+DOWNLOAD=http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
 MD5SUM=03083e288e87a7e829e437358da7ef9e
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -242,8 +242,8 @@
 PKG_PHASE=docbook-xsl
 PACKAGE=docbook-xsl
 VERSION=
-TARBALL=${PACKAGE}-${VERSION}.tar.bz2
-DOWNLOAD=http://prdownloads.sourceforge.net/docbook/${TARBALL}
+TARBALL=
+DOWNLOAD=
 MD5SUM=
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -263,12 +263,12 @@
 PKG_PHASE=gpm
 PACKAGE=gpm
 VERSION=1.20.1
-TARBALL=${PACKAGE}-${VERSION}.tar.bz2
-DOWNLOAD=ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/${TARBALL}
+TARBALL=gpm-1.20.1.tar.bz2
+DOWNLOAD=ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/gpm-1.20.1.tar.bz2
 MD5SUM=2c63e827d755527950d9d13fe3d87692
 
-PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch 8c88f92990ba7613014fcd1db14ca7ac"
-PATCH2="http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-silent-1.patch bf6cbefe20c6f15b587f19ebc1c8a37a"
+PATCH="http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch 8c88f92990ba7613014fcd1db14ca7ac"
+PATCH="http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-silent-1.patch bf6cbefe20c6f15b587f19ebc1c8a37a"
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
       <xsl:call-template name="unpack"/>
@@ -294,8 +294,8 @@
 PKG_PHASE=lynx
 PACKAGE=lynx
 VERSION=2.8.6
-TARBALL=${PACKAGE}${VERSION}.tar.bz2
-DOWNLOAD=http://lynx.isc.org/release/${TARBALL}
+TARBALL=lynx2.8.6.tar.bz2
+DOWNLOAD=http://lynx.isc.org/release/lynx2.8.6.tar.bz2
 MD5SUM=dc80497b7dda6a28fd80404684d27548
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -325,11 +325,11 @@
 PKG_PHASE=sudo
 PACKAGE=sudo
 VERSION=1.6.8p12
-TARBALL=${PACKAGE}-${VERSION}.tar.gz
-DOWNLOAD=http://anduin.linuxfromscratch.org/sources/BLFS/svn/s/${TARBALL}
+TARBALL=sudo-1.6.8p12.tar.gz
+DOWNLOAD=http://anduin.linuxfromscratch.org/sources/BLFS/svn/s/sudo-1.6.8p12.tar.gz
 MD5SUM=b29893c06192df6230dd5f340f3badf5
 
-PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/sudo-1.6.8p12-envvar_fix-1.patch 454925aedfe054dff8fe0d03b209f986"
+PATCH="http://www.linuxfromscratch.org/patches/blfs/svn/sudo-1.6.8p12-envvar_fix-1.patch 454925aedfe054dff8fe0d03b209f986"
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
       <xsl:call-template name="unpack"/>
@@ -354,8 +354,8 @@
 PKG_PHASE=wget
 PACKAGE=wget
 VERSION=1.10.2
-TARBALL=${PACKAGE}-${VERSION}.tar.gz
-DOWNLOAD=ftp://ftp.gnu.org/gnu/wget/${TARBALL}
+TARBALL=wget-1.10.2.tar.gz
+DOWNLOAD=ftp://ftp.gnu.org/gnu/wget/wget-1.10.2.tar.gz
 MD5SUM=795fefbb7099f93e2d346b026785c4b8
       </xsl:text>
       <xsl:call-template name="disk_usage"/>
@@ -378,8 +378,8 @@
 PKG_PHASE=subversion
 PACKAGE=subversion
 VERSION=1.3.1
-TARBALL=${PACKAGE}-${VERSION}.tar.bz2
-DOWNLOAD=http://subversion.tigris.org/tarballs/${TARBALL}
+TARBALL=subversion-1.3.1.tar.bz2
+DOWNLOAD=http://subversion.tigris.org/tarballs/subversion-1.3.1.tar.bz2
 MD5SUM=07b95963968ae345541ca99d0e7bf082
       </xsl:text>
       <xsl:call-template name="disk_usage"/>

Modified: jhalfs/branches/experimental/common/libs/func_blfs_deps
===================================================================
--- jhalfs/branches/experimental/common/libs/func_blfs_deps	2007-09-29 15:53:56 UTC (rev 3506)
+++ jhalfs/branches/experimental/common/libs/func_blfs_deps	2007-09-29 17:19:31 UTC (rev 3507)
@@ -2,63 +2,7 @@
 
 # $Id$
 
-#----------------------------# 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_TIDY}" = "y" ]] ; then
-    echo "${TIDY_URL} ${BLFS_SERVER}tidy/${TIDY_PKG} ${TIDY_MD5}" >> urls.lst
-  fi
-
-  if [[ "${DEP_UNZIP}" = "y" ]] ; then
-    echo "${UNZIP_URL} ${BLFS_SERVER}unzip/${UNZIP_PKG} ${UNZIP_MD5}" >> urls.lst
-    echo "${UNZIP_PATCH_URL} ${BLFS_SERVER}unzip/${UNZIP_PATCH} ${UNZIP_PATCH_MD5}" >> urls.lst
-  fi
-
-  if [[ "${DEP_DBXML}" = "y" ]] ; then
-    echo "${DBXML_URL} ${BLFS_SERVER}docbook-xml/${DBXML_PKG} ${DBXML_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_LYNX}" = "y" ]] ; then
-    echo "${LYNX_URL} ${BLFS_SERVER}lynx/${LYNX_PKG} ${LYNX_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
-
-}
-
-
 #----------------------------------#
 blfs_tool_clean_scripts() {        # Remove unselected dependencies scripts
 #----------------------------------#
@@ -67,7 +11,6 @@
     # Keep the script file name
     this_script=`basename $file`
 
-    # Skip non selected dependencies.
     case "${this_script}" in
           *libxml2 ) [[ "${DEP_LIBXML}" = "n" ]]  && rm ${file} ;;
           *libxslt ) [[ "${DEP_LIBXSLT}" = "n" ]] && rm ${file} ;;
@@ -84,7 +27,43 @@
   done
 }
 
+#----------------------------#
+add_blfs_deps_urls() {       #
+#----------------------------#
+  local saveIFS=$IFS
+  local IFS file line package tarball download md5sum patchurl patchname patchmd5
 
+  local BLFS_SERVER="${SERVER}/pub/blfs/conglomeration/"
+
+  for file in ${PROGNAME}-commands/blfs-tool-deps/* ; do
+    # Keep the script file name
+    this_script=`basename $file`
+
+    # Grab the package name, tarball, download URL and MD5SUM
+    package=`grep "^PACKAGE=" ${file} | sed -e 's at PACKAGE=@@'`
+    tarball=`grep "^TARBALL=" ${file} | sed -e 's at TARBALL=@@'`
+    download=`grep "^DOWNLOAD=" ${file} | sed -e 's at DOWNLOAD=@@'`
+    md5sum=`grep "^MD5SUM=" ${file} | sed -e 's at MD5SUM=@@'`
+
+    # Write the package entry
+    echo "${download} ${BLFS_SERVER}${package}/${tarball} ${md5sum}" >> ../sources/urls.lst
+
+    # Handle the patches, if any
+    IFS=$'\x0A'
+    for line in `grep "^PATCH=" ${file}` ; do
+      IFS=$saveIFS
+      patchurl=`echo ${line} | sed -e 's at PATCH="@@' -e 's@ .*@@'`
+      patchname=${patchurl##*/}
+      patchmd5=`echo ${line} | sed -e 's at .* @@' -e 's@"@@'`
+
+      # Write the patch entry
+      echo "${patchurl} ${BLFS_SERVER}${package}/${patchname} ${patchmd5}" >> ../sources/urls.lst
+    done
+
+  done
+}
+
+
 #----------------------------------#
 wrt_blfs_tool_targets() {          #
 #----------------------------------#

Modified: jhalfs/branches/experimental/common/libs/func_download_pkgs
===================================================================
--- jhalfs/branches/experimental/common/libs/func_download_pkgs	2007-09-29 15:53:56 UTC (rev 3506)
+++ jhalfs/branches/experimental/common/libs/func_download_pkgs	2007-09-29 17:19:31 UTC (rev 3507)
@@ -181,8 +181,6 @@
       ;;
   esac
 
-  cd $BUILDDIR/sources
-
   if [[ "${BLFS_TOOL}" = "y" ]]; then
     add_blfs_deps_urls
   fi
@@ -191,5 +189,7 @@
     add_CustomToolsURLS
   fi
 
+  cd $BUILDDIR/sources
+
 }
 




More information about the alfs-log mailing list