[med-svn] r13707 - trunk/packages/pixelmed/trunk/debian

Mathieu Malaterre malat at alioth.debian.org
Fri May 24 17:11:15 UTC 2013


Author: malat
Date: 2013-05-24 17:11:15 +0000 (Fri, 24 May 2013)
New Revision: 13707

Added:
   trunk/packages/pixelmed/trunk/debian/jnlp2desktop.xsl
Modified:
   trunk/packages/pixelmed/trunk/debian/rules
Log:
Generates .desktop from JNLP input

Added: trunk/packages/pixelmed/trunk/debian/jnlp2desktop.xsl
===================================================================
--- trunk/packages/pixelmed/trunk/debian/jnlp2desktop.xsl	                        (rev 0)
+++ trunk/packages/pixelmed/trunk/debian/jnlp2desktop.xsl	2013-05-24 17:11:15 UTC (rev 13707)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2013 Mathieu Malaterre <malat at debian.org>
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="text" indent="no" omit-xml-declaration="yes" encoding="utf-8"/>
+  <xsl:strip-space elements="*"/>
+  <xsl:template match="title">
+    <xsl:text>Name=</xsl:text>
+    <xsl:value-of select="normalize-space(.)"/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+  <xsl:template match="description[@kind='short']">
+    <xsl:text>Comment=</xsl:text>
+    <xsl:value-of select="normalize-space(.)"/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+  <xsl:template match="description">
+    <xsl:text>GenericName=</xsl:text>
+    <xsl:value-of select="normalize-space(.)"/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+  <xsl:template match="information">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="jnlp">
+    <xsl:text>[Desktop Entry]
+Type=Application
+Terminal=false
+Version=0.0.0
+</xsl:text>
+    <xsl:apply-templates/>
+<xsl:text>TryExec=
+Exec=
+Categories=Education;DataVisualization;ImageProcessing;MedicalSoftware
+Icon=
+MimeType=application/x-;
+</xsl:text>
+  </xsl:template>
+  <xsl:template match="*|@*">
+  </xsl:template>
+</xsl:stylesheet>

Modified: trunk/packages/pixelmed/trunk/debian/rules
===================================================================
--- trunk/packages/pixelmed/trunk/debian/rules	2013-05-24 16:29:01 UTC (rev 13706)
+++ trunk/packages/pixelmed/trunk/debian/rules	2013-05-24 17:11:15 UTC (rev 13707)
@@ -28,5 +28,8 @@
 	# doc package:
 	rm -rf docs
 
+debian/DoseUtility.desktop: webstart/DoseUtility.jnlp
+	xsltproc -o $@ debian/jnlp2desktop.xsl webstart/DoseUtility.jnlp
+
 get-orig-source:
 	./debian/get-orig-source




More information about the debian-med-commit mailing list