3654db5ba4
(releases rc3 and rc4 have not been made available as SUSE builds) - Full support for DocBook 5 now (finally) - various fixes for ePUB (again): -ePUB 2 builds without warnings/errors in epubcheck -ePUB3 shows a few warnings/errors in epubcheck resulting from errors in the stylesheets -make sure ePUB gets a correct date format (YYYY-MM-DD) - Moved DAPS user config directory to ~/.config/daps/. The config file has been renamed to dapsrc (the user will be notified and DAPS will automatically do the move if the user agrees) - all of DocBook's profiling attributes are no supported - Various build fixes to make it work on Debian Wheezy, Fedora 20/21 openSUSE 13.x, SLE 12, and Ubuntu 14.10 - tested DAPS on Debian Wheezy, Fedora 20/21 and Ubuntu 14.10 - Added script and stylesheets to migrate DocBook4 projects to DocBook 5 (libexec/daps-migrate) - various fixes and improvements for bin/daps-init (incl. man page) - Added support for local static/ directories - Established new locdrop workflow - Fixed daps-init - strings passed with --xsltparam no longer need to be uoted with double and single quotes--only use double quotes now - Definied DAPS version for major, minor, and micro (configure.ac) - Introduced daps_version_{major,minor,micro} substitutions - Corrected URL from SourceForge to GitHub - Used DAPS version in AC_MSG_NOTICE - Unified copyright statements - Let configure change the Version in entity-decl.ent - Created DOCTYPE and PI node manually for daps-xslt/profiling/ OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/daps?expand=0&rev=164
84 lines
1.8 KiB
Bash
84 lines
1.8 KiB
Bash
#!/bin/bash
|
|
#
|
|
#
|
|
# Create DAPS source tarball from SVN
|
|
#
|
|
# Copyright (C) 2004 - 2011 SUSE Linux Products GmbH
|
|
#
|
|
# Author:
|
|
# Frank Sundermeyer <fsundermeyer at opensuse dot org>
|
|
#
|
|
|
|
#set -x
|
|
|
|
NAME=daps
|
|
VERSION=
|
|
SPECFILE=${NAME}.spec
|
|
SVNPATH=svn://svn.code.sf.net/p/daps/svn/trunk/daps
|
|
TMPDIR=$(mktemp -q -d --tmpdir daps_XXXXXXXX)
|
|
EXCLUDES=${TMPDIR}/${NAME}/packaging/exclude-files_for_daps_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 daps osc checkout directory, so
|
|
# lets check whethter we are in the correct directory
|
|
#
|
|
if [[ ! -s daps.spec && ! -d .osc ]]; then
|
|
echo "Looks like you are not in the daps 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 -q $SVNPATH ${TMPDIR}/${NAME} || exit_on_error "SVN export failed"
|
|
|
|
#
|
|
# Get the version number
|
|
#
|
|
VERSION=$(egrep "^Version:\s*" ${TMPDIR}/${NAME}/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 cf ${NAME}-${VERSION}.tar -C ${TMPDIR} \
|
|
--exclude-from=$EXCLUDES ${NAME} || exit_on_error "Failed to create the tarball."
|
|
bzip2 -9f ${NAME}-${VERSION}.tar
|
|
|
|
echo "Successfully wrote source tarball ${NAME}-${VERSION}.tar.bz2"
|
|
#
|
|
# Copy the spec file if necessary
|
|
#
|
|
diff -q $SPECFILE ${TMPDIR}/${NAME}/packaging/$SPECFILE >/dev/null
|
|
if [[ 0 = $? ]]; then
|
|
echo "Spec file is up-to-date."
|
|
else
|
|
cp ${TMPDIR}/${NAME}/packaging/$SPECFILE . || exit_on_error "Failed to copy the specfile."
|
|
echo "Successfully updated the spec file."
|
|
fi
|
|
|
|
rm -rf ${TMPDIR}
|
|
|
|
exit 0
|