Changeset f0a31de


Ignore:
Timestamp:
03/02/2013 02:10:45 PM (11 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, new_features, trunk
Children:
90f304c
Parents:
06bb141
Message:

Add a sect2 template to lfs.xsl, so that it is possible to build
several packages on the same page

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r06bb141 rf0a31de  
    119119        <xsl:text>cd $PKGDIR&#xA;</xsl:text>
    120120      </xsl:if>
    121       <xsl:apply-templates
    122         select=".//screen[not(@role) or
    123                           @role != 'nodump']/userinput[
    124                                @remap = 'pre' or
    125                                @remap = 'configure' or
    126                                @remap = 'make' or
    127                                @remap = 'test' and
    128                                 not(current()/@id='ch-tools-dejagnu')]"/>
    129       <xsl:if
    130            test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
    131                  $pkgmngt = 'y' and
    132                  descendant::screen[not(@role) or
    133                                     @role != 'nodump']/userinput[
    134                                                       @remap='install']">
    135         <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
     121      <xsl:apply-templates select="sect2|
     122                                   screen[not(@role) or
     123                                          @role!='nodump']/userinput"/>
     124      <xsl:if test="@id='ch-system-creatingdirs'">
     125        <xsl:apply-templates
     126           select="document('packageManager.xml')//sect1[
     127                                       @id='ch-pkgmngt-creatingdirs'
     128                                                        ]//userinput"/>
     129      </xsl:if>
     130      <xsl:if test="@id='ch-system-createfiles'">
     131        <xsl:apply-templates
     132           select="document('packageManager.xml')//sect1[
     133                                       @id='ch-pkgmngt-createfiles'
     134                                                        ]//userinput"/>
     135      </xsl:if>
     136      <xsl:if test="not(@id='ch-system-chroot') and
     137                    not(@id='ch-system-revisedchroot')">
     138        <xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"&#xA;</xsl:text>
     139      </xsl:if>
     140      <xsl:text>exit&#xA;</xsl:text>
     141    </exsl:document>
     142    </xsl:if>
     143  </xsl:template>
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156  <xsl:template match="sect2">
     157    <xsl:apply-templates
     158      select=".//screen[not(@role) or
     159                        @role != 'nodump']/userinput[
     160                             @remap = 'pre' or
     161                             @remap = 'configure' or
     162                             @remap = 'make' or
     163                             @remap = 'test' and
     164                             not(current()/../@id='ch-tools-dejagnu')]"/>
     165    <xsl:if
     166         test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
     167               $pkgmngt = 'y' and
     168               descendant::screen[not(@role) or
     169                                  @role != 'nodump']/userinput[
     170                                                    @remap='install']">
     171      <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
    136172mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
    137173mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
     
    142178esac
    143179</xsl:text>
    144       </xsl:if>
    145       <xsl:if test="@id = 'ch-system-glibc' and
    146                             $pkgmngt = 'y'">
    147         <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
    148 </xsl:text>
    149       </xsl:if>
    150       <xsl:apply-templates
    151            select=".//screen[not(@role) or
    152                              @role != 'nodump']/userinput[@remap = 'install']"/>
    153       <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
    154                     $pkgmngt = 'y' and
    155                     descendant::screen[not(@role) or
    156                                        @role != 'nodump']/userinput[
    157                                                          @remap='install']">
    158         <xsl:if test="@id = 'ch-system-man-pages'">
     180    </xsl:if>
     181    <xsl:if test="../@id = 'ch-system-glibc' and
     182                          $pkgmngt = 'y'">
     183      <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
     184</xsl:text>
     185    </xsl:if>
     186    <xsl:apply-templates
     187         select=".//screen[not(@role) or
     188                           @role != 'nodump']/userinput[@remap = 'install']"/>
     189    <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
     190                  $pkgmngt = 'y' and
     191                  descendant::screen[not(@role) or
     192                                     @role != 'nodump']/userinput[
     193                                                       @remap='install']">
     194      <xsl:if test="../@id = 'ch-system-man-pages'">
    159195<!-- those files are provided by the shadow package -->
    160196  <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
    161197</xsl:text>
    162         </xsl:if>
    163         <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
     198      </xsl:if>
     199      <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
    164200rm -fv $PKG_DEST/usr/{man,doc,info}
    165201for dir in $PKG_DEST/usr/share/man/man{1..8}; do
     
    178214rm -rf $PKG_DEST
    179215</xsl:text>
    180       </xsl:if>
    181       <xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
    182         <xsl:copy-of select="//userinput[@remap='locale-test']"/>
    183         <xsl:text>&#xA;</xsl:text>
    184       </xsl:if>
    185       <xsl:if test="@id='ch-system-glibc'">
    186         <xsl:choose>
    187           <xsl:when test="$full-locale='y'">
    188             <xsl:copy-of select="//userinput[@remap='locale-full']"/>
    189             <xsl:text>&#xA;</xsl:text>
    190           </xsl:when>
    191           <xsl:otherwise>
    192             <xsl:copy-of select="//userinput[@remap='locale-test']"/>
    193             <xsl:text>&#xA;</xsl:text>
    194             <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
    195               <xsl:text>if LOCALE=`grep "</xsl:text>
    196               <xsl:value-of select="$lang"/>
    197               <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
     216    </xsl:if>
     217    <xsl:if test="$testsuite='3' and
     218            ../@id='ch-tools-glibc' and
     219            @role='installation'">
     220      <xsl:copy-of select="//userinput[@remap='locale-test']"/>
     221      <xsl:text>&#xA;</xsl:text>
     222    </xsl:if>
     223    <xsl:if test="../@id='ch-system-glibc' and @role='installation'">
     224      <xsl:choose>
     225        <xsl:when test="$full-locale='y'">
     226          <xsl:copy-of select="//userinput[@remap='locale-full']"/>
     227          <xsl:text>&#xA;</xsl:text>
     228        </xsl:when>
     229        <xsl:otherwise>
     230          <xsl:copy-of select="//userinput[@remap='locale-test']"/>
     231          <xsl:text>&#xA;</xsl:text>
     232          <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
     233            <xsl:text>if LOCALE=`grep "</xsl:text>
     234            <xsl:value-of select="$lang"/>
     235            <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
    198236  CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
    199237  INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
     
    202240fi
    203241</xsl:text>
    204             </xsl:if>
    205           </xsl:otherwise>
    206         </xsl:choose>
    207       </xsl:if>
    208       <xsl:apply-templates
    209          select=".//screen[
    210                    not(@role) or
    211                    @role != 'nodump'
    212                           ]/userinput[
    213                             not(@remap) or
    214                             @remap='adjust' or
    215                             @remap='test' and current()/@id='ch-tools-dejagnu'
    216                                      ]"/>
    217       <xsl:if test="@id='ch-system-creatingdirs'">
    218         <xsl:apply-templates
    219            select="document('packageManager.xml')//sect1[
    220                                        @id='ch-pkgmngt-creatingdirs'
    221                                                         ]//userinput"/>
    222       </xsl:if>
    223       <xsl:if test="@id='ch-system-createfiles'">
    224         <xsl:apply-templates
    225            select="document('packageManager.xml')//sect1[
    226                                        @id='ch-pkgmngt-createfiles'
    227                                                         ]//userinput"/>
    228       </xsl:if>
    229       <xsl:if test="not(@id='ch-system-chroot') and
    230                     not(@id='ch-system-revisedchroot')">
    231         <xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"&#xA;</xsl:text>
    232       </xsl:if>
    233       <xsl:text>exit&#xA;</xsl:text>
    234     </exsl:document>
    235     </xsl:if>
    236   </xsl:template>
    237 
    238 <xsl:template match="sect1" mode="pkgmngt">
     242          </xsl:if>
     243        </xsl:otherwise>
     244      </xsl:choose>
     245    </xsl:if>
     246    <xsl:apply-templates
     247       select=".//screen[
     248                 not(@role) or
     249                 @role != 'nodump'
     250                        ]/userinput[
     251                          not(@remap) or
     252                          @remap='adjust' or
     253                          @remap='test' and current()/../@id='ch-tools-dejagnu'
     254                                   ]"/>
     255  </xsl:template>
     256
     257  <xsl:template match="sect1" mode="pkgmngt">
    239258    <xsl:param name="dirname" select="chapter05"/>
    240259    <!-- The build order -->
  • common/libs/func_book_parser

    r06bb141 rf0a31de  
    138138        echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
    139139        pushd $BOOK > /dev/null
    140         bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
     140        if [ -f process.scripts.sh ]; then
     141          bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
     142        fi
    141143        popd > /dev/null
    142144        xsltproc --nonet \
  • common/libs/func_wrt_Makefile

    r06bb141 rf0a31de  
    9797     e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
    9898         ;;
     99     libcap) echo $(grep "^libcap" $JHALFSDIR/pkg_tarball_list | head -n1 )
     100         ;;
    99101     util-linux-libs) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
    100102         ;;
Note: See TracChangeset for help on using the changeset viewer.