Changeset c0f8256 for LFS/lfs.xsl


Ignore:
Timestamp:
09/22/2007 03:23:18 PM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
097df00
Parents:
4ddaa8e
Message:

Added hocks for custom-tools and blfs-tool scripts generation support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r4ddaa8e rc0f8256  
    1818       3 = all chapter05 and chapter06 testsuites
    1919  -->
    20   <xsl:param name="testsuite" select="1"/>
     20  <xsl:param name="testsuite">1</xsl:param>
    2121
    2222  <!-- Bomb on test suites failures?
     
    2424       y = yes, bomb at the first test suite failure to can review the build dir
    2525  -->
    26   <xsl:param name="bomb-testsuite" select="n"/>
     26  <xsl:param name="bomb-testsuite">n</xsl:param>
    2727
    2828  <!-- Install vim-lang package? -->
    29   <xsl:param name="vim-lang" select="y"/>
     29  <xsl:param name="vim-lang">y</xsl:param>
    3030
    3131  <!-- Time zone -->
    32   <xsl:param name="timezone" select="GMT"/>
     32  <xsl:param name="timezone">GMT</xsl:param>
    3333
    3434  <!-- Page size -->
    35   <xsl:param name="page" select="letter"/>
     35  <xsl:param name="page">letter</xsl:param>
    3636
    3737  <!-- Locale setting -->
    38   <xsl:param name="lang" select="C"/>
     38  <xsl:param name="lang">C</xsl:param>
     39
     40  <!-- Custom tools support -->
     41  <xsl:param name="custom-tools">n</xsl:param>
     42
     43  <!-- blfs-tool support -->
     44  <xsl:param name="blfs-tool">n</xsl:param>
    3945
    4046
     
    5864  <xsl:template name="user_footer">
    5965    <xsl:text>&#xA;</xsl:text>
     66  </xsl:template>
     67
     68
     69    <!-- Hock for creating a custom tools directory containing scripts
     70         to be run after the system has been built -->
     71  <xsl:template name="custom-tools">
     72      <!-- Fixed value -->
     73    <xsl:variable name="basedir">custom-tools/20_</xsl:variable>
     74      <!-- Add an exsl:document block for each script to be created,
     75           This one is only a dummy example. You must replace "01" by
     76           the proper build order and "dummy" by the script name -->
     77    <exsl:document href="{$basedir}01-dummy" method="text">
     78      <xsl:call-template name="header"/>
     79      <xsl:text>
     80PKG_PHASE=dummy
     81PACKAGE=dummy
     82VERSION=0.0.0
     83TARBALL=dummy-0.0.0.tar.bz2
     84
     85cd $PKGDIR
     86./configure --prefix=/usr
     87make
     88make check
     89make install
     90      </xsl:text>
     91      <xsl:call-template name="footer"/>
     92    </exsl:document>
    6093  </xsl:template>
    6194
     
    185218
    186219
     220    <!-- Adds blfs-tool support scripts -->
     221  <xsl:template name="blfs-tool">
     222      <!-- Fixed values -->
     223    <xsl:variable name="basedir">blfs-tool-deps/30_</xsl:variable>
     224      <!-- One exsl:document block for each blfs-tool dependency
     225           TO BE WRITTEN -->
     226    <exsl:document href="{$basedir}01-dummy" method="text">
     227      <xsl:call-template name="header"/>
     228      <xsl:text>
     229PKG_PHASE=dummy
     230PACKAGE=dummy
     231VERSION=0.0.0
     232TARBALL=dummy-0.0.0.tar.bz2
     233
     234cd $PKGDIR
     235./configure --prefix=/usr
     236make
     237make check
     238make install
     239      </xsl:text>
     240      <xsl:call-template name="footer"/>
     241    </exsl:document>
     242  </xsl:template>
     243
     244
    187245<!-- ######################################################################## -->
    188246
     
    193251      <!-- Start processing at chapter level -->
    194252    <xsl:apply-templates select="//chapter"/>
     253      <!-- Process custom tools scripts -->
     254    <xsl:if test="$custom-tools = 'y'">
     255      <xsl:call-template name="custom-tools"/>
     256    </xsl:if>
     257      <!-- Process blfs-tool scripts -->
     258    <xsl:if test="$blfs-tool = 'y'">
     259      <xsl:call-template name="blfs-tool"/>
     260    </xsl:if>
    195261  </xsl:template>
    196262
Note: See TracChangeset for help on using the changeset viewer.