specfiles.xsl
author Alex Viskovatoff <herzen@imap.cc>
Wed, 06 Jul 2011 03:54:09 +0100
changeset 10 013ce4d15ea3
parent 6 678173477765
permissions -rw-r--r--
Make pkgtool resolve build dependency on SFEgcc The reason this patch is required is that the name of the gcc devel package (SFEgcc) is different from the name of the main package of that spec (SFEgccruntime). That naming scheme is utterly anomalous.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:strip-space elements="*"/>
  <xsl:output method="text"/>

  <xsl:param name="encumbered">false</xsl:param>

  <xsl:template match="/pkgs">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="pkg">
    <xsl:if test="(not(@skip='true'))">
       <xsl:if test="($encumbered='true' and @encumbered='true') or ($encumbered!='true' and not(@encumbered='true'))">
	 <xsl:choose>
	   <xsl:when test="@filename">
	     <xsl:value-of select="@filename"/>
	   </xsl:when>
	   <xsl:otherwise>
	     <xsl:value-of select="./name"/>
	     <xsl:text>.spec</xsl:text>
	   </xsl:otherwise>
	 </xsl:choose>
         <xsl:text>
</xsl:text>
       </xsl:if>
    </xsl:if>

  </xsl:template>
</xsl:stylesheet>