Don't dump wiki content into distribution package.
As requested by Martin[1]. Before releasing a new formal version, run: $ make Generate-ChangeLog It generates the ChangeLog out of svn and autoreconf again for package inclusion. [1] http://www.opensc-project.org/pipermail/opensc-devel/2010-September/015014.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4776 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
58c1c88efa
commit
6ebd49397e
16
Makefile.am
16
Makefile.am
|
@ -24,3 +24,19 @@ dist_doc_DATA = NEWS
|
|||
# Allow detection of packaged tarball
|
||||
dist-hook:
|
||||
echo > "$(distdir)/packaged"
|
||||
|
||||
Generate-ChangeLog:
|
||||
rm -f ChangeLog.tmp "$(srcdir)/ChangeLog"
|
||||
test -n "$(SVN)" -a -n "$(XSLTPROC)"
|
||||
if test -d "$(top_srcdir)/.svn"; then \
|
||||
$(SVN) --verbose --xml log "$(top_srcdir)" | \
|
||||
$(XSLTPROC) --nonet --stringparam linelen 75 \
|
||||
--stringparam groupbyday no \
|
||||
--stringparam include-rev no \
|
||||
"$(top_srcdir)/doc/svn2cl.xsl" - > ChangeLog.tmp; \
|
||||
else \
|
||||
echo "Warning: Unable to generate ChangeLog from none svn checkout" >&2; \
|
||||
echo > ChangeLog.tmp; \
|
||||
fi
|
||||
mv ChangeLog.tmp "$(srcdir)/ChangeLog"
|
||||
( cd "$(srcdir)" && autoreconf -ivf )
|
||||
|
|
22
configure.ac
22
configure.ac
|
@ -214,16 +214,10 @@ ifdef(
|
|||
)
|
||||
|
||||
dnl These required for svn checkout
|
||||
AC_ARG_VAR([XSLTPROC], [xsltproc utility])
|
||||
AC_ARG_VAR([SVN], [subversion utility])
|
||||
AC_ARG_VAR([WGET], [wget utility])
|
||||
AC_ARG_VAR([WGET_OPTS], [wget options])
|
||||
AC_ARG_VAR([TR], [tr utility])
|
||||
AC_CHECK_PROGS([XSLTPROC],[xsltproc])
|
||||
AC_ARG_VAR([XSLTPROC], [xsltproc utility])
|
||||
AC_CHECK_PROGS([SVN],[svn])
|
||||
AC_CHECK_PROGS([WGET],[wget])
|
||||
AC_CHECK_PROGS([TR],[tr])
|
||||
test -z "${WGET_OPTS}" && WGET_OPTS="-nv"
|
||||
AC_CHECK_PROGS([XSLTPROC],[xsltproc])
|
||||
|
||||
if test "${xslstylesheetsdir}" = "detect"; then
|
||||
AC_MSG_CHECKING([xsl-stylesheets])
|
||||
|
@ -258,17 +252,6 @@ if test "${svn_checkout}" = "yes"; then
|
|||
if test "${enable_man}" = "yes"; then
|
||||
test "${xslstylesheetsdir}" = "no" && AC_MSG_ERROR([xsl-stylesheets are required for svn build with man])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([svn doc build dependencies])
|
||||
if test -n "${SVN}" -a -n "${TR}" -a -n "${WGET}"; then
|
||||
AC_MSG_RESULT([ok])
|
||||
else
|
||||
if test "${enable_doc}" = "yes"; then
|
||||
AC_MSG_ERROR([Missing SVN, TR or WGET for svn doc build])
|
||||
else
|
||||
AC_MSG_WARN(["make dist" will not work])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl C Compiler features
|
||||
|
@ -692,7 +675,6 @@ fi
|
|||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
doc/Makefile
|
||||
doc/nonpersistent/Makefile
|
||||
etc/Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
|
||||
|
||||
wikidir=$(htmldir)/wiki
|
||||
|
||||
if ENABLE_DOC
|
||||
SUBDIRS = nonpersistent
|
||||
endif
|
||||
DIST_SUBDIRS = nonpersistent
|
||||
dist_noinst_SCRIPTS = svn2cl.xsl
|
||||
|
||||
dist_noinst_DATA = $(srcdir)/tools/*.xml
|
||||
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/Makefile.in
|
||||
|
||||
wikidir=$(htmldir)/wiki
|
||||
|
||||
dist_noinst_SCRIPTS = export-wiki.sh export-wiki.xsl \
|
||||
svn2cl.xsl
|
||||
dist_wiki_DATA = wiki.out/*
|
||||
dist_noinst_DATA = ChangeLog
|
||||
|
||||
if SVN_CHECKOUT
|
||||
|
||||
wiki.out/*: wiki.out
|
||||
wiki.out:
|
||||
-rm -fr wiki.out
|
||||
test -n "$(WGET)" -a -n "$(SED)" -a -n "$(TR)" -a -n "$(XSLTPROC)"
|
||||
WGET="$(WGET)" WGET_OPTS="$(WGET_OPTS)" SED="$(SED)" TR="$(TR)" XSLTPROC="$(XSLTPROC)" \
|
||||
PROJECT="@PACKAGE_NAME@" \
|
||||
$(SHELL) "$(srcdir)/export-wiki.sh" "$(srcdir)" "wiki.tmp"
|
||||
mv wiki.tmp wiki.out
|
||||
|
||||
ChangeLog:
|
||||
test -n "$(SVN)" -a -n "$(XSLTPROC)"
|
||||
if test -d "$(top_srcdir)/.svn"; then \
|
||||
$(SVN) --verbose --xml log "$(top_srcdir)" | \
|
||||
$(XSLTPROC) --nonet --stringparam linelen 75 \
|
||||
--stringparam groupbyday no \
|
||||
--stringparam include-rev no \
|
||||
"$(srcdir)/svn2cl.xsl" - > ChangeLog.tmp; \
|
||||
else \
|
||||
echo "Warning: Unable to generate ChangeLog from none svn checkout" >&2; \
|
||||
echo > ChangeLog.tmp; \
|
||||
fi
|
||||
mv ChangeLog.tmp ChangeLog
|
||||
|
||||
else
|
||||
|
||||
wiki.out/*: $(abs_builddir)/wiki.out
|
||||
$(abs_builddir)/wiki.out:
|
||||
$(LN_S) "$(srcdir)/wiki.out" wiki.out
|
||||
|
||||
ChangeLog:
|
||||
$(LN_S) "$(srcdir)/ChangeLog" ChangeLog
|
||||
|
||||
endif
|
||||
|
||||
distclean-local:
|
||||
-rm -rf wiki.tmp
|
||||
if test -L wiki.out; then \
|
||||
rm -fr wiki.out; \
|
||||
fi
|
||||
-rm -fr ChangeLog.tmp
|
||||
if test -L ChangeLog; then \
|
||||
rm -fr ChangeLog; \
|
||||
fi
|
||||
|
||||
maintainer-clean-local:
|
||||
-rm -rf "$(srcdir)/wiki.out"
|
||||
-rm -rf "$(srcdir)/ChangeLog"
|
|
@ -1,72 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
test -z "$XSLTPROC" && XSLTPROC="xsltproc"
|
||||
test -z "$WGET" && WGET="wget"
|
||||
test -z "$WGET_OPTS" && WGET_OPTS="$WGET_OPTS"
|
||||
test -z "$SED" && SED="sed"
|
||||
test -z "$TR" && TR="tr"
|
||||
|
||||
test -z "$SERVER" && SERVER="http://www.opensc-project.org"
|
||||
test -z "$PROJECT" && PROJECT="opensc"
|
||||
|
||||
SRCDIR=.
|
||||
OUTDIR=.
|
||||
test -n "$1" && SRCDIR="$1"
|
||||
test -n "$2" && OUTDIR="$2"
|
||||
|
||||
WIKI="$PROJECT/wiki"
|
||||
XSL="$SRCDIR/export-wiki.xsl"
|
||||
|
||||
test -f "$SRCDIR"/`basename $0`
|
||||
|
||||
test -e "$OUTDIR" && rm -fr "$OUTDIR"
|
||||
|
||||
mkdir "$OUTDIR" || exit 1
|
||||
|
||||
$WGET $WGET_OPTS $SERVER/$WIKI/TitleIndex -O "$OUTDIR"/TitleIndex.tmp
|
||||
|
||||
$SED -e "s#</li>#</li>\n#g" < "$OUTDIR"/TitleIndex.tmp \
|
||||
| grep "\"/$WIKI/[^\"]*\"" \
|
||||
|$SED -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \
|
||||
> "$OUTDIR"/WikiWords.tmp
|
||||
$SED -e /^Trac/d -e /^Wiki/d -e /^TitleIndex/d -e /^RecentChanges/d \
|
||||
-e /^CamelCase/d -e /^SandBox/d -e /^InterMapTxt/d -e /^InterWiki/d \
|
||||
-e /^InterTrac/d -i "$OUTDIR"/WikiWords.tmp
|
||||
|
||||
|
||||
for A in WikiStart `cat "$OUTDIR"/WikiWords.tmp`
|
||||
do
|
||||
F=`echo $A|$SED -e 's/\//_/g'`
|
||||
$WGET $WGET_OPTS $SERVER/$WIKI/$A -O "$OUTDIR"/$F.tmp
|
||||
$XSLTPROC --nonet --output "$OUTDIR"/$F.html "$XSL" "$OUTDIR"/$F.tmp
|
||||
$SED -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \
|
||||
-i "$OUTDIR"/$F.html
|
||||
done
|
||||
|
||||
mv "$OUTDIR"/WikiStart.html "$OUTDIR"/index.html
|
||||
|
||||
$WGET $WGET_OPTS http://www.opensc-project.org/trac/css/trac.css \
|
||||
-O "$OUTDIR"/trac.css
|
||||
|
||||
cat "$OUTDIR"/*.html |grep "<img src=\"/$PROJECT/attachment/wiki" \
|
||||
|$SED -e 's/.*<img src="\/'$PROJECT'\/attachment\/wiki\/\([^"]*\)?format=raw".*/\1/g' \
|
||||
|sort -u |while read A
|
||||
do
|
||||
B="`echo $A |$TR / _`"
|
||||
$WGET $WGET_OPTS "$SERVER/$PROJECT/attachment/wiki/$A?format=raw" -O "$OUTDIR"/$B
|
||||
for C in "${OUTDIR}"/*.html
|
||||
do
|
||||
$SED -e 's#\/'$PROJECT'\/attachment\/wiki\/'$A'?format=raw#'$B'#g' -i "$C"
|
||||
done
|
||||
done
|
||||
|
||||
for A in "${OUTDIR}"/*.html
|
||||
do
|
||||
$SED -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \
|
||||
-i $A
|
||||
done
|
||||
|
||||
rm "$OUTDIR"/*.tmp
|
||||
exit 0
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/html:html">
|
||||
<html>
|
||||
<head>
|
||||
<title><xsl:value-of select="/html:html/html:head/html:title" /></title>
|
||||
<style type="text/css">
|
||||
@import url(trac.css);
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:apply-templates select="//html:div[@class='wiki']" />
|
||||
<div class="footer">
|
||||
<hr />
|
||||
<p><a href="index.html">Back to Index</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/pages">
|
||||
<html>
|
||||
<head>
|
||||
<title>Wiki Index</title>
|
||||
<style type="text/css">
|
||||
@import url(trac.css);
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Index of Wiki Pages</h1>
|
||||
<ul>
|
||||
<xsl:apply-templates select="page" />
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="page">
|
||||
<li><a href="{.}.html"><xsl:value-of select="." /></a></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node()|@*" priority="-1">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Loading…
Reference in New Issue