You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
144 lines
5.1 KiB
144 lines
5.1 KiB
# release script which generates a TDS zip file.
|
|
#
|
|
# DO NOT invoke this from a pgf directory,
|
|
# use
|
|
# make -f pgf/scripts/pgf/Makefile.pgf_release
|
|
#
|
|
# use
|
|
# make -f pgf/scripts/pgf/Makefile.pgf_release upload USER=cfeuersaenger
|
|
# to (a) create a current snapshot as-is and (b) upload it to
|
|
# http://pgf.sourceforge.net/
|
|
#
|
|
# Note that the index.php on sourceforge expects VERSION=_CVS .
|
|
#
|
|
|
|
VERSION=_$(shell git --git-dir=pgf/.git describe --abbrev=0 --tags)
|
|
|
|
USER=cfeuersaenger
|
|
|
|
ZIP=pgf$(VERSION).tds.zip
|
|
CTANZIP=pgf$(VERSION).ctan.flatdir.zip
|
|
PDF=pgf$(VERSION).pdf
|
|
CHANGELOG=pgf$(VERSION).ChangeLog
|
|
|
|
files: zip ctanzip pdf $(CHANGELOG)
|
|
|
|
zip: $(ZIP)
|
|
|
|
pdf: $(PDF)
|
|
|
|
upload: $(ZIP) $(PDF) $(CHANGELOG)
|
|
scp $^ $(USER),pgf@web.sourceforge.net:htdocs/
|
|
|
|
FORCE:
|
|
|
|
$(ZIP): FORCE
|
|
# collect into /tmp/pgf:
|
|
rm -fr /tmp/pgf /tmp/$@
|
|
rsync --copy-links \
|
|
--exclude=CVS \
|
|
--exclude=.git \
|
|
--exclude='.*.sw?' \
|
|
--exclude='*.aux' \
|
|
--exclude='*.log' \
|
|
--exclude='*~' \
|
|
--exclude='*.bbl' \
|
|
--exclude='*.blg' \
|
|
--exclude='*.idx' \
|
|
--exclude='*.ilg' \
|
|
--exclude='*.log' \
|
|
--exclude='*.ind' \
|
|
--exclude='*.toc' \
|
|
--exclude='*.out' \
|
|
--exclude='*.djs' \
|
|
--exclude='*.tmp' \
|
|
--exclude='*.tuo' \
|
|
--exclude='*.tui' \
|
|
--exclude='*.top' \
|
|
--exclude='*.pgf' \
|
|
--exclude='*.mp' \
|
|
--exclude='.#*' \
|
|
--exclude='.gitignore' \
|
|
--exclude='.cvsignore' \
|
|
--exclude='Makefile.pgf_release' \
|
|
-r pgf /tmp
|
|
# cleanup docs:
|
|
cp /tmp/pgf/doc/generic/pgf/version-for-luatex/en/pgfmanual.pdf /tmp/pgf/doc/generic/pgf/pgfmanual.pdf
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-dvipdfm/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-dvipdfmx/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-dvips/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-tex4ht/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-vtex/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-xetex/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-luatex/en clean
|
|
make -C /tmp/pgf/doc/generic/pgf/version-for-pdftex/en clean
|
|
# now restructure to get TDS:
|
|
cd /tmp/pgf; \
|
|
rm -f README.md; \
|
|
rm -f .travis.yml; \
|
|
rm -f .gitignore; \
|
|
rm -rf .github; \
|
|
rm -rf ci; \
|
|
rm -rf experiments; \
|
|
rm -rf scripts; \
|
|
rm -f doc/generic/pgf/version-for-dvips/en/pgfmanual-test*; \
|
|
rm -f doc/generic/pgf/version-for-dvisvgm/en/color.cfg; \
|
|
rm README; \
|
|
mv README-3.0.0 doc/generic/pgf;
|
|
# clean-up tests:
|
|
make -C /tmp/pgf/source/generic/pgf/testsuite/external clean
|
|
rm -f /tmp/pgf/source/generic/pgf/testsuite/mathtest/pgfmathtestsuite.pdf
|
|
# generate FILES file:
|
|
cd /tmp && find pgf -type f > /tmp/pgf/doc/generic/pgf/FILES
|
|
# generate zip archive:
|
|
cd /tmp/pgf && zip -r /tmp/$@ *
|
|
# copy archive to make target:
|
|
cp /tmp/$@ $@
|
|
# show file size(s)
|
|
find `pwd` -maxdepth 1 \( -name '$(@:.zip=)*' \) -ls
|
|
|
|
ctanzip: $(CTANZIP)
|
|
|
|
# code to satisfy http://www.ctan.org/upload ...
|
|
$(CTANZIP): $(ZIP)
|
|
cd /tmp && zip -r $(abspath $@) pgf pgf.tds.zip
|
|
rm -fr /tmp/pgf /tmp/pgf.ctan.tmp $@
|
|
mkdir -p /tmp/pgf /tmp/pgf.ctan.tmp
|
|
cd /tmp/pgf.ctan.tmp && unzip $(abspath $(ZIP))
|
|
mv /tmp/pgf.ctan.tmp/doc/generic/pgf/README /tmp/pgf
|
|
mv /tmp/pgf.ctan.tmp/doc/generic/pgf /tmp/pgf/doc
|
|
cp $(ZIP) /tmp/pgf.tds.zip
|
|
mkdir /tmp/pgf/tex
|
|
mkdir /tmp/pgf/source
|
|
find /tmp/pgf.ctan.tmp/tex \( -type f ! -name '*.lua' \) -exec mv -i {} /tmp/pgf/tex \;
|
|
#
|
|
# try to make the .lua files "browsable" without throwing all in one dir...
|
|
mkdir -p /tmp/pgf/lua/graphdrawing /tmp/pgf/lua/luamath /tmp/pgf/lua/generic
|
|
cd /tmp/pgf.ctan.tmp/tex/generic/pgf/graphdrawing/lua && find -name '*.lua' | rsync -r --include-from - . /tmp/pgf/lua/graphdrawing
|
|
cd /tmp/pgf.ctan.tmp/tex/generic/pgf/libraries/luamath && find -name '*.lua' | rsync -r --include-from - . /tmp/pgf/lua/luamath
|
|
cd /tmp/pgf.ctan.tmp/tex/generic/pgf/lua && find -name '*.lua' | rsync -r --include-from - . /tmp/pgf/lua/generic
|
|
#
|
|
find /tmp/pgf.ctan.tmp/tex -name '*.lua' -delete
|
|
find /tmp/pgf.ctan.tmp/source \( -type f ! -name Makefile \) -exec mv -i {} /tmp/pgf/source \;
|
|
find /tmp/pgf.ctan.tmp/source -name 'Makefile' -delete
|
|
#
|
|
# I suppose this here is more or less empty anyway, but who cares:
|
|
find /tmp/pgf.ctan.tmp/doc -type f -exec mv -i {} /tmp/pgf/doc \;
|
|
#
|
|
# CTAN wishes to not have empty directories (version-for-*/en/plots):
|
|
find /tmp/pgf/doc -type d -exec rmdir {} \; > /dev/null 2>&1 || true
|
|
#
|
|
@# for some reason, CVS checks out some of the math*.tex files as executable which confuses the CTAN file checker:
|
|
find /tmp/pgf/tex -type f -exec chmod 06444 {} \;
|
|
rm /tmp/pgf/doc/INSTALL
|
|
echo "Please search for pgf.tds.zip and install that one into a local texmf branch (which is typically simpler). This release is intended to satisfy CTAN package browsing policies." > /tmp/pgf/INSTALL_NOTES
|
|
@NUM_FILES=$$(find /tmp/pgf.ctan.tmp/ -type f |wc -l); \
|
|
if [ $$NUM_FILES -gt 0 ]; then echo "INTERNAL FAILURE: $$NUM_FILES FILES LEFT OVER IN /tmp/pgf.ctan.tmp! All must be included into $@. Left-overs:"; find /tmp/pgf.ctan.tmp/ -type f; exit 1; fi
|
|
cd /tmp && zip -r $(abspath $@) pgf pgf.tds.zip
|
|
|
|
$(CHANGELOG): FORCE
|
|
cp pgf/doc/generic/pgf/ChangeLog $(CHANGELOG)
|
|
|
|
$(PDF): pgf/doc/generic/pgf/version-for-luatex/en/pgfmanual.pdf
|
|
cp $< $@
|
|
|
|
|