Updated blfs-tool-deps targets creation.

This commit is contained in:
Manuel Canales Esparcia 2007-09-29 15:53:56 +00:00
parent 66c3162389
commit 55d2c3e459
4 changed files with 114 additions and 155 deletions

View file

@ -17,12 +17,12 @@
<exsl:document href="{$basedir}01-libxml2" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="libxml2"
PACKAGE="libxml2"
VERSION="2.6.29"
TARBALL="${PACKAGE}-${VERSION}.tar.gz"
DOWNLOAD="ftp://xmlsoft.org/libxml2/${TARBALL}"
MD5SUM="8b99b6e8b08e838438d9e6b639d79ebd"
PKG_PHASE=libxml2
PACKAGE=libxml2
VERSION=2.6.29
TARBALL=${PACKAGE}-${VERSION}.tar.gz
DOWNLOAD=ftp://xmlsoft.org/libxml2/${TARBALL}
MD5SUM=8b99b6e8b08e838438d9e6b639d79ebd
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>
@ -41,12 +41,12 @@ make install
<exsl:document href="{$basedir}02-libxslt" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="libxslt"
PACKAGE="libxslt"
VERSION="1.1.21"
TARBALL="${PACKAGE}-${VERSION}.tar.gz"
DOWNLOAD="ftp://xmlsoft.org/libxslt/${TARBALL}"
MD5SUM="59fe34e85692f71df2a38c2ee291b3ca"
PKG_PHASE=libxslt
PACKAGE=libxslt
VERSION=1.1.21
TARBALL=${PACKAGE}-${VERSION}.tar.gz
DOWNLOAD=ftp://xmlsoft.org/libxslt/${TARBALL}
MD5SUM=59fe34e85692f71df2a38c2ee291b3ca
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>
@ -65,12 +65,12 @@ make install
<exsl:document href="{$basedir}03-tidy" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="tidy"
PACKAGE="tidy"
VERSION="cvs_20070326"
TARBALL="${PACKAGE}-${VERSION}.tar.bz2"
DOWNLOAD="http://anduin.linuxfromscratch.org/files/BLFS/sources/${TARBALL}"
MD5SUM="468bfaa5cf917a8ecbe7834c13a61376"
PKG_PHASE=html-tidy
PACKAGE=tidy
VERSION=cvs_20070326
TARBALL=${PACKAGE}-${VERSION}.tar.bz2
DOWNLOAD=http://anduin.linuxfromscratch.org/files/BLFS/sources/${TARBALL}
MD5SUM=468bfaa5cf917a8ecbe7834c13a61376
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>
@ -90,12 +90,12 @@ make -C htmldoc install_apidocs
<exsl:document href="{$basedir}04-unzip" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="unzip"
PACKAGE="unzip"
VERSION="552"
TARBALL="${PACKAGE}${VERSION}.tar.gz"
DOWNLOAD="http://downloads.sourceforge.net/infozip/${TARBALL}"
MD5SUM="9d23919999d6eac9217d1f41472034a9"
PKG_PHASE=unzip
PACKAGE=unzip
VERSION=552
TARBALL=${PACKAGE}${VERSION}.tar.gz
DOWNLOAD=http://downloads.sourceforge.net/infozip/${TARBALL}
MD5SUM=9d23919999d6eac9217d1f41472034a9
PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/unzip-5.52-security_fix-1.patch 00ebf64fdda2ad54ddfc619f85f328bb"
</xsl:text>
@ -116,12 +116,12 @@ make prefix=/usr install
<exsl:document href="{$basedir}05-docbook-xml" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="docbook-xml"
PACKAGE="docboo-xml"
VERSION="4.5"
TARBALL="${PACKAGE}-${VERSION}.zip"
DOWNLOAD="http://www.docbook.org/xml/4.5/${TARBALL}"
MD5SUM="03083e288e87a7e829e437358da7ef9e"
PKG_PHASE=DocBook
PACKAGE=docbook-xml
VERSION=4.5
TARBALL=${PACKAGE}-${VERSION}.zip
DOWNLOAD=http://www.docbook.org/xml/4.5/${TARBALL}
MD5SUM=03083e288e87a7e829e437358da7ef9e
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:text>
@ -239,12 +239,12 @@ SECONDS=$SECS
<!--<exsl:document href="{$basedir}06-docbook-xsl" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="docbook-xsl"
PACKAGE="docbook-xsl"
VERSION=""
TARBALL="${PACKAGE}-${VERSION}.tar.bz2"
DOWNLOAD="http://prdownloads.sourceforge.net/docbook/${TARBALL}"
MD5SUM=""
PKG_PHASE=docbook-xsl
PACKAGE=docbook-xsl
VERSION=
TARBALL=${PACKAGE}-${VERSION}.tar.bz2
DOWNLOAD=http://prdownloads.sourceforge.net/docbook/${TARBALL}
MD5SUM=
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>
@ -260,12 +260,12 @@ cd $PKGDIR
<exsl:document href="{$basedir}07-gpm" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="gpm"
PACKAGE="gpm"
VERSION="1.20.1"
TARBALL="${PACKAGE}-${VERSION}.tar.bz2"
DOWNLOAD="ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/${TARBALL}"
MD5SUM="2c63e827d755527950d9d13fe3d87692"
PKG_PHASE=gpm
PACKAGE=gpm
VERSION=1.20.1
TARBALL=${PACKAGE}-${VERSION}.tar.bz2
DOWNLOAD=ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/${TARBALL}
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"
@ -291,12 +291,12 @@ ldconfig
<exsl:document href="{$basedir}08-lynx" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="lynx"
PACKAGE="lynx"
VERSION="2.8.6"
TARBALL="${PACKAGE}${VERSION}.tar.bz2"
DOWNLOAD="http://lynx.isc.org/release/${TARBALL}"
MD5SUM="dc80497b7dda6a28fd80404684d27548"
PKG_PHASE=lynx
PACKAGE=lynx
VERSION=2.8.6
TARBALL=${PACKAGE}${VERSION}.tar.bz2
DOWNLOAD=http://lynx.isc.org/release/${TARBALL}
MD5SUM=dc80497b7dda6a28fd80404684d27548
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>
@ -322,12 +322,12 @@ chgrp -v -R root /usr/share/doc/lynx-2.8.6/lynx_doc
<exsl:document href="{$basedir}09-sudo" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="sudo"
PACKAGE="sudo"
VERSION="1.6.8p12"
TARBALL="${PACKAGE}-${VERSION}.tar.gz"
DOWNLOAD="http://anduin.linuxfromscratch.org/sources/BLFS/svn/s/${TARBALL}"
MD5SUM="b29893c06192df6230dd5f340f3badf5"
PKG_PHASE=sudo
PACKAGE=sudo
VERSION=1.6.8p12
TARBALL=${PACKAGE}-${VERSION}.tar.gz
DOWNLOAD=http://anduin.linuxfromscratch.org/sources/BLFS/svn/s/${TARBALL}
MD5SUM=b29893c06192df6230dd5f340f3badf5
PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/sudo-1.6.8p12-envvar_fix-1.patch 454925aedfe054dff8fe0d03b209f986"
</xsl:text>
@ -351,12 +351,12 @@ make install
<exsl:document href="{$basedir}10-wget" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="wget"
PACKAGE="wget"
VERSION="1.10.2"
TARBALL="${PACKAGE}-${VERSION}.tar.gz"
DOWNLOAD="ftp://ftp.gnu.org/gnu/wget/${TARBALL}"
MD5SUM="795fefbb7099f93e2d346b026785c4b8"
PKG_PHASE=wget
PACKAGE=wget
VERSION=1.10.2
TARBALL=${PACKAGE}-${VERSION}.tar.gz
DOWNLOAD=ftp://ftp.gnu.org/gnu/wget/${TARBALL}
MD5SUM=795fefbb7099f93e2d346b026785c4b8
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>
@ -375,12 +375,12 @@ make install
<exsl:document href="{$basedir}11-subversion" method="text">
<xsl:call-template name="header"/>
<xsl:text>
PKG_PHASE="subversion"
PACKAGE="subversion"
VERSION="1.3.1"
TARBALL="${PACKAGE}-${VERSION}.tar.bz2"
DOWNLOAD="http://subversion.tigris.org/tarballs/${TARBALL}"
MD5SUM="07b95963968ae345541ca99d0e7bf082"
PKG_PHASE=subversion
PACKAGE=subversion
VERSION=1.3.1
TARBALL=${PACKAGE}-${VERSION}.tar.bz2
DOWNLOAD=http://subversion.tigris.org/tarballs/${TARBALL}
MD5SUM=07b95963968ae345541ca99d0e7bf082
</xsl:text>
<xsl:call-template name="disk_usage"/>
<xsl:call-template name="unpack"/>

