specfiles.xsl
author Alex Viskovatoff <herzen@imap.cc>
Tue, 19 Jul 2011 21:17:52 +0100
changeset 14 f3ad34ebf90f
parent 6 678173477765
permissions -rw-r--r--
We do not need to build xml-parser, since the system provides it
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     3
  <xsl:strip-space elements="*"/>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     4
  <xsl:output method="text"/>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     5
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     6
  <xsl:param name="encumbered">false</xsl:param>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     7
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     8
  <xsl:template match="/pkgs">
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
     9
    <xsl:apply-templates/>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    10
  </xsl:template>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    11
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    12
  <xsl:template match="pkg">
3
38fa0b983302 Make specfiles.xsl skip package when @skip='true'
Alex Viskovatoff <herzen@imap.cc>
parents: 0
diff changeset
    13
    <xsl:if test="(not(@skip='true'))">
38fa0b983302 Make specfiles.xsl skip package when @skip='true'
Alex Viskovatoff <herzen@imap.cc>
parents: 0
diff changeset
    14
       <xsl:if test="($encumbered='true' and @encumbered='true') or ($encumbered!='true' and not(@encumbered='true'))">
6
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    15
	 <xsl:choose>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    16
	   <xsl:when test="@filename">
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    17
	     <xsl:value-of select="@filename"/>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    18
	   </xsl:when>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    19
	   <xsl:otherwise>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    20
	     <xsl:value-of select="./name"/>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    21
	     <xsl:text>.spec</xsl:text>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    22
	   </xsl:otherwise>
678173477765 Make pkgbuild set dependencies properly; add buildrepo and uninstall-packages
Alex Viskovatoff <herzen@imap.cc>
parents: 3
diff changeset
    23
	 </xsl:choose>
3
38fa0b983302 Make specfiles.xsl skip package when @skip='true'
Alex Viskovatoff <herzen@imap.cc>
parents: 0
diff changeset
    24
         <xsl:text>
0
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    25
</xsl:text>
3
38fa0b983302 Make specfiles.xsl skip package when @skip='true'
Alex Viskovatoff <herzen@imap.cc>
parents: 0
diff changeset
    26
       </xsl:if>
0
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    27
    </xsl:if>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    28
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    29
  </xsl:template>
9673581c82b4 Initial commit, using current SFE version of pkgbuild spec
Alex Viskovatoff <herzen@imap.cc>
parents:
diff changeset
    30
</xsl:stylesheet>