Browse Source

ap/fop: Merge font specs into the default configuration file.

slackware-14.2
Damien Goutte-Gattat 8 years ago
parent
commit
2933711468
  1. 9
      ap/fop/fop.SlackBuild
  2. 22
      ap/fop/merge-font-specs.xsl

9
ap/fop/fop.SlackBuild

@ -90,9 +90,6 @@ install -m 644 \
$PKG/usr/lib/apache-xml
install -m 644 build/fop.jar $PKG/usr/lib/apache-xml/fop-$VERSION.jar
# Install configuration file
install -D -m 644 conf/fop.xconf $PKG/etc/fop.conf.new
# Install executable scripts
install -D -m 755 $CWD/fop.sh $PKG/usr/bin/fop
install -m 755 $CWD/fop-ttfreader.sh $PKG/usr/bin/fop-ttfreader
@ -117,6 +114,12 @@ mkdir -p $PKG/usr/share/fop/fonts
> fonts.xml
)
# Install configuration file
mkdir $PKG/etc
xsltproc --stringparam fontspec $PKG/usr/share/fop/fonts/fonts.xml \
$CWD/merge-font-specs.xsl conf/fop.xconf | \
xmllint --format - > $PKG/etc/fop.conf.new
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh

22
ap/fop/merge-font-specs.xsl

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" omit-xml-declaration="no" />
<xsl:param name="fontspec"/>
<xsl:template match="/ | @* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="fonts">
<fonts>
<xsl:copy-of select="comment()" />
<xsl:copy-of select="document($fontspec)/fonts/font" />
</fonts>
</xsl:template>
</xsl:stylesheet>
Loading…
Cancel
Save