Initial version of a seperate SUSE stylesheets package
OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/suse-xsl-stylesheets?expand=0&rev=1
This commit is contained in:
commit
32f694c53f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
suse-xsl-stylesheets-1.9.tar.bz2
Normal file
3
suse-xsl-stylesheets-1.9.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d6177932f68f36e8a94a7bfc48c9b860c07563e2fe066f583cbf2c92e4985a2
|
||||
size 141299
|
5
suse-xsl-stylesheets.changes
Normal file
5
suse-xsl-stylesheets.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 7 14:26:16 UTC 2012 - fsundermeyer@opensuse.org
|
||||
|
||||
Initial version of a seperate SUSE stylesheets package
|
||||
|
1
suse-xsl-stylesheets.rpmlintrc
Normal file
1
suse-xsl-stylesheets.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
addFilter("explicit-lib-dependency libxslt")
|
136
suse-xsl-stylesheets.spec
Normal file
136
suse-xsl-stylesheets.spec
Normal file
@ -0,0 +1,136 @@
|
||||
#
|
||||
# spec file for package suse-xsl-stylesheets
|
||||
#
|
||||
# Copyright (c) 2011, 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
#
|
||||
|
||||
Name: suse-xsl-stylesheets
|
||||
Version: 1.9
|
||||
|
||||
%define dtdversion 1.0
|
||||
%define dtdname novdoc
|
||||
%define regcat %{_bindir}/sgml-register-catalog
|
||||
%define dbstyles %{_datadir}/xml/docbook/stylesheet/nwalsh/current
|
||||
%define novdoc_catalog for-catalog-%{dtdname}-%{dtdversion}.xml
|
||||
|
||||
Release: 1
|
||||
Summary: SUSE-branded Docbook stylesheets for XSLT 1.0
|
||||
License: GPL-2.0 or GPL-3.0
|
||||
Group: Productivity/Publishing/XML
|
||||
URL: http://sourceforge.net/p/daps/suse-xslt
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: susexsl-fetch-source
|
||||
Source2: %{name}.rpmlintrc
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: docbook-xsl-stylesheets >= 1.75
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: make
|
||||
BuildRequires: trang
|
||||
|
||||
Requires: docbook
|
||||
Requires: docbook-xsl-stylesheets >= 1.75
|
||||
Requires: libxslt
|
||||
|
||||
Recommends: daps
|
||||
Recommends: docbook5
|
||||
Recommends: docbook5-xsl-stylesheets
|
||||
|
||||
%description
|
||||
SUSE-branded DocBook stylesheets for XSLT 1.0
|
||||
|
||||
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
|
||||
the DocBook 4 DTD.
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
%build
|
||||
%__make %{?_smp_mflags}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
#----------------------
|
||||
%post
|
||||
# register catalogs
|
||||
#
|
||||
# SGML CATALOG
|
||||
#
|
||||
if [ -x %{regcat} ]; then
|
||||
for CATALOG in catalog/CATALOG.%{dtdname}-%{dtdversion}; do
|
||||
%{regcat} -a %{_datadir}/sgml/$CATALOG >/dev/null 2>&1 || true
|
||||
done
|
||||
fi
|
||||
# XML Catalog
|
||||
#
|
||||
# remove existing entries first - needed for
|
||||
# zypper in, since it does not call postun
|
||||
# delete ...
|
||||
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--del %{dtdname}-%{dtdversion}
|
||||
# ... and add it again
|
||||
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--add /etc/xml/%{novdoc_catalog}
|
||||
|
||||
exit 0
|
||||
|
||||
#----------------------
|
||||
%postun
|
||||
#
|
||||
# Remove catalog entries
|
||||
#
|
||||
# SGML
|
||||
if [ ! -f %{_sysconfdir}/xml/%{novdoc_catalog} -a -x /usr/bin/edit-xml-catalog ] ; then
|
||||
for c in catalog/CATALOG.%{dtdname}-%{dtdversion}; do
|
||||
%{regcat} -r %{_datadir}/sgml/$c >/dev/null 2>&1
|
||||
done
|
||||
# XML
|
||||
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--del %{dtdname}-%{dtdversion}
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
#----------------------
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
|
||||
# Directories
|
||||
%dir %{_datadir}/xml/docbook/stylesheet/suse
|
||||
|
||||
%dir %{_datadir}/xml/%{dtdname}
|
||||
%dir %{_datadir}/xml/%{dtdname}/schema
|
||||
%dir %{_datadir}/xml/%{dtdname}/schema/*
|
||||
%dir %{_datadir}/xml/%{dtdname}/schema/*/1.0
|
||||
|
||||
%dir %{_defaultdocdir}/%{name}
|
||||
|
||||
# stylesheets
|
||||
%{_datadir}/xml/docbook/stylesheet/suse
|
||||
|
||||
# NovDoc Schemas
|
||||
%{_datadir}/xml/%{dtdname}/schema/dtd/%{dtdversion}/*
|
||||
%{_datadir}/xml/%{dtdname}/schema/rng/%{dtdversion}/*
|
||||
|
||||
# Catalogs
|
||||
%config /var/lib/sgml/CATALOG.*
|
||||
%{_datadir}/sgml/CATALOG.*
|
||||
%config %{_sysconfdir}/xml/*.xml
|
||||
|
||||
# Documentation
|
||||
%doc %{_defaultdocdir}/%{name}/*
|
||||
|
||||
#----------------------
|
||||
%changelog
|
87
susexsl-fetch-source
Normal file
87
susexsl-fetch-source
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Create suse-xsl-stylesheet source tarball from SVN
|
||||
#
|
||||
# Copyright (C) 2011,2012 Frank Sundermeyer <fsundermeyer@opensuse.org>
|
||||
#
|
||||
# Author:
|
||||
# Frank Sundermeyer <fsundermeyer@opensuse.org>
|
||||
|
||||
#set -x
|
||||
|
||||
NAME=suse-xsl-stylesheets
|
||||
VERSION=
|
||||
SPECFILE=${NAME}.spec
|
||||
SRC_DIR=suse-xslt
|
||||
NOVDOC_DIR=schema
|
||||
SVNPATH=https://svn.code.sf.net/p/daps/svn/trunk/daps
|
||||
TMPDIR=$(mktemp -q -d --tmpdir susexsl_XXXXXXXX)
|
||||
EXCLUDES=${TMPDIR}/${NAME}/${SRC_DIR}/packaging/exclude-files_for_susexsl_package.txt
|
||||
|
||||
#----------
|
||||
# Functions
|
||||
#----------
|
||||
|
||||
# exit on error
|
||||
#
|
||||
function exit_on_error {
|
||||
echo -e "$1"
|
||||
#rm -rf $TMPDIR
|
||||
exit 1
|
||||
}
|
||||
#-----
|
||||
# MAIN
|
||||
#-----
|
||||
#
|
||||
# This script needs to be called from the suse-xsl-stylesheet osc checkout
|
||||
# directory, so lets check whethter we are in the correct directory
|
||||
#
|
||||
if [[ ! -s ${NAME}.spec && ! -d .osc ]]; then
|
||||
echo "Looks like you are not in the ${NAME} checkout directory."
|
||||
read -p "Continue anyway (y/n) [n]: " CONT
|
||||
if [[ n = $CONT || N = $CONT ]]; then
|
||||
exit_on_error "Aborted by user."
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Export daps from SVN
|
||||
#
|
||||
svn export $SVNPATH ${TMPDIR}/${NAME} || exit_on_error "SVN export failed"
|
||||
|
||||
#
|
||||
# Get the version number
|
||||
#
|
||||
VERSION=$(egrep "^Version:\s*" ${TMPDIR}/${NAME}/${SRC_DIR}/packaging/$SPECFILE | sed 's/^Version:\s*//')
|
||||
|
||||
if [[ -z $VERSION ]]; then
|
||||
exit_on_error "Couldn't get version number from spec-file."
|
||||
fi
|
||||
|
||||
#
|
||||
# Create the tarball
|
||||
#
|
||||
export BZIP2=--best
|
||||
tar cvhf ${NAME}-${VERSION}.tar -C ${TMPDIR}/${NAME} \
|
||||
--exclude-from=$EXCLUDES --transform=s:suse-xslt:suse-xsl-stylesheets: \
|
||||
${SRC_DIR} || exit_on_error "Failed to create the tarball."
|
||||
tar rvhf ${NAME}-${VERSION}.tar -C ${TMPDIR}/${NAME} \
|
||||
--transform=s:${NOVDOC_DIR}:suse-xsl-stylesheets/${NOVDOC_DIR}: \
|
||||
$NOVDOC_DIR || exit_on_error "Failed to add $NOVDOC_DIR to the tarball."
|
||||
bzip2 -9f ${NAME}-${VERSION}.tar
|
||||
echo "Successfully created ${NAME}-${VERSION}.tar.bz2"
|
||||
|
||||
#
|
||||
# Copy the spec file if necessary
|
||||
#
|
||||
diff -q $SPECFILE ${TMPDIR}/${NAME}/${SRC_DIR}/packaging/$SPECFILE >/dev/null
|
||||
if [[ 0 = $? ]]; then
|
||||
echo "spec file is up-to-date"
|
||||
else
|
||||
cp ${TMPDIR}/${NAME}/${SRC_DIR}/packaging/$SPECFILE . || exit_on_error "Failed to copy the specfile."
|
||||
echo "Successfully updated the spec file."
|
||||
fi
|
||||
|
||||
rm -rf ${TMPDIR}
|
||||
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user