File: rules

package info (click to toggle)
tipa 2%3A1.3-21
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 21,472 kB
  • sloc: sh: 425; makefile: 114; perl: 21
file content (109 lines) | stat: -rwxr-xr-x 2,763 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/make -f
# debian/rules file for Debian package tipa
# GNU Copyright Rafael Laboissiere (C) 1998-2009
# $Id$

debdir   := $(CURDIR)/debian
debtmp   := $(debdir)/tipa
debetc   := $(debdir)/etc
debtexmf := $(debtmp)/usr/share/texmf

debxfnt  := $(CURDIR)/debian/xfonts-tipa/usr/share/fonts/X11
debxt1   := $(debxfnt)/Type1
debscdir := $(CURDIR)/debian/xfonts-tipa/etc/X11/fonts/Type1

CHANGELOG = $(dir $(firstword $(MAKEFILE_LIST)))/changelog
UPSTREAM_VERSION = \
	$(shell perl -ne '/([\d.]+)-/; print $$1; exit' < $(CHANGELOG))
ORIG_TARBALL = tipa_$(UPSTREAM_VERSION).orig.tar.gz
UPSTREAM_DIR = tipa-$(UPSTREAM_VERSION)

#export GZIP = -9n
export TAR_OPTIONS = --owner root --group root --mode a+rX,g-w

get-orig-source: $(ORIG_TARBALL)
$(ORIG_TARBALL):
	set -e -x; \
	tmpdir=$$(mktemp -d); \
	cd "$$tmpdir"; \
	wget ftp://tug.ctan.org/pub/tex-archive/fonts/tipa.zip;	\
	unzip -x tipa.zip; \
	mv tipa/$(UPSTREAM_DIR) .; \
	mv tipa/tipaface.pdf $(UPSTREAM_DIR)/doc; \
	tar  -czf $(ORIG_TARBALL) $(UPSTREAM_DIR); \
	mv $(ORIG_TARBALL) $(CURDIR)/; \
	cd /; \
	rm -rf "$$tmpdir"

# The following pattern rules is necessary for building the TIPA
# documentation and the example
%.pdf: %.tex
	export TEXINPUTS=../sty: TEXFONTMAPS=../dvips: 	\
		TFMFONTS=../tfm: T1FONTS=../type1: && \
	  pdflatex '\pdfmapfile{+tipa.map}\input{$<}' && \
	  pdflatex '\pdfmapfile{+tipa.map}\input{$<}'

docs: tipaman.pdf vowel.pdf

build build-indep: build-stamp
build-arch: ;
build-stamp:
	dh_testdir
	set -e; cd type1 ; \
	  echo Building afm files... ; \
	  for i in *.pfb ; do \
	    pf2afm $$i > /dev/null ; \
	    echo `basename $$i .pfb`.afm ; \
	  done
	# This will build the documentation
	cd doc && $(MAKE) -f ../debian/rules docs
	touch build-stamp

clean:
	dh_testdir
	#dh_testroot
	$(MAKE) clean
	# remove generated pdf files
	rm -f doc/tipaman.pdf doc/vowel.pdf
	dh_clean

binary-indep: build-indep
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs --package=xfonts-tipa		\
		usr/share/fonts/X11/Type1		\
		etc/X11/fonts/Type1

	$(MAKE) install PREFIX=$(debtexmf) MAPDIR=$(debtexmf)/fonts/map/dvips
        # Fixes bug reported by lintian
	chmod +x $(debtexmf)/fonts/source/fkr/tipa/*.sh
	cp 00README changelog

	perl debian/gen-fonts-dir.pl \
	  ../../../texmf/fonts/type1/fkr/tipa \
	  $(debxt1) \
	  $(debscdir)/xfonts-tipa.scale \
	  debian/xfonts-tipa.defoma-hints

	#install --mode=644 debian/tipa.updmap $(debupdm)/10tipa.cfg
	dh_installtex -p tipa map=MixedMap,tipa.map

	dh_installxfonts -p xfonts-tipa

	dh_installdocs
	dh_link
	dh_installchangelogs
	dh_compress -X.pdf
	dh_fixperms
	dh_installdeb

	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: ;

binary: binary-indep

.PHONY: build-arch build-indep build clean binary-indep binary-arch binary