how-lix-os-pkgs/docbook-xsl/default/inst.sh

60 lines
1.2 KiB
Bash
Executable File

#!/bin/sh -e
dest="/share/xml/docbook/xsl-stylesheets-$version"
#mkdir -p "$dest"
install -dm755 "$dest"
install -m644 VERSION VERSION.xsl "$dest/"
echo "assembly
common
eclipse
epub
epub3
fo
highlighting
html
htmlhelp
javahelp
lib
manpages
params
profiling
roundtrip
template
website
xhtml
xhtml-1_1
xhtml5" | while read dir; do
install -dm755 "$dest/$dir"
printf "xml\nxsl\ndtd\nent\n" | while read ext; do
[ "$(ls $dir/*.$ext 2> /dev/null)" ] || continue
install -m644 $dir/*.$ext $dest/$dir
done
done
install -dm755 /etc/xml
install -m644 -D COPYING /usr/share/licenses/$name/COPYING
[ -e /etc/xml/catalog ] || xmlcatalog --noout --create /etc/xml/catalog
xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/$version" \
"$dest" \
/etc/xml/catalog
xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/$version" \
"$dest" \
/etc/xml/catalog
xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"$dest" \
/etc/xml/catalog
xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"$dest" \
/etc/xml/catalog