Accepting request 314992 from Documentation:Tools

Updated to 2.0.1, see .changelog

OBS-URL: https://build.opensuse.org/request/show/314992
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suse-xsl-stylesheets?expand=0&rev=26
This commit is contained in:
Stephan Kulow 2015-07-05 15:58:42 +00:00 committed by Git OBS Bridge
commit a1368c21f5
5 changed files with 132 additions and 64 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd475adfc11ed75cd53feb6d32e756ef39923ef65f5582317863230afaf39e9c
size 1797696

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b67128ecac9591794fbbcb4e1ab6cd7267d81d6419dba7fa1302f07d6fa592e
size 1796630

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Thu Jul 2 07:48:22 UTC 2015 - toms@opensuse.org
Stable release 2.0.1
- Schema
. Enabled subtitle and textobject (susedoc5.rnc)
- Stylesheets
. Changed bugzilla component to 'Documentation' for SLERT
(suse2013/static/js/script.js)
. Added missing subtitle for articles
suse2013/fo/article.titlepage.templates.xsl
- Infrastructure
. Trying to fix an undef value error (bin/xslns-build)
-------------------------------------------------------------------
Fri Jun 19 12:47:56 UTC 2015 - fsundermeyer@opensuse.org
Stable release 2.0
- added latest products to .js file to create correct Bugzilla
links in Draft mode
-------------------------------------------------------------------
Thu Jun 11 13:55:14 UTC 2015 - fsundermeyer@opensuse.org
New release 2.0-rc6:
* added SUSEdoc, a fully DocBook 5 compatible schema with a subset
of DocBook commands (like NovDoc for DocBook 4)
* package now supports installation of different schema/DTD versions
in parallel
* schemas are located at /usr/share/xml/suse/schema
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Apr 27 12:00:09 UTC 2015 - fsundermeyer@opensuse.org Mon Apr 27 12:00:09 UTC 2015 - fsundermeyer@opensuse.org

View File

