summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packaging/spec.xsl3
-rw-r--r--packaging/templates.xsl5
2 files changed, 7 insertions, 1 deletions
diff --git a/packaging/spec.xsl b/packaging/spec.xsl
index 68aa722..20874be 100644
--- a/packaging/spec.xsl
+++ b/packaging/spec.xsl
@@ -20,7 +20,8 @@ Summary: Fedora Documentation: %{docbase}
Name: fedora-doc-%{docbase}
Version: <xsl:value-of select="/rpm-info/changelog/revision[@role = 'doc'][1]/@number"/>
Release: <xsl:value-of select="/rpm-info/changelog/revision[@role = 'rpm'][1]/@number"/>
-License: <xsl:value-of select="/rpm-info/license/rights"/> (Version <xsl:value-of select="/rpm-info/license/version"/>)
+License: <xsl:call-template name="rpm-license"><xsl:with-param name='license' select='/rpm-info/license/rights'/></xsl:call-template>
+#License: <xsl:value-of select="/rpm-info/license/rights"/> (Version <xsl:value-of select="/rpm-info/license/version"/>)
Url: http://fedora.redhat.com/projects/docs
Source0: %{docbase}-%{version}.src.tar.gz
Source1: %{name}-gnome.desktop
diff --git a/packaging/templates.xsl b/packaging/templates.xsl
index 95df144..8332c9f 100644
--- a/packaging/templates.xsl
+++ b/packaging/templates.xsl
@@ -42,6 +42,11 @@
</xsl:if>
</xsl:for-each>
</xsl:template>
+
+ <!-- Output an RPM-compliant license snippet -->
+ <xsl:template name="rpm-license"><xsl:choose><xsl:when
+ test="$license = 'GNU FDL'"><xsl:text>FDL</xsl:text></xsl:when><xsl:when
+ test="$license = 'OPL'"><xsl:text>OPL</xsl:text></xsl:when><xsl:otherwise><xsl:text>Distributable</xsl:text></xsl:otherwise></xsl:choose></xsl:template>
<!-- Print a full name for a given worker with id $who -->
<!-- DO NOT CHANGE SPACING! -->