summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2006-02-04 06:52:27 +0000
committerPaul W. Frields <stickster@gmail.com>2006-02-04 06:52:27 +0000
commitaf99a0835ed0de61d44c5207a65bb2dcced25101 (patch)
tree3881baaa0a28e5cd67fd51625a6de11fb57b0864 /packaging
parentde75c40b93c0a475d8cd0f6141528f50bb7acf51 (diff)
downloadfedora-doc-utils-af99a0835ed0de61d44c5207a65bb2dcced25101.tar.gz
fedora-doc-utils-af99a0835ed0de61d44c5207a65bb2dcced25101.tar.xz
fedora-doc-utils-af99a0835ed0de61d44c5207a65bb2dcced25101.zip
The license field in a specfile needs to be correct so that FE will accept and rpmlint will not bark
Diffstat (limited to 'packaging')
-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! -->