blob: 83d1addedde5632683286949686c68f690121902 (
plain)
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
|
TEXFLAGS ?= -halt-on-error -output-format pdf -output-directory output
TITLE = How_Replicant_uses_Guix
.PHONY: all clean medias archive
###############
# Phony rules #
###############
all: output/$(TITLE).pdf
archive:
git archive --format=tar --prefix=LibrePlanet2022/ HEAD -o LibrePlanet2022.tar
clean:
rm -rf output
################
# Main targets #
################
output:
mkdir -p output
output/$(TITLE).pdf: \
$(TITLE).tex \
output \
output/4-freedoms.jpg \
output/android_logo.jpg \
output/anti_drm_protest.jpg \
output/anti_smartphones.jpg \
output/electronic_waste_small.jpg \
output/F-Droid_Logo_4.jpg \
output/framework.jpg \
output/googlag_small.jpg \
output/i9300_hardware.jpg \
output/phist.jpg \
output/raised_fist_small.jpg \
output/replicant_logo.jpg \
output/smart_phones_shop_small.jpg \
output/telephony-stack_hardware.jpg \
output/telephony-stack_software.jpg \
output/we_can_do_it_small.jpg \
output/the_leader_of_the_luddites_small.jpg \
output/wifi.jpg \
output/worker.jpg
pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}'
@echo skipping pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}'
du -hs $@
##############################
# Automatic depdencies rules #
##############################
output/%.jpg: ../Guix-birthday-2022/dot/%.dot
mkdir -p output
dot -T jpg $< > $@
output/%.jpg: ../common/images/%.jpg output
gm convert $< $@
output/%.jpg: ../common/images/%.png output
gm convert $< $@
output/%.jpg: ../common/images/%.svg output
gm convert $< $@
# Space saved:
# - smart_phones_shop.jpg: from 3.0M to 243K
# - googlag.jpg: from 2.4M to 101K
output/%_small.jpg: ../common/images/%.jpg
gm convert -resize 25% -quality 80 $< $@
#################################
# Images with specific settings #
#################################
# -resize and -quality makes the image go from 1.1M to 48k
output/i9300_hardware.jpg: ../common/images/i9300_hardware.svg output
gm convert $< $@
output/replicant_logo.jpg: ../external_resources/vendor_replicant_artwork/replicant_logo_white.png output
gm convert $< $@
output/wifi.jpg: \
../common/images/tehnoetic-n150-mini-wifi-adapter-back-500x500.png \
../common/images/tet-otg-side-500x500.jpg \
../common/images/Wifi.png
mkdir -p output
gm convert -append -gravity center $? $@
|