summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shadura <andrewsh@debian.org>2015-11-06 17:37:09 +0100
committerAndrew Shadura <andrewsh@debian.org>2015-11-06 17:37:09 +0100
commitcb4e3abaa6fadb95f54963f1eaca297232a342ab (patch)
tree86b7dde4ebd385c9163b1c7a69dc87c4aeadbbe9
parent3b347162d1075641689197e74c0184a553926b15 (diff)
Recreate the tarball fully automatically, detect any missing old fonts
-rwxr-xr-xdebian/rules34
1 files changed, 29 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules
index 6a68d33..10de564 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,10 @@
%:
dh $@
+O=http://snapshot.debian.org/archive/debian/20110720T033111Z/pool/main/t/ttf-ancient-fonts/ttf-ancient-fonts_2.57.orig.tar.gz
+FO=$(lastword $(subst /, ,$O))
+DO=$(P)-obsolete.orig
+
P=ttf-ancient-fonts
V=2.58
U=http://users.teilar.gr/~g1951d/
@@ -16,24 +20,44 @@ Z=Aegean.zip \
Musica.zip \
Analecta.zip \
+DN=$(P)-$(V).orig
+
override_dh_install:
dh_install -pfonts-ancient-scripts -XSymbola
dh_install --remaining-packages
get-orig-source:
+ wget -c $(O) -O $(FO)
+ mkdir -p $(DO)
+ tar zxf $(FO) -C $(DO) --strip-components=1
+ rm -f $(FO)
+ ls $(DO) | grep -o '^[A-Z][a-z]*' | uniq > $(DO)/list
for f in $(Z) ; do \
- wget -O $$f $(U)$$f ; \
+ wget -c -O $$f $(U)$$f ; \
# Some files are duplicated so we need -o \
- unzip -o -d $(P)-$(V).orig $$f ; \
+ unzip -o -d $(DN) $$f ; \
rm -f $$f ; \
done
+ # Fix up the font name until the upstream fixes it
+ for f in $(DN)/Alexaner*; do \
+ t=$$(echo $$f | sed s,Alexaner,Alexander,g) ; \
+ mv $$f $$t ; \
+ done
# We prefer UTF-8 LF text files, convert them using iconv, tr
- find $(P)-$(V).orig -iname '*.txt' -print0 | xargs -0 -I_ sh -c "iconv -f UTF-16 -t UTF-8 _ | tr -d '\r' > _.tmp && mv _.tmp _"
+ find $(DN) -iname '*.txt' -print0 | xargs -0 -I_ sh -c "iconv -f UTF-16 -t UTF-8 _ | tr -d '\r' > _.tmp && mv _.tmp _"
# PDFs are produced using Microsoft Word and no
# Word files (source code) are published for them
# so we have to remove them as per DFSG item 2.
- rm -f $(P)-$(V).orig/*.pdf
+ rm -f $(DN)/*.pdf $(DN)/*.doc* $(DN)/*.xls*
+ ls $(DN) | grep -o '^[A-Z][a-z]*' | uniq > $(DN)/list
+ diff=$$(cat $(DO)/list $(DN)/list | sort | uniq -u) ; \
+ for f in $$diff ; do \
+ for j in $(DO)/$$f*; do \
+ [ -e $$j ] && cp $$j $(DN) ; \
+ done || true ; \
+ done
+ rm -f $(DO)/list $(DN)/list
tar zcf $(P)_$(V).orig.tar.gz $(P)-$(V).orig
- rm -rf $(P)-$(V).orig
+ rm -rf $(DO) $(DN)
.PHONY: override_dh_install get-orig-source