Debian Codegraph @

debian/rules

raw symbols SCIP
1 #! /usr/bin/make -f
2
3 PKG := tex-gyre
4 PKGFONTS := fonts-texgyre
5 PKGMATH := fonts-texgyre-math
6 PKG_INSTALL_DIR := debian/$(PKG)
7 PKGFONTS_INSTALL_DIR := debian/$(PKGFONTS)
8 PKGMATH_INSTALL_DIR := debian/$(PKGMATH)
9
10 FAMILIES := qag qbk qzc qcr qcs qhv qpl qtm
11 FAMILYNAMES := Adventor Bonum Chorus Cursor Heros Pagella \
12 Schola Termes
13
14 INSTALL := install
15 INSTALL_FILE := $(INSTALL) -p -o root -g root -m 644
16
17
18 SHELL := /bin/bash
19
20 ^build: build-arch build-indep
21 # We have nothing to do here but the Debian Policy says this target must
22 # exist.
23
24 build-arch:
25 # Nothing to do here
26
27 build-indep: build-indep-stamp
28
29 build-indep-stamp:
30 dh_testdir fonts/type1/public/tex-gyre/qtmr.pfb tex/latex/tex-gyre/tgtermes.sty
31 # Warn the person building the package if new files were added
32 # to the .orig.tar.gz + .diff.gz that this script is not aware of.
33 @newfiles=$$(find . -type f | grep -Ev \
34 -e '^\./.git/' \
35 -e '^\./.pc/' \
36 -e '^\./debian/' \
37 -e '^\./tlpkg/' \
38 -e '^\./fonts/type1/public/tex-gyre/[^/]*\.pf[bm]$$' \
39 -e '^\./fonts/afm/public/tex-gyre/[^/]*\.afm$$' \
40 -e '^\./fonts/tfm/public/tex-gyre/[^/]*\.tfm$$' \
41 -e '^\./fonts/map/dvips/tex-gyre/[^/]*\.map$$' \
42 -e '^\./fonts/enc/dvips/tex-gyre/[^/]*\.enc$$' \
43 -e '^\./fonts/opentype/public/tex-gyre/[^/]*\.otf$$' \
44 -e '^\./fonts/opentype/public/tex-gyre-math/[^/]*\.otf$$' \
45 -e '^\./tex/latex/tex-gyre/[^/]*\.(fd|sty)$$' \
46 -e '^\./source/fonts/tex-gyre-math/texgyredejavu-math\.sfd$$' \
47 -e '^\./doc/fonts/tex-gyre-math/[^/]*\.(tex|pdf|txt|fea|docx)$$' \
48 -e '^\./doc/fonts/tex-gyre-math/README$$' \
49 -e '^\./source/fonts/tex-gyre/[^/]*\.(fea|sfd)$$' \
50 -e '^\./doc/fonts/tex-gyre/[^/]*\.(tex|pdf|txt|fea|nam)$$' || true) && \
51 if [ -n "$$newfiles" ]; then \
52 { echo "New files were found in the patched tarball" \
53 "(.orig.tar.gz + .diff.gz):"; \
54 echo "$$newfiles" | sed 's/^\(.*\)$$/ \1/'; \
55 echo; \
56 echo "Please update the debian/rules file accordingly."; \
57 } >&2; \
58 exit 1; \
59 fi
60
61 # Upstream provides <texmf>/fonts/map/dvips/tex-gyre/q??.map that
62 # should be equivalent to all the encoding-specific map files in
63 # <texmf>/fonts/map/dvips/tex-gyre/
64 # Let's check if this is really the case.
65 @export LC_COLLATE=C && for fam in $(FAMILIES) ; do \
66 a=$$(find fonts/map/dvips/tex-gyre -name "$$fam-*.map" \
67 -print0 | xargs -0r cat | grep -Ev -e '^(%|[[:space:]]*$$)' \
68 | sort) \
69 && b=$$(sort < fonts/map/dvips/tex-gyre/$$fam.map | grep -Ev -e \
70 '^(%|[[:space:]]*$$)') \
71 && if [ "$$a" != "$$b" ]; then \
72 { echo; \
73 echo "Warning: fonts/map/dvips/tex-gyre/$$fam.map does not appear to" \
74 "be equivalent to"; \
75 echo "the concatenation of the other family's map files found in" \
76 "fonts/map/dvips/tex-gyre/."; \
77 echo; \
78 } >&2; \
79 fi ; \
80 done
81
82 # Generate $(PKG).scale from $(PKG).x-names
83 # count two times the number of fonts for total number of lines, since we generate
84 # entries for both iso8859-1 and -15
85 ( cat debian/$(PKG).x-names ; cat debian/$(PKG).x-names ) | wc -l > debian/$(PKG).scale
86 cat debian/$(PKG).x-names | while read f a ; do \
87 echo "$$f.pfb -unregistered-$$a-0-0-0-0-p-0-iso8859-1"; \
88 echo "$$f.pfb -unregistered-$$a-0-0-0-0-p-0-iso8859-15"; \
89 done >> debian/$(PKG).scale
90
91 cat debian/$(PKG).x-names | while read f a ; do \
92 echo "usr/share/texmf/fonts/type1/public/tex-gyre/$$f.pfb usr/share/fonts/X11/Type1/$$f.pfb" ; \
93 echo "usr/share/texmf/fonts/afm/public/tex-gyre/$$f.afm usr/share/fonts/X11/Type1/$$f.afm" ; \
94 done > debian/$(PKG).links
95
96 touch build-indep-stamp
97
98 clean:
99 dh_testdir fonts/type1/public/tex-gyre/qtmr.pfb tex/latex/tex-gyre/tgtermes.sty
100 dh_testroot
101 # debian/$(PKG).links/scale are automatically generated from the list of
102 # fonts to declare to X11 among other things, so we have to delete
103 # them here.
104 rm -f build-indep-stamp "debian/$(PKG).scale" "debian/$(PKG).links"
105 dh_clean
106
107 binary-indep: build-indep
108 dh_testdir fonts/type1/public/tex-gyre/qtmr.pfb tex/latex/tex-gyre/tgtermes.sty
109 dh_testroot
110 dh_clean
111
112 dh_install
113 dh_installtex --package=$(PKG) mapfile=debian/tex-gyre.cfg
114
115 $(foreach PPP, $(PKG) $(PKGFONTS), \
116 dh_link -p $(PPP) \
117 $(foreach FAM, $(FAMILYNAMES), \
118 usr/share/texmf/doc/fonts/tex-gyre/README-TeX-Gyre-$(FAM).txt \
119 usr/share/doc/$(PPP)/README-TeX-Gyre-$(FAM).txt) \
120 $(foreach FAM, $(FAMILIES), \
121 usr/share/texmf/doc/fonts/tex-gyre/$(FAM)-info.pdf \
122 usr/share/doc/$(PPP)/$(FAM)-info.pdf) \
123 $(foreach FAM, $(FAMILIES), \
124 usr/share/texmf/doc/fonts/tex-gyre/$(FAM)-hist.txt \
125 usr/share/doc/$(PPP)/$(FAM)-hist.txt) \
126 ; )
127
128 dh_link \
129 usr/share/texmf/doc/fonts/tex-gyre-math/README-TeX-Gyre-Bonum-Math.txt \
130 usr/share/doc/$(PKGMATH)/README-TeX-Gyre-Bonum-Math.txt \
131 usr/share/texmf/doc/fonts/tex-gyre-math/README-TeX-Gyre-Pagella-Math.txt \
132 usr/share/doc/$(PKGMATH)/README-TeX-Gyre-Pagella-Math.txt \
133 usr/share/texmf/doc/fonts/tex-gyre-math/README-TeX-Gyre-Schola-Math.txt \
134 usr/share/doc/$(PKGMATH)/README-TeX-Gyre-Schola-Math.txt \
135 usr/share/texmf/doc/fonts/tex-gyre-math/README-TeX-Gyre-Termes-Math.txt \
136 usr/share/doc/$(PKGMATH)/README-TeX-Gyre-Termes-Math.txt \
137 usr/share/texmf/doc/fonts/tex-gyre-math/README-TeX-Gyre-DejaVu-Math.txt \
138 usr/share/doc/$(PKGMATH)/README-TeX-Gyre-DejaVu-Math.txt
139
140 dh_link -p $(PKGFONTS) \
141 etc/fonts/conf.avail/65-$(PKGFONTS).conf \
142 etc/fonts/conf.d/65-$(PKGFONTS).conf
143
144 dh_link -p $(PKGMATH) \
145 etc/fonts/conf.avail/65-$(PKGMATH).conf \
146 etc/fonts/conf.d/65-$(PKGMATH).conf
147
148 dh_installxfonts
149 dh_installdocs debian/VERSIONS
150 dh_installchangelogs
151 dh_lintian
152 dh_compress -X.pdf
153 dh_fixperms
154 dh_installdeb
155 dh_gencontrol
156 dh_md5sums
157 dh_builddeb
158
159 binary-arch:
160 # We have nothing to do here but the Debian Policy says this target must
161 # exist.
162
163 binary: binary-indep binary-arch
164
165 .PHONY: clean build build-arch build-indep binary binary-indep binary-arch