View file

@ -58,58 +58,30 @@ add_blfs_deps_urls() { # No easy way to extract it.
}
#----------------------------# 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
#----------------------------------#
blfs_tool_clean_scripts() { # Remove unselected dependencies scripts
#----------------------------------#
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_TIDY}" = "y" ]] ; then
mv blfs-tool-deps/903-tidy ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_UNZIP}" = "y" ]] ; then
mv blfs-tool-deps/904-unzip ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_DBXML}" = "y" ]] ; then
mv blfs-tool-deps/905-docbook-xml ${PROGNAME}-commands/blfs-tool-deps
fi
# if [[ "${DEP_DBXSL}" = "y" ]] ; then
# mv blfs-tool-deps/906-docbook-xsl ${PROGNAME}-commands/blfs-tool-deps
# fi
if [[ "${DEP_LYNX}" = "y" ]] ; then
mv blfs-tool-deps/908-lynx ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_SUDO}" = "y" ]] ; then
mv blfs-tool-deps/909-sudo ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_WGET}" = "y" ]] ; then
mv blfs-tool-deps/910-wget ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_SVN}" = "y" ]] ; then
mv blfs-tool-deps/911-subversion ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_GPM}" = "y" ]] ; then
mv blfs-tool-deps/907-gpm ${PROGNAME}-commands/blfs-tool-deps
fi
rm -rf blfs-tool-deps
for file in ${PROGNAME}-commands/blfs-tool-deps/* ; do
# 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} ;;
*tidy ) [[ "${DEP_TIDY}" = "n" ]] && rm ${file} ;;
*unzip ) [[ "${DEP_UNZIP}" = "n" ]] && rm ${file} ;;
*docbook-xml ) [[ "${DEP_DBXML}" = "n" ]] && rm ${file} ;;
*docbook-xsl ) [[ "${DEP_DBXSL}" = "n" ]] && rm ${file} ;;
*gpm ) [[ "${DEP_GPM}" = "n" ]] && rm ${file} ;;
*lynx ) [[ "${DEP_LYNX}" = "n" ]] && rm ${file} ;;
*sudo ) [[ "${DEP_SUDO}" = "n" ]] && rm ${file} ;;
*wget ) [[ "${DEP_WGET}" = "n" ]] && rm ${file} ;;
*subversion ) [[ "${DEP_SVN}" = "n" ]] && rm ${file} ;;
esac
done
}
@ -124,16 +96,10 @@ wrt_blfs_tool_targets() { #
# Keep the script file name
this_script=`basename $file`
# Grab the name of the target
name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
# Find the package.
case $name in
lynx ) pkg_tarball=${LYNX_PKG} ;;
tidy ) pkg_tarball=${TIDY_PKG} ;;
unzip ) pkg_tarball=${UNZIP_PKG} ;;
* ) pkg_tarball=$(get_package_tarball_name $name) ;;
esac
# Grab the phase name to be used with INSTALL_LOG and tracking dir touch
name=`grep "^PKG_PHASE=" ${file} | sed -e 's@PKG_PHASE=@@'`
# Grab also the package version
pkg_ver=`grep "^VERSION=" ${file} | sed -e 's@VERSION=@@'`
# Append each name of the script files to a list (this will become
# the names of the targets in the Makefile)
@ -145,46 +111,26 @@ wrt_blfs_tool_targets() { #
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
if [ "$PROGNAME" = "clfs2" ]; then
LUSER_wrt_target "${this_script}" "$PREV"
else
CHROOT_wrt_target "${this_script}" "$PREV"
fi
wrt_target "${this_script}" "$PREV"
# Insert instructions for unpacking the package and changing directories
# DocBook-XML is a zip, the build script will handle that.
if [ "$PROGNAME" = "clfs2" ]; then
[[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
else
[[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
# Touch timestamp file if installed files logs will be created.
if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] ; then
wrt_TouchTimestamp
fi
# Run the script.
if [ "$PROGNAME" = "clfs2" ]; then
LUSER_wrt_RunAsUser "${file}"
else
CHROOT_wrt_RunAsRoot "$file"
fi
wrt_RunScript "$file"
# Remove the build directory(ies) except if the package build fails.
if [ "$PROGNAME" = "clfs2" ]; then
[[ ! "$name" = "docbook-xml" ]] && LUSER_RemoveBuildDirs "$name"
else
[[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
# Write installed files log
if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] ; then
wrt_LogNewFiles "$name"
fi
# Touch the tracking file.
case $name in
docbook-xml ) pkg_ver=DocBook-4.5 ;;
lynx ) pkg_ver=lynx-2.8.6 ;;
tidy ) pkg_ver=html-tidy-cvs_20070326 ;;
unzip ) pkg_ver=unzip-5.52 ;;
* ) pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
esac
if [ "$PROGNAME" = "clfs2" ]; then
echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/${name}-${pkg_ver}" >> $MKFILE.tmp
else
echo -e "\t@touch $TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
echo -e "\t@touch $TRACKING_DIR/${name}-${pkg_ver}" >> $MKFILE.tmp
fi
# Include a touch of the target name so make can check

View file

@ -152,6 +152,8 @@ extract_commands() { #
exit 1 ;;
esac
[[ "${BLFS_TOOL}" = "y" ]] && blfs_tool_clean_scripts
echo "done"
# Make the scripts executable.

11
jhalfs
View file

@ -165,6 +165,17 @@ BOOK=${BOOK:=$PROGNAME-$LFSVRS}
# blfs-tool envars
BLFS_TOOL=${BLFS_TOOL:-n}
DEP_LIBXML=${DEP_LIBXML:-n}
DEP_LIBXSLT=${DEP_LIBXSLT:-n}
DEP_TIDY=${DEP_TIDY:-n}
DEP_UNZIP=${DEP_UNZIP:-n}
DEP_DBXML=${DEP_DBXML:-n}
DEP_DBXSL=${DEP_DBXSL:-n}
DEP_GPM=${DEP_GPM:-n}
DEP_LYNX=${DEP_LYNX:-n}
DEP_SUDO=${DEP_SUDO:-n}
DEP_WGET=${DEP_WGET:-n}
DEP_SVN=${DEP_SVN:-n}
if [[ "${BLFS_TOOL}" = "y" ]] ; then
BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
case $BLFS_BRANCH_ID in