reduce building time
gyx authored 9 years ago
Guo Yixuan committed 9 years ago
5 | 5 | |
6 | 6 | override_dh_auto_clean: |
7 | 7 | dh_auto_clean |
8 | rm -rf data essay.kct | |
8 | rm -rf data essay.kct default.custom.yaml | |
9 | 9 | |
10 | 10 | override_dh_auto_build: |
11 | 11 | # librime 1.2 needs essay.txt |
12 | 12 | mkdir -p data |
13 | 13 | cp -v essay.txt data |
14 | ||
15 | # create a default.custom.yaml here, and use it | |
16 | # to build all the schemas | |
17 | echo "patch:" > default.custom.yaml | |
18 | echo " schema_list:" >> default.custom.yaml | |
19 | find -name '*.schema.yaml' \ | |
20 | | xargs -l1 basename -s .schema.yaml \ | |
21 | | perl -pe 's/^/ - schema: /' \ | |
22 | | sort | uniq >> default.custom.yaml | |
23 | cp -v default.custom.yaml data | |
24 | ||
25 | cp -v extra/*.yaml data | |
14 | 26 | dh_auto_build |
15 | cp -v extra/*.yaml data | |
16 | cd data; \ | |
17 | for schema in *.schema.yaml; \ | |
18 | do \ | |
19 | rime_deployer --compile $$schema; \ | |
20 | done; \ | |
21 | rm -fv *.prism.txt *.table.txt # unnecessary files | |
27 | # restore the original copy of default.yaml | |
28 | cp -v default.yaml data | |
29 | rm -fv data/default.custom.yaml | |
22 | 30 | |
23 | 31 | override_dh_install: |
24 | 32 | dh_install --fail-missing |