Changeset 1061e6bc


Ignore:
Timestamp:
12/12/2012 09:05:08 PM (12 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs
Children:
12fb268
Parents:
c39db54
Message:

Adjust to modifications in X Window chapter

Location:
BLFS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen-special.sh

    rc39db54 r1061e6bc  
    1414             sed 's@^[^"]*"\([^"]*\)".*@\1@')
    1515# Version for X Window packages without a version in the book
    16 XVERSION=$(grep 'ENTITY xorg7-release' $BLFS_XML |
     16XVERSION=$(grep 'ENTITY xorg-version' $BLFS_XML |
    1717           sed 's@^[^"]*"\([^"]*\)".*@\1@')
    1818# The case of udev
  • BLFS/xsl/dependencies.xsl

    rc39db54 r1061e6bc  
    4343    <xsl:variable name="depname">
    4444      <xsl:choose>
    45         <xsl:when test="@name='x-window-system'">xterm2</xsl:when>
    46         <xsl:when test="@name='xorg7'">xterm2</xsl:when>
     45        <xsl:when test="@name='x-window-system'">xinit</xsl:when>
     46        <xsl:when test="@name='xorg7'">xinit</xsl:when>
    4747        <xsl:when test="@name='server-mail'">
    4848          <xsl:value-of select="$MTA"/>
  • BLFS/xsl/scripts.xsl

    rc39db54 r1061e6bc  
    1 <?xml version="1.0"?>
     1<?xml version="1.0"?>
    22
    33<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    8989            <xsl:if test="@id='xorg7-server'">
    9090              <xsl:text>cd $SRC_DIR/MesaLib
    91 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
     91UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'`
    9292rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
    9393            </xsl:if> -->
     
    126126if [ "${PACKAGE%.zip}" = "${PACKAGE}" ]; then
    127127 if [[ -e unpacked ]] ; then
    128   UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
     128  UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'`
    129129  [[ -n $UNPACKDIR ]] &amp;&amp; [[ -d $UNPACKDIR ]] &amp;&amp; rm -rf $UNPACKDIR
    130130 fi
    131131 tar -xvf $PACKAGE > unpacked
    132  UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
     132 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'`
    133133else
    134134 UNPACKDIR=${PACKAGE%.zip}
     
    151151  <xsl:template match="sect2" mode="xorg7">
    152152    <xsl:choose>
    153       <xsl:when test="@role = 'package'">
     153 <!--     <xsl:when test="@role = 'package'">
    154154        <xsl:apply-templates select="itemizedlist/listitem/para" mode="xorg7"/>
    155       </xsl:when>
     155      </xsl:when>-->
    156156      <xsl:when test="not(@role)">
    157 <!-- Useless        <xsl:text>SRC_ARCHIVE=$SRC_ARCHIVE
    158 FTP_SERVER=$FTP_SERVER&#xA;</xsl:text> -->
    159         <xsl:apply-templates select=".//screen" mode="sect-ver"/>
    160         <xsl:text>mkdir -p ${section}&#xA;cd ${section}&#xA;</xsl:text>
    161         <xsl:apply-templates select="../sect2[@role='package']/itemizedlist/listitem/para" mode="xorg7-patch"/>
    162         <xsl:text>for line in $(grep -v '^#' ../${sect_ver}.wget) ; do
    163   if [[ ! -f ${line} ]] ; then
    164     if [[ -f $SRC_ARCHIVE/Xorg/${section}/${line} ]] ; then
    165       cp $SRC_ARCHIVE/Xorg/${section}/${line} ${line}
    166     elif [[ -f $SRC_ARCHIVE/Xorg/${line} ]] ; then
    167       cp $SRC_ARCHIVE/Xorg/${line} ${line}
    168     elif [[ -f $SRC_ARCHIVE/${section}/${line} ]] ; then
    169       cp $SRC_ARCHIVE/${section}/${line} ${line}
    170     elif [[ -f $SRC_ARCHIVE/${line} ]] ; then
    171       cp $SRC_ARCHIVE/${line} ${line}
    172     else
    173       wget -T 30 -t 5 ${FTP_X_SERVER}pub/individual/${section}/${line} || \
    174       wget -T 30 -t 5 http://xorg.freedesktop.org/releases/individual/${section}/${line}
    175     fi
    176   fi
    177 done
    178 md5sum -c ../${sect_ver}.md5
    179 cp ../${sect_ver}.wget ../${sect_ver}.wget.orig
    180 cp ../${sect_ver}.md5 ../${sect_ver}.md5.orig&#xA;</xsl:text>
     157<!-- This is the packages download instructions> -->
     158        <xsl:apply-templates select=".//screen" mode="xorg7"/>
    181159      </xsl:when>
    182160      <xsl:when test="@role = 'installation'">
    183         <xsl:text>for package in $(grep -v '^#' ../${sect_ver}.wget) ; do
    184   packagedir=$(echo $package | sed 's/.tar.bz2//')
    185   tar -xf ${package}
    186   cd ${packagedir}&#xA;</xsl:text>
    187         <xsl:apply-templates select=".//screen | .//para/command"/>
    188         <xsl:text>  cd ..
    189   rm -rf ${packagedir}
    190   sed -i "/${package}/d" ../${sect_ver}.wget
    191   sed -i "/${package}/d" ../${sect_ver}.md5
    192 done
    193 mv ../${sect_ver}.wget.orig ../${sect_ver}.wget
    194 mv ../${sect_ver}.md5.orig ../${sect_ver}.md5&#xA;</xsl:text>
     161        <xsl:apply-templates select=".//screen" mode="xorg7"/>
    195162        <xsl:if test="$sudo = 'y'">
    196163          <xsl:text>sudo /sbin/</xsl:text>
     
    199166      </xsl:when>
    200167      <xsl:when test="@role = 'configuration'">
     168        <xsl:text>if [[ $XORG_PREFIX != /usr ]] ; then&#xA;</xsl:text>
    201169        <xsl:apply-templates select=".//screen"/>
    202         <xsl:text>&#xA;</xsl:text>
     170        <xsl:text>fi&#xA;</xsl:text>
    203171      </xsl:when>
    204172    </xsl:choose>
     
    273241             mode="package"/>
    274242      </xsl:when>
    275       <xsl:when test="string()='Additional Downloads'">
     243      <xsl:when test="contains(string(),'Additional')">
    276244        <xsl:apply-templates
    277245             select="following-sibling::itemizedlist[1]/listitem/para"
     
    452420  </xsl:template>
    453421
     422  <xsl:template match="screen" mode="xorg7">
     423    <xsl:if test="child::* = userinput and not(@role = 'nodump')">
     424      <xsl:apply-templates select="userinput" mode="xorg7"/>
     425      <xsl:text>&#xA;</xsl:text>
     426    </xsl:if>
     427  </xsl:template>
     428
    454429  <xsl:template match="screen" mode="config">
    455430    <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
     
    505480  </xsl:template>
    506481
     482  <xsl:template match="userinput" mode="xorg7">
     483    <xsl:apply-templates mode="xorg7"/>
     484  </xsl:template>
     485
     486  <xsl:template match="text()" mode="xorg7">
     487    <xsl:call-template name="output-text">
     488      <xsl:with-param name="out-string" select="string()"/>
     489    </xsl:call-template>
     490  </xsl:template>
     491
     492  <xsl:template name="output-text">
     493    <xsl:param name="out-string" select="''"/>
     494    <xsl:choose>
     495      <xsl:when test="contains($out-string,'bash -e')">
     496        <xsl:call-template name="output-text">
     497          <xsl:with-param name="out-string"
     498                          select="substring-before($out-string,'bash -e')"/>
     499        </xsl:call-template>
     500        <xsl:text># bash -e</xsl:text>
     501        <xsl:call-template name="output-text">
     502          <xsl:with-param name="out-string"
     503                          select="substring-after($out-string,'bash -e')"/>
     504        </xsl:call-template>
     505      </xsl:when>
     506      <xsl:when test="contains($out-string,'exit')">
     507        <xsl:call-template name="output-text">
     508          <xsl:with-param name="out-string"
     509                          select="substring-before($out-string,'exit')"/>
     510        </xsl:call-template>
     511        <xsl:text># exit</xsl:text>
     512        <xsl:call-template name="output-text">
     513          <xsl:with-param name="out-string"
     514                          select="substring-after($out-string,'exit')"/>
     515        </xsl:call-template>
     516      </xsl:when>
     517      <xsl:when test="contains($out-string,'mkdir')">
     518        <xsl:call-template name="output-text">
     519          <xsl:with-param name="out-string"
     520                          select="substring-before($out-string,'mkdir')"/>
     521        </xsl:call-template>
     522        <xsl:text>mkdir -p</xsl:text>
     523        <xsl:call-template name="output-text">
     524          <xsl:with-param name="out-string"
     525                          select="substring-after($out-string,'mkdir')"/>
     526        </xsl:call-template>
     527      </xsl:when>
     528       <xsl:when test="contains($out-string,'rm -r ')">
     529        <xsl:call-template name="output-text">
     530          <xsl:with-param name="out-string"
     531                          select="substring-before($out-string,'rm -r ')"/>
     532        </xsl:call-template>
     533        <xsl:text>rm -rf </xsl:text>
     534        <xsl:call-template name="output-text">
     535          <xsl:with-param name="out-string"
     536                          select="substring-after($out-string,'rm -r ')"/>
     537        </xsl:call-template>
     538      </xsl:when>
     539     <xsl:otherwise>
     540        <xsl:value-of select="$out-string"/>
     541      </xsl:otherwise>
     542    </xsl:choose>
     543  </xsl:template>
     544
    507545  <xsl:template match="text()" mode="root">
    508546    <xsl:call-template name="output-root">
Note: See TracChangeset for help on using the changeset viewer.