Add a sect2 template to lfs.xsl, so that it is possible to build
several packages on the same page
This commit is contained in:
parent
06bb141298
commit
f0a31dea50
3 changed files with 121 additions and 98 deletions
213
LFS/lfs.xsl
213
LFS/lfs.xsl
|
@ -118,102 +118,9 @@
|
||||||
<xsl:if test="sect2[@role='installation']">
|
<xsl:if test="sect2[@role='installation']">
|
||||||
<xsl:text>cd $PKGDIR
</xsl:text>
|
<xsl:text>cd $PKGDIR
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates select="sect2|
|
||||||
select=".//screen[not(@role) or
|
screen[not(@role) or
|
||||||
@role != 'nodump']/userinput[
|
@role!='nodump']/userinput"/>
|
||||||
@remap = 'pre' or
|
|
||||||
@remap = 'configure' or
|
|
||||||
@remap = 'make' or
|
|
||||||
@remap = 'test' and
|
|
||||||
not(current()/@id='ch-tools-dejagnu')]"/>
|
|
||||||
<xsl:if
|
|
||||||
test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
|
||||||
$pkgmngt = 'y' and
|
|
||||||
descendant::screen[not(@role) or
|
|
||||||
@role != 'nodump']/userinput[
|
|
||||||
@remap='install']">
|
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
|
|
||||||
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
|
|
||||||
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
|
|
||||||
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
|
|
||||||
ln -sv share/{man,doc,info} $PKG_DEST/usr
|
|
||||||
case $(uname -m) in
|
|
||||||
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
|
|
||||||
esac
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@id = 'ch-system-glibc' and
|
|
||||||
$pkgmngt = 'y'">
|
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates
|
|
||||||
select=".//screen[not(@role) or
|
|
||||||
@role != 'nodump']/userinput[@remap = 'install']"/>
|
|
||||||
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
|
||||||
$pkgmngt = 'y' and
|
|
||||||
descendant::screen[not(@role) or
|
|
||||||
@role != 'nodump']/userinput[
|
|
||||||
@remap='install']">
|
|
||||||
<xsl:if test="@id = 'ch-system-man-pages'">
|
|
||||||
<!-- those files are provided by the shadow package -->
|
|
||||||
<xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
|
|
||||||
rm -fv $PKG_DEST/usr/{man,doc,info}
|
|
||||||
for dir in $PKG_DEST/usr/share/man/man{1..8}; do
|
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
|
||||||
done
|
|
||||||
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
|
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
|
||||||
done
|
|
||||||
for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
|
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
|
||||||
done
|
|
||||||
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
|
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
|
||||||
done
|
|
||||||
packInstall
|
|
||||||
rm -rf $PKG_DEST
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
|
|
||||||
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@id='ch-system-glibc'">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$full-locale='y'">
|
|
||||||
<xsl:copy-of select="//userinput[@remap='locale-full']"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
<xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
|
|
||||||
<xsl:text>if LOCALE=`grep "</xsl:text>
|
|
||||||
<xsl:value-of select="$lang"/>
|
|
||||||
<xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
|
|
||||||
CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
|
|
||||||
INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
|
|
||||||
LOCALE=`echo $LOCALE | sed 's,/.*,,'`
|
|
||||||
localedef -i $INPUT -f $CHARMAP $LOCALE
|
|
||||||
fi
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates
|
|
||||||
select=".//screen[
|
|
||||||
not(@role) or
|
|
||||||
@role != 'nodump'
|
|
||||||
]/userinput[
|
|
||||||
not(@remap) or
|
|
||||||
@remap='adjust' or
|
|
||||||
@remap='test' and current()/@id='ch-tools-dejagnu'
|
|
||||||
]"/>
|
|
||||||
<xsl:if test="@id='ch-system-creatingdirs'">
|
<xsl:if test="@id='ch-system-creatingdirs'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//sect1[
|
select="document('packageManager.xml')//sect1[
|
||||||
|
@ -235,7 +142,119 @@ fi
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="sect1" mode="pkgmngt">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:template match="sect2">
|
||||||
|
<xsl:apply-templates
|
||||||
|
select=".//screen[not(@role) or
|
||||||
|
@role != 'nodump']/userinput[
|
||||||
|
@remap = 'pre' or
|
||||||
|
@remap = 'configure' or
|
||||||
|
@remap = 'make' or
|
||||||
|
@remap = 'test' and
|
||||||
|
not(current()/../@id='ch-tools-dejagnu')]"/>
|
||||||
|
<xsl:if
|
||||||
|
test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
||||||
|
$pkgmngt = 'y' and
|
||||||
|
descendant::screen[not(@role) or
|
||||||
|
@role != 'nodump']/userinput[
|
||||||
|
@remap='install']">
|
||||||
|
<xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
|
||||||
|
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
|
||||||
|
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
|
||||||
|
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
|
||||||
|
ln -sv share/{man,doc,info} $PKG_DEST/usr
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
|
||||||
|
esac
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="../@id = 'ch-system-glibc' and
|
||||||
|
$pkgmngt = 'y'">
|
||||||
|
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates
|
||||||
|
select=".//screen[not(@role) or
|
||||||
|
@role != 'nodump']/userinput[@remap = 'install']"/>
|
||||||
|
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
||||||
|
$pkgmngt = 'y' and
|
||||||
|
descendant::screen[not(@role) or
|
||||||
|
@role != 'nodump']/userinput[
|
||||||
|
@remap='install']">
|
||||||
|
<xsl:if test="../@id = 'ch-system-man-pages'">
|
||||||
|
<!-- those files are provided by the shadow package -->
|
||||||
|
<xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
|
||||||
|
rm -fv $PKG_DEST/usr/{man,doc,info}
|
||||||
|
for dir in $PKG_DEST/usr/share/man/man{1..8}; do
|
||||||
|
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
||||||
|
done
|
||||||
|
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
|
||||||
|
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
||||||
|
done
|
||||||
|
for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
|
||||||
|
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
||||||
|
done
|
||||||
|
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
|
||||||
|
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
||||||
|
done
|
||||||
|
packInstall
|
||||||
|
rm -rf $PKG_DEST
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$testsuite='3' and
|
||||||
|
../@id='ch-tools-glibc' and
|
||||||
|
@role='installation'">
|
||||||
|
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="../@id='ch-system-glibc' and @role='installation'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$full-locale='y'">
|
||||||
|
<xsl:copy-of select="//userinput[@remap='locale-full']"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
<xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
|
||||||
|
<xsl:text>if LOCALE=`grep "</xsl:text>
|
||||||
|
<xsl:value-of select="$lang"/>
|
||||||
|
<xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
|
||||||
|
CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
|
||||||
|
INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
|
||||||
|
LOCALE=`echo $LOCALE | sed 's,/.*,,'`
|
||||||
|
localedef -i $INPUT -f $CHARMAP $LOCALE
|
||||||
|
fi
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:apply-templates
|
||||||
|
select=".//screen[
|
||||||
|
not(@role) or
|
||||||
|
@role != 'nodump'
|
||||||
|
]/userinput[
|
||||||
|
not(@remap) or
|
||||||
|
@remap='adjust' or
|
||||||
|
@remap='test' and current()/../@id='ch-tools-dejagnu'
|
||||||
|
]"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="sect1" mode="pkgmngt">
|
||||||
<xsl:param name="dirname" select="chapter05"/>
|
<xsl:param name="dirname" select="chapter05"/>
|
||||||
<!-- The build order -->
|
<!-- The build order -->
|
||||||
<xsl:param name="order" select="062"/>
|
<xsl:param name="order" select="062"/>
|
||||||
|
|
|
@ -137,7 +137,9 @@ extract_commands() { #
|
||||||
lfs)
|
lfs)
|
||||||
echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
|
echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
|
||||||
pushd $BOOK > /dev/null
|
pushd $BOOK > /dev/null
|
||||||
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
|
if [ -f process.scripts.sh ]; then
|
||||||
|
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
|
||||||
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
--xinclude \
|
--xinclude \
|
||||||
|
|
|
@ -96,6 +96,8 @@ get_package_tarball_name() { #
|
||||||
;;
|
;;
|
||||||
e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
|
libcap) echo $(grep "^libcap" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
;;
|
||||||
util-linux-libs) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
util-linux-libs) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
|
Reference in a new issue