From 14e6293309fc93e5beea6dc6f75dd63d8e94b9df9ee304e6745d3ca6f71e17ac Mon Sep 17 00:00:00 2001 From: Karl Eichwalder Date: Tue, 21 Jun 2016 10:25:00 +0000 Subject: [PATCH] Accepting request 403804 from home:favogt:branches:Publishing Improve specfile Version 0.7: - Move to GitHub - Integrate: - sgml-skel-edit-cat.diff - sgml-skel-regcat.diff - sgml-skel-regcat2.diff - edit-xml-catalog.sh - install-catalog.in OBS-URL: https://build.opensuse.org/request/show/403804 OBS-URL: https://build.opensuse.org/package/show/Publishing/sgml-skel?expand=0&rev=13 --- _service | 3 + edit-xml-catalog.sh | 123 ------------------------------ install-catalog.in | 165 ---------------------------------------- sgml-skel-0.6.tar.bz2 | 3 - sgml-skel-edit-cat.diff | 35 --------- sgml-skel-regcat.diff | 23 ------ sgml-skel-regcat2.diff | 22 ------ sgml-skel.changes | 13 ++++ sgml-skel.spec | 104 ++++++++++--------------- v0.7.tar.gz | 3 + 10 files changed, 61 insertions(+), 433 deletions(-) create mode 100644 _service delete mode 100644 edit-xml-catalog.sh delete mode 100644 install-catalog.in delete mode 100644 sgml-skel-0.6.tar.bz2 delete mode 100644 sgml-skel-edit-cat.diff delete mode 100644 sgml-skel-regcat.diff delete mode 100644 sgml-skel-regcat2.diff create mode 100644 v0.7.tar.gz diff --git a/_service b/_service new file mode 100644 index 0000000..413b85c --- /dev/null +++ b/_service @@ -0,0 +1,3 @@ + + + diff --git a/edit-xml-catalog.sh b/edit-xml-catalog.sh deleted file mode 100644 index 8a5aa6b..0000000 --- a/edit-xml-catalog.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash - -# $0 $for_root_catalog add|del -export LC_ALL=C - -usage="\ -$0 [-a|-d] [--add|--del] [-c|--catalog /etc/xml/CATALOG] CATALOG_FRAGMENT_FILE" -# TEMP=$(getopt -o ac:dghv \ -# --long add,cat:,catalog:,del,delete,group,help,verbose \ -# -n "$0" -- "$@") -# # Note the quotes around `$TEMP': they are essential! -# eval set -- "$TEMP" - -ROOTCATALOG=/etc/xml/catalog -mode=add -echo=true -while test $# -gt 0; do -# while true ; do - case "$1" in - -h|--help) echo "$usage"; exit 0 ;; - -a|--add) mode=add; shift ;; - -c|--cat*) if test $# -gt 1; then ROOTCATALOG="$2"; shift 2; - else echo "$usage"; exit 1; fi ;; - -d|--del*) mode=del; shift ;; - -g|--group) marker=group; shift ;; - -v|--verbose) verbose="-v"; echo=echo; shift ;; - --) shift ; break ;; - *) break ;; - # *) echo "Internal error!" ; exit 1 ;; - esac -done -FOR_ROOT_CAT=$1 - -[ -z "$FOR_ROOT_CAT" ] && { echo $usage; exit 1; } - -xmlcat=/usr/bin/xmlcatalog -xmllint=/usr/bin/xmllint - -for b in $xmlcat $xmllint; do - [ -x $b ] || { echo "error: $b does not exist" ; exit 1; } -done - -prep_catalog () { - local cat=$1 - [ -s $cat ] || rm -f $cat - if [ -r $cat ]; then - if grep -q '"urn:oasis:names:tc:entity:xmlns:xml:catalog"/>' $cat; then - rm -f $cat - fi - fi - if [ ! -r $cat ] ; then - $xmlcat --create | sed 's:/>:>\ -:' >$cat - # echo Failed creating XML Catalog root $1 - fi -} - -# Check /etc/xml/catalog -prep_catalog /etc/xml/catalog - -if [ "$ROOTCATALOG" != /etc/xml/catalog ]; then - root=${ROOTCATALOG#/etc/xml/} - if ! grep -q "nextCatalog.*catalog=\"${root}\"" /etc/xml/catalog; then - cp /etc/xml/catalog /etc/xml/catalog.tmp - sed "/<\/catalog>/i\\ -" \ - /etc/xml/catalog.tmp >/etc/xml/catalog - fi - prep_catalog "$ROOTCATALOG" -fi - -add_entry () { - { - sed '/<\/catalog>/d' $ROOTCATALOG - $xmllint --nocatalogs --format ${FOR_ROOT_CAT} \ - | awk '\ -/<\/catalog>/{next} -s == 1 {print} -/"}' - } >$ROOTCATALOG.tmp - $xmllint --nocatalogs --noout $ROOTCATALOG.tmp \ - && mv $ROOTCATALOG.tmp $ROOTCATALOG -} - -del_entry () { - pattern=$FOR_ROOT_CAT - $echo $pattern - if [ -r $ROOTCATALOG ]; then - # Either delete ... - # or ... - if [ "$marker" = "group" ]; then - $xmllint --nocatalogs --format $ROOTCATALOG \ - | awk "\ -/<\/group>/ && s == 1 {s=0;next} -s == 1 {next} -//{s=1;next} -{print}" > $ROOTCATALOG.tmp - else - $xmllint --nocatalogs --format $ROOTCATALOG \ - | awk "\ -//{s=0;next} -s == 1 {next} -//{s=1;next} -{print}" > $ROOTCATALOG.tmp - fi - $xmllint --nocatalogs --noout $ROOTCATALOG.tmp \ - && mv $ROOTCATALOG.tmp $ROOTCATALOG - fi -} - -case "$mode" in - del) - del_entry - ;; - add) - [ -r ${FOR_ROOT_CAT} ] || { echo \"$FOR_ROOT_CAT\" does not exist; exit 1; } - add_entry - ;; - *) -esac - -exit diff --git a/install-catalog.in b/install-catalog.in deleted file mode 100644 index 9af798d..0000000 --- a/install-catalog.in +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/sh -# Script to install a catalog in the centralized SGML catalog -# Send any comments to Eric Bischoff -# This program is under GPL license. See LICENSE file for details. - -# Set help message -SGML_HELP_MESSAGE="\ -Usage: `basename $0` [