Now packages in tar.gz format are supported also.
This commit is contained in:
parent
bf1c3baa9f
commit
be9970bfaf
3 changed files with 17 additions and 9 deletions
|
@ -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>
</xsl:text>
|
||||
</xsl:when>
|
||||
|
|
10
functions
10
functions
|
@ -13,7 +13,15 @@ define echo_message
|
|||
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
|
||||
|
|
14
jhalfs
14
jhalfs
|
@ -359,9 +359,9 @@ EOF
|
|||
# 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 @@ EOF
|
|||
# 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 @@ EOF
|
|||
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
|
||||
|
|
Reference in a new issue