Changeset f6420b0


Ignore:
Timestamp:
11/01/2023 10:34:23 PM (6 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
0f7a988
Parents:
280cff6a
Message:

Add a script for plasma post-install instructions

This is needed the first time plasma is installed. There are
some links from /usr/share to $KF5_PREFIX, and also the
pam.d files.

Location:
BLFS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen-special.sh

    r280cff6a rf6420b0  
    195195    precpack=$packname
    196196  done
     197# We need a dummy package for plasma post install instructions
     198  if [ $(basename $file .xml) = plasma-all ]; then
     199    cat >>$SPECIAL_FILE << EOF
     200        <module><xsl:text>&#xA;          </xsl:text>
     201          <xsl:element name="name">plasma-post-install</xsl:element>
     202          <xsl:element name="version">1.0.0</xsl:element>
     203          <xsl:if test="document(\$installed-packages)//package[name='$packname']">
     204            <xsl:element name="inst-version">
     205              <xsl:value-of
     206                select="document(\$installed-packages
     207                                )//package[name='$packname']/version"/>
     208            </xsl:element>
     209          </xsl:if>
     210<!-- Dependencies -->
     211          <xsl:element name="dependency">
     212            <xsl:attribute name="status">required</xsl:attribute>
     213            <xsl:attribute name="build">before</xsl:attribute>
     214            <xsl:attribute name="name">$precpack</xsl:attribute>
     215            <xsl:attribute name="type">ref</xsl:attribute>
     216          </xsl:element>
     217<!-- End dependencies -->
     218        </module>
     219EOF
     220  fi
     221
    197222  cat >>$SPECIAL_FILE << EOF
    198223     </package>
  • BLFS/xsl/make_book.xsl

    r280cff6a rf6420b0  
    6565     The difficulty is that some of those names *are* id's,
    6666     because they are referenced in the index.
    67      Hopefully, none of those id's are sect{1,2}...-->
     67     Hopefully, none of those id's are sect{1,2}...
     68     We also need a special template for plasma-post-install,
     69     because this one is not an id at all!-->
    6870  <xsl:template name="apply-list">
    6971    <xsl:param name="list" select="''"/>
     
    115117              </xsl:if>
    116118            </xsl:when>
     119            <xsl:when test="$list='plasma-post-install'">
     120              <xsl:apply-templates
     121                select="//sect1[@id='plasma5-build']"
     122                mode="plasma-post-install"/>
     123            </xsl:when>
    117124            <xsl:when test="not(id($list)[self::sect1 or self::sect2])">
    118125              <!-- This is a sub-package: parse the corresponding compound
     
    124131                                 and .//userinput/literal[contains(string(),
    125132                                            concat($list,'-'))]]"
    126                    mode="compound">
     133                 mode="compound">
    127134                <xsl:with-param name="package" select="$list"/>
    128135              </xsl:apply-templates>
     
    753760    </xsl:choose>
    754761  </xsl:template>
     762
     763  <xsl:template match="sect1" mode="plasma-post-install">
     764    <xsl:variable name="package" select="'plasma-post-install'"/>
     765    <xsl:element name="sect1">
     766      <xsl:attribute name="id">
     767        <xsl:value-of select="$package"/>
     768      </xsl:attribute>
     769      <xsl:processing-instruction name="dbhtml">
     770         filename="<xsl:value-of select='$package'/>.html"
     771      </xsl:processing-instruction>
     772      <title><xsl:value-of select="$package"/></title>
     773      <sect2 role="installation">
     774        <title>Installation of <xsl:value-of select="$package"/></title>
     775
     776        <para>
     777          Install <application><xsl:value-of select="$package"/></application>
     778          by running the following commands:
     779        </para>
     780        <screen role="root">
     781          <userinput>
     782            <xsl:call-template name="plasma-sessions">
     783              <xsl:with-param
     784                name="p-sessions-text"
     785                select="string(.//userinput[contains(text(),'xsessions')])"/>
     786            </xsl:call-template>
     787          </userinput>
     788        </screen>
     789        <xsl:copy-of select=".//screen[@role='root']"/>
     790      </sect2>
     791    </xsl:element><!-- sect1 -->
     792  </xsl:template>
     793
     794  <xsl:template name="plasma-sessions">
     795    <xsl:param name="p-sessions-text"/>
     796    <xsl:choose>
     797      <xsl:when test="string-length($p-sessions-text)=0"/>
     798      <xsl:when test="contains($p-sessions-text,'as_root')">
     799        <xsl:call-template name="plasma-sessions">
     800          <xsl:with-param
     801            name="p-sessions-text"
     802            select="substring-before($p-sessions-text,'as_root')"/>
     803        </xsl:call-template>
     804        <xsl:call-template name="plasma-sessions">
     805          <xsl:with-param
     806            name="p-sessions-text"
     807            select="substring-after($p-sessions-text,'as_root ')"/>
     808        </xsl:call-template>
     809      </xsl:when>
     810      <xsl:otherwise>
     811        <xsl:copy-of select="$p-sessions-text"/>
     812      </xsl:otherwise>
     813    </xsl:choose>
     814  </xsl:template>
     815
    755816</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.