@ -17,7 +17,7 @@
Name: suse-xsl-stylesheets Name: suse-xsl-stylesheets
Version: 2.0~rc5 Version: 2.0.1
Release: 0 Release: 0
############################################################### ###############################################################
@ -33,12 +33,18 @@ Release: 0
# #
################################################################ ################################################################
%define dtdversion 1.0 %define novdocversion 1.0
%define dtdname novdoc %define novdocname novdoc
%define regcat %{_bindir}/sgml-register-catalog %define regcat %{_bindir}/sgml-register-catalog
%define dbstyles %{_datadir}/xml/docbook/stylesheet/nwalsh/current %define dbstyles %{_datadir}/xml/docbook/stylesheet/nwalsh/current
%define novdoc_catalog for-catalog-%{dtdname}-%{dtdversion}.xml %define suse_schemas_catalog catalog-for-suse_schemas.xml
%define susexsl_catalog for-catalog-%{name}.xml %define susexsl_catalog catalog-for-%{name}.xml
%define suse_schemas_groupname suse_schemas
%define suse_xml_dir %{_datadir}/xml/suse
%define db_xml_dir %{_datadir}/xml/docbook
%define suse_schema_dir %{suse_xml_dir}/schema
%define suse_styles_dir %{db_xml_dir}/stylesheet
Summary: SUSE-branded Docbook stylesheets for XSLT 1.0 Summary: SUSE-branded Docbook stylesheets for XSLT 1.0
License: GPL-2.0 or GPL-3.0 License: GPL-2.0 or GPL-3.0
@ -134,7 +140,7 @@ SUSE-branded DocBook stylesheets for XSLT 1.0
Extensions for the DocBook XSLT 1.0 stylesheets that provide SUSE branding Extensions for the DocBook XSLT 1.0 stylesheets that provide SUSE branding
for PDF, HTML, and ePUB. This package also provides the NovDoc DTD, a subset of for PDF, HTML, and ePUB. This package also provides the NovDoc DTD, a subset of
the DocBook 4 DTD. the DocBook 4 DTD and SUSEdoc, a subset of the DocBook 5 schema.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
%prep %prep
@ -158,7 +164,7 @@ make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%_libdir
# SGML CATALOG # SGML CATALOG
# #
if [ -x %{regcat} ]; then if [ -x %{regcat} ]; then
%{regcat} -a %{_datadir}/sgml/CATALOG.%{dtdname}-%{dtdversion} >/dev/null 2>&1 || true %{regcat} -a %{_datadir}/sgml/CATALOG.%{novdocname}-%{novdocversion} >/dev/null 2>&1 || true
fi fi
# XML Catalogs # XML Catalogs
# #
@ -166,17 +172,17 @@ fi
# zypper in, since it does not call postun # zypper in, since it does not call postun
# delete ... # delete ...
if [ "2" = "$1" ]; then if [ "2" = "$1" ]; then
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
--del %{dtdname}-%{dtdversion} || true --del %{suse_schemas_groupname} || true
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
--del %{name} || true --del %{name} || true
fi fi
# ... and (re)add it again # ... and (re)add it again
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
--add /etc/xml/%{novdoc_catalog} --add %{_sysconfdir}/xml/%{suse_schemas_catalog}
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
--add /etc/xml/%{susexsl_catalog} --add %{_sysconfdir}/xml/%{susexsl_catalog}
%reconfigure_fonts_post %reconfigure_fonts_post
exit 0 exit 0
@ -191,15 +197,15 @@ exit 0
# in case of an update # in case of an update
# #
if [ "0" = "$1" ]; then if [ "0" = "$1" ]; then
if [ ! -f %{_sysconfdir}/xml/%{novdoc_catalog} -a -x /usr/bin/edit-xml-catalog ] ; then if [ ! -f %{_sysconfdir}/xml/%{suse_schemas_catalog} -a -x /usr/bin/edit-xml-catalog ] ; then
# SGML: novdoc dtd entry # SGML: novdoc dtd entry
%{regcat} -r %{_datadir}/sgml/CATALOG.%{dtdname}-%{dtdversion} >/dev/null 2>&1 || true %{regcat} -r %{_datadir}/sgml/CATALOG.%{novdocname}-%{novdocversion} >/dev/null 2>&1 || true
# XML # XML
# novdoc dtd entry # schemas entry
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
--del %{dtdname}-%{dtdversion} --del %{suse_schemas_groupname}
# susexsl entry # susexsl entry
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
--del %{name} --del %{name}
fi fi
%reconfigure_fonts_post %reconfigure_fonts_post
@ -218,37 +224,43 @@ exit 0
# Directories # Directories
%dir %{_datadir}/suse-xsl-stylesheets %dir %{_datadir}/suse-xsl-stylesheets
%dir %{_datadir}/suse-xsl-stylesheets/aspell %dir %{_datadir}/suse-xsl-stylesheets/aspell
%dir %{_datadir}/xml/docbook/stylesheet/suse
%dir %{_datadir}/xml/docbook/stylesheet/suse-ns
%dir %{_datadir}/xml/docbook/stylesheet/suse2013
%dir %{_datadir}/xml/docbook/stylesheet/suse2013-ns
%dir %{_datadir}/xml/docbook/stylesheet/daps2013
%dir %{_datadir}/xml/docbook/stylesheet/daps2013-ns
%dir %{_datadir}/xml/docbook/stylesheet/opensuse2013
%dir %{_datadir}/xml/docbook/stylesheet/opensuse2013-ns
%dir %{_datadir}/xml/%{dtdname} %dir %{suse_xml_dir}
%dir %{_datadir}/xml/%{dtdname}/schema
%dir %{_datadir}/xml/%{dtdname}/schema/* %dir %{suse_styles_dir}
%dir %{_datadir}/xml/%{dtdname}/schema/*/%{dtdversion} %dir %{suse_styles_dir}/suse
%dir %{suse_styles_dir}/suse-ns
%dir %{suse_styles_dir}/suse2013
%dir %{suse_styles_dir}/suse2013-ns
%dir %{suse_styles_dir}/daps2013
%dir %{suse_styles_dir}/daps2013-ns
%dir %{suse_styles_dir}/opensuse2013
%dir %{suse_styles_dir}/opensuse2013-ns
%dir %{suse_schema_dir}
%dir %{suse_schema_dir}/dtd
%dir %{suse_schema_dir}/rng
%dir %{suse_schema_dir}/dtd/1.0
%dir %{suse_schema_dir}/rng/0.9
%dir %{suse_schema_dir}/rng/1.0
%dir %{_ttfontsdir} %dir %{_ttfontsdir}
%dir %{_defaultdocdir}/%{name} %dir %{_defaultdocdir}/%{name}
# stylesheets # stylesheets
%{_datadir}/xml/docbook/stylesheet/suse/* %{suse_styles_dir}/suse/*
%{_datadir}/xml/docbook/stylesheet/suse-ns/* %{suse_styles_dir}/suse-ns/*
%{_datadir}/xml/docbook/stylesheet/suse2013/* %{suse_styles_dir}/suse2013/*
%{_datadir}/xml/docbook/stylesheet/suse2013-ns/* %{suse_styles_dir}/suse2013-ns/*
%{_datadir}/xml/docbook/stylesheet/daps2013/* %{suse_styles_dir}/daps2013/*
%{_datadir}/xml/docbook/stylesheet/daps2013-ns/* %{suse_styles_dir}/daps2013-ns/*
%{_datadir}/xml/docbook/stylesheet/opensuse2013/* %{suse_styles_dir}/opensuse2013/*
%{_datadir}/xml/docbook/stylesheet/opensuse2013-ns/* %{suse_styles_dir}/opensuse2013-ns/*
# NovDoc Schemas # SUSE Schemas
%{_datadir}/xml/%{dtdname}/schema/dtd/%{dtdversion}/* %{suse_schema_dir}/dtd/*
%{_datadir}/xml/%{dtdname}/schema/rng/%{dtdversion}/* %{suse_schema_dir}/rng/*
# Catalogs # Catalogs
%config /var/lib/sgml/CATALOG.* %config /var/lib/sgml/CATALOG.*

View File

@ -10,6 +10,7 @@
# Author: # Author:
# Frank Sundermeyer <fsundermeyer at opensuse dot org> # Frank Sundermeyer <fsundermeyer at opensuse dot org>
# #
#
NAME=suse-xsl NAME=suse-xsl
PNAME=suse-xsl-stylesheets PNAME=suse-xsl-stylesheets
@ -33,6 +34,35 @@ function help {
echo -e "$(basename $0) <ARCHIVE_FILENAME>\n" echo -e "$(basename $0) <ARCHIVE_FILENAME>\n"
} }
function download_archive {
echo "Downloading archive:"
(cd $TMPDIR && wget -nv $ARCHIVE_URL) || exit_on_error "Download of $ARCHIVE_URL failed"
}
function copy_archive {
echo "Copying archive:"
cp -v $ARCHIVE_URL $TMPDIR || exit_on_error "Copying of $ARCHIVE_URL failed"
}
function unpack_archive {
case ${ARCHIVE_NAME##*.} in
zip)
UNPACK="unzip"
ARCHIVE_DIR=$(basename $ARCHIVE_NAME .zip)
;;
gz)
UNPACK="tar xfz"
ARCHIVE_DIR=$(basename $ARCHIVE_NAME .tar.gz)
;;
bz2)
UNPACK="tar xfj"
ARCHIVE_DIR=$(basename $ARCHIVE_NAME .tar.bz2)
;;
*)
exit_on_error "Unknown archive format"
esac
}
#----- #-----
# MAIN # MAIN
#----- #-----
@ -60,29 +90,19 @@ fi
#----------- #-----------
# Download archive # Download archive
# #
echo "Downloading archive:"
(cd $TMPDIR && wget -nv $ARCHIVE_URL) || exit_on_error "Download of $ARCHIVE_URL failed" if [[ ${ARCHIVE_URL} == http* ]]; then
download_archive
unpack_archive
else
copy_tar
fi
#----------- #-----------
# Unpack archive # Unpack archive
# #
case ${ARCHIVE_NAME##*.} in
zip)
UNPACK="unzip"
ARCHIVE_DIR=$(basename $ARCHIVE_NAME .zip)
;;
gz)
UNPACK="tar xfz"
ARCHIVE_DIR=$(basename $ARCHIVE_NAME .tar.gz)
;;
bz2)
UNPACK="tar xfj"
ARCHIVE_DIR=$(basename $ARCHIVE_NAME .tar.bz2)
;;
*)
exit_on_error "Unknown archive format"
esac
SRC_DIR=${TMPDIR}/${PNAME} SRC_DIR=${TMPDIR}/${PNAME}
EXCLUDES=${SRC_DIR}/packaging/exclude-files_for_susexsl_package.txt EXCLUDES=${SRC_DIR}/packaging/exclude-files_for_susexsl_package.txt