-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile.j2
94 lines (77 loc) · 5.16 KB
/
Makefile.j2
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
# Clean up build artifacts
.PHONY: clean-{{ langcode }}
clean-{{ langcode }}: clean-branding-{{ langcode }} ## Remove build artifacts from output directory (Antora and PDF)
$(call clean-function,translations/{{ langcode }},{{ langcode }})
.PHONY: clean-branding-{{ langcode }}
clean-branding-{{ langcode }}:
$(call clean-branding,{{ langcode }})
.PHONY: copy-branding-{{ langcode }}
copy-branding-{{ langcode }}: copy-branding
$(call copy-branding,{{ langcode }})
.PHONY: configure-suma-branding-dsc-{{ langcode }}
configure-suma-branding-dsc-{{ langcode }}: configure-suma-branding-dsc
$(call configure-suma-branding-dsc,{{ langcode }})
.PHONY: configure-suma-branding-webui-{{ langcode }}
configure-suma-branding-webui-{{ langcode }}: configure-suma-branding-webui
$(call configure-suma-branding-webui,{{ langcode }})
.PHONY: validate-suma-{{ langcode }}
validate-suma-{{ langcode }}:
$(call validate-product,translations/{{ langcode }},suma-site.yml)
.PHONY: pdf-tar-suma-{{ langcode }}
pdf-tar-suma-{{ langcode }}:
$(call pdf-tar-product,{{ langcode }},susemanager-docs_{{ langcode }}-pdf,$(current_dir)/build/{{ langcode }}/pdf)
.PHONY: set-html-language-selector-suma-{{ langcode }}
set-html-language-selector-suma-{{ langcode }}: set-html-language-selector-suma
mkdir -p $(shell dirname translations/{{ langcode }}/$(SUPPLEMENTAL_FILES_SUMA))
cp -a translations/$(SUPPLEMENTAL_FILES_SUMA) translations/{{ langcode }}/$(SUPPLEMENTAL_FILES_SUMA)
.PHONY: prepare-antora-suma-{{ langcode }}
prepare-antora-suma-{{ langcode }}: copy-branding-{{ langcode }} set-html-language-selector-suma-{{ langcode }}
cd $(current_dir)
mkdir -p $(current_dir)/translations/{{ langcode }} && \
cp -a antora.yml translations/{{ langcode }}/antora.yml && \
sed "s/\(url\:\ https\:\/\/documentation\.suse\.com\/suma\/4\.3\/\)/\1{{ langcode }}\//;\
s/\-\ url\:\ \./\-\ url\:\ \.\.\/\.\.\//;\
s/start_path\:\ \./\start_path\:\ translations\/{{ langcode }}/;\
s/dir:\ \.\/build\/en/dir:\ \.\.\/\.\.\/build\/{{ langcode }}/;" site.yml > translations/{{ langcode }}/suma-site.yml && \
cp -a $(current_dir)/modules $(current_dir)/translations/en/
find modules/ -maxdepth 1 -name "*" -type d -exec mkdir -p $(current_dir)/translations/{{ langcode }}/{} \; && \
mkdir -p $(current_dir)/translations/{{ langcode }}/modules/ROOT/pages/
cp -a $(current_dir)/modules/ROOT/pages/common_gfdl1.2_i.adoc $(current_dir)/translations/{{ langcode }}/modules/ROOT/pages/
cd $(current_dir)
.PHONY: antora-suma-{{ langcode }}
antora-suma-{{ langcode }}: configure-suma-branding-dsc-{{langcode}} prepare-antora-suma-{{ langcode }} pdf-all-suma-{{ langcode }} pdf-tar-suma-{{ langcode }}
$(call antora-suma-function,translations/{{ langcode }},{{ langcode }})
.PHONY: obs-packages-suma-{{ langcode }}
obs-packages-suma-{{ langcode }}: configure-suma-branding-webui-{{langcode}} pdf-all-suma-{{ langcode }} antora-suma-{{ langcode }} ## Generate SUMA OBS tar files
$(call obs-packages-product,{{ langcode }},{{ langcode }}/pdf,susemanager-docs_{{ langcode }},susemanager-docs_{{ langcode }}-pdf)
# UYUNI
.PHONY: validate-uyuni-{{ langcode }}
validate-uyuni-{{ langcode }}:
$(call validate-product,translations/{{ langcode }},uyuni-site.yml)
.PHONY: pdf-tar-uyuni-{{ langcode }}
pdf-tar-uyuni-{{ langcode }}:
$(call pdf-tar-product,{{ langcode }},uyuni-docs_{{ langcode }}-pdf,$(current_dir)/build/{{ langcode }}/pdf)
.PHONY: set-html-language-selector-uyuni-{{ langcode }}
set-html-language-selector-uyuni-{{ langcode }}: set-html-language-selector-uyuni
mkdir -p $(shell dirname translations/{{ langcode }}/$(SUPPLEMENTAL_FILES_UYUNI))
cp -a translations/$(SUPPLEMENTAL_FILES_UYUNI) translations/{{ langcode }}/$(SUPPLEMENTAL_FILES_UYUNI)
.PHONY: prepare-antora-uyuni-{{ langcode }}
prepare-antora-uyuni-{{ langcode }}: copy-branding-{{ langcode }} set-html-language-selector-uyuni-{{ langcode }}
cd $(current_dir)
mkdir -p $(current_dir)/translations/{{ langcode }} && \
cp antora.yml translations/{{ langcode }}/antora.yml && \
sed "s/\(url\:\ https\:\/\/www\.uyuni-project\.org\/uyuni-docs\/\)/\1{{ langcode }}\//;\
s/\-\ url\:\ \./\-\ url\:\ \.\.\/\.\.\//;\
s/start_path\:\ \./\start_path\:\ translations\/{{ langcode }}/;\
s/dir:\ \.\/build\/en/dir:\ \.\.\/\.\.\/build\/{{ langcode }}/;" site.yml > translations/{{ langcode }}/uyuni-site.yml && \
cp -a $(current_dir)/modules $(current_dir)/translations/en/
find modules/ -maxdepth 1 -name "*" -type d -exec mkdir -p $(current_dir)/translations/{{ langcode }}/{} \; && \
mkdir -p $(current_dir)/translations/{{ langcode }}/modules/ROOT/pages/
cp -a $(current_dir)/modules/ROOT/pages/common_gfdl1.2_i.adoc $(current_dir)/translations/{{ langcode }}/modules/ROOT/pages/
cd $(current_dir)
.PHONY: antora-uyuni-{{ langcode }}
antora-uyuni-{{ langcode }}: prepare-antora-uyuni-{{ langcode }} pdf-all-uyuni-{{ langcode }} pdf-tar-uyuni-{{ langcode }}
$(call antora-uyuni-function,translations/{{ langcode }},{{ langcode }})
.PHONY: obs-packages-uyuni-{{ langcode }}
obs-packages-uyuni-{{ langcode }}: pdf-all-uyuni-{{ langcode }} antora-uyuni-{{ langcode }} ## Generate UYUNI OBS tar files
$(call obs-packages-product,{{ langcode }},{{ langcode }}/pdf,uyuni-docs_{{ langcode }},uyuni-docs_{{ langcode }}-pdf)