Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 # Definition of weights for each family font.
4 weights = Black ExtraBold Bold SemiBold Neutral Medium Light ExtraLight Thin
5 weights += Extrabold Semibold Extralight
6 weights := $(weights) $(patsubst %,%Italic,$(weights))
7 weights := $(weights) $(foreach distortion,ExtraCondensed Condensed SemiCondensed,$(patsubst %,$(distortion)%,$(weights)))
8 weights := $(patsubst Neutral,Regular,$(weights))
9
10 # Weights for -extra packages.
11 EXTRA_WEIGHTS := -XBlack -XExtraBold -XExtrabold -XSemiBold -XSemibold -XMedium -XLight -XExtraLight -XThin -XCondensed -XExtraCondensed
12
13 SUBSTVARS_PKGS := fonts-noto-core fonts-noto-extra fonts-noto-ui-core fonts-noto-ui-extra fonts-noto-unhinted
14
15 %:
16 dh $@
17
18 override_dh_bugfiles:
19 # Force bug installation in all packages.
20 dh_bugfiles --all
21
22 override_dh_install:
23 # Fill the hinted-udeb package.
24 find . -path ./debian -prune -o \( \
25 -name "NotoSansSinhala-Regular.ttf" -o \
26 -name "NotoSansSinhala-Bold.ttf" -o \
27 -name "NotoSerifGujarati-Regular.ttf" -o \
28 -name "NotoSerifGujarati-Bold.ttf" \
29 \) -print | xargs -I {} dh_install -pfonts-noto-hinted-udeb {} usr/share/fonts/truetype/noto/
30
31 # Fill the unhinted-udeb package.
32 find . -path ./debian -prune -o -type f -name "*.ttf" -print | \
33 grep -E "Noto(Kufi|Looped|Music|Naskh|Nastaliq|Rashi|Sans|Serif|Traditional|Math|Mono|Symbols|TamilSupplement)" | \
34 grep -vE "(UI|VF|Condensed|Semi|Medium|Thin|Black|Light)" | \
35 grep -vE "NotoSansTibetan-(Bold|Regular)\.ttf" | \
36 grep -E "\-(Regular|Bold|Italic|BoldItalic|Slanted|Slanted-Bold)\.ttf$$" | \
37 sort | \
38 xargs -I {} dh_install -pfonts-noto-unhinted-udeb {} usr/share/fonts/truetype/noto/
39
40 # Fill the fonts-noto*.deb packages.
41 dh_install -pfonts-noto-mono
42 dh_install -pfonts-croscore
43 dh_install -pfonts-noto-ui-core -XMono $(EXTRA_WEIGHTS)
44 dh_install -pfonts-noto-core -XUI -XMono $(EXTRA_WEIGHTS)
45 dh_install -pfonts-noto-extra -XUI
46 dh_install -pfonts-noto-ui-extra
47 dh_install --remaining-packages
48
49 override_dh_gencontrol:
50 # Dynamically generates the list of font families for the description of each package.
51 for pkg in $$(dh_listpackages); do \
52 if [ -d debian/$$pkg/usr/share/fonts/truetype/noto ]; then \
53 LIST=$$(find debian/$$pkg/usr/share/fonts/truetype/noto -name "*.ttf" | \
54 xargs -r otfinfo -a | cut -d: -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$$//' | LC_ALL=C sort -u | \
55 tr '\n' ',' | sed 's/,$$//; s/,/\$${Newline} * /g'); \
56 echo "fonts:familylist= * $$LIST" > debian/$$pkg.substvars; \
57 fi; \
58 done
59 dh_gencontrol -- -Vfonts:scriptcount="103"