docs-common/packaging spec.xsl,1.15,1.16 templates.xsl,1.2,1.3

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Sat Feb 4 06:52:35 UTC 2006


Author: pfrields

Update of /cvs/docs/docs-common/packaging
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19439/packaging

Modified Files:
	spec.xsl templates.xsl 
Log Message:
The license field in a specfile needs to be correct so that FE will accept and rpmlint will not bark


Index: spec.xsl
===================================================================
RCS file: /cvs/docs/docs-common/packaging/spec.xsl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- spec.xsl	4 Feb 2006 04:18:37 -0000	1.15
+++ spec.xsl	4 Feb 2006 06:52:27 -0000	1.16
@@ -20,7 +20,8 @@
 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


Index: templates.xsl
===================================================================
RCS file: /cvs/docs/docs-common/packaging/templates.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- templates.xsl	4 Feb 2006 04:11:47 -0000	1.2
+++ templates.xsl	4 Feb 2006 06:52:27 -0000	1.3
@@ -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! -->




More information about the Fedora-docs-commits mailing list