-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
99 lines (86 loc) · 2.99 KB
/
Makefile
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
95
96
97
98
99
# Makefile for spell-be
# Copyright (C) 2012-2023 Mikalai Udodau
# This work is licensed under the Creative Commons
# Attribution-ShareAlike 3.0 Unported License.
# To view a copy of this license, visit
# http://creativecommons.org/licenses/by-sa/3.0/
# or send a letter to Creative Commons,
# 171 Second Street, Suite 300, San Francisco,
# California, 94105, USA.
VERSION_NUMBER=$(shell echo $$(head -n2 hunspell-dic/be_BY.affixes | tail -n1 | cut -c19-))
all: dict-zip dict-xpi dict-oxt
# This target removes comments - all but 5 lines - from affix file
head -n 5 hunspell-dic/be_BY.affixes > [email protected]
cut -d# -f1 hunspell-dic/be_BY.affixes \
| tr -s ' ' ' ' | tr -s '\12' '\12' | tail -n+2 \
# This target concatenates dictionary parts
# then counts words and put number in 1st line of dictionary
cat \
hunspell-dic/chasc.dic \
hunspell-dic/dzeeprym.dic \
hunspell-dic/dzeeprysl.dic \
hunspell-dic/dzejasl1.dic \
hunspell-dic/dzejasl2.dic \
hunspell-dic/lich.dic \
hunspell-dic/naz.dic \
hunspell-dic/naz1.dic \
hunspell-dic/naz2.dic \
hunspell-dic/naz3.dic \
hunspell-dic/prym.dic \
hunspell-dic/pryn.dic \
hunspell-dic/prysl.dic \
hunspell-dic/vykl.dic \
hunspell-dic/zajm.dic \
hunspell-dic/zluchn.dic \
hunspell-dic/ext-chim.dic \
hunspell-dic/ext-dzeeprym.dic \
hunspell-dic/ext-dzejasl1.dic \
hunspell-dic/ext-dzejasl2.dic \
hunspell-dic/ext-naz.dic \
hunspell-dic/ext-naz1.dic \
hunspell-dic/ext-naz2.dic \
hunspell-dic/ext-naz3.dic \
hunspell-dic/ext-prym.dic \
hunspell-dic/ext-pryn.dic \
hunspell-dic/ext-prysl.dic \
hunspell-dic/ext-zajm.dic \
hunspell-dic/geagraph.dic \
hunspell-dic/im1.dic \
hunspell-dic/im2.dic \
hunspell-dic/najm.dic \
hunspell-dic/prozv.dic \
hunspell-dic/pryst.dic \
hunspell-dic/sk.dic \
| sort | uniq > be_BY.dictionary
cat be_BY.dictionary | wc -l > [email protected]
cat be_BY.dictionary >> [email protected] && rm be_BY.dictionary
dict-zip: dict
zip -rq hunspell-be-tarask-$(VERSION_NUMBER).zip [email protected] [email protected]
dict-xpi: dict
cp [email protected] [email protected] dictionaries/
sed -i \
's/\"version\": \"[[:graph:]]*\.1w/\"version\": \"$(VERSION_NUMBER)\.1w/' \
manifest.json
zip -rq spell-be-tarask-$(VERSION_NUMBER).1.xpi \
manifest.json \
dictionaries/[email protected] dictionaries/[email protected] \
dictionaries/README_be_BY.txt
dict-oxt: dict
sed -i \
's/<version value=\"[[:graph:]]*\"/<version value=\"$(VERSION_NUMBER)\"/' \
description.xml
zip -rq dict-be-tarask-$(VERSION_NUMBER).oxt \
META-INF/manifest.xml README_spell_be_BY.txt \
[email protected] [email protected] description.xml dictionaries.xcu
rpm:
rpmbuild -v -bb --build-in-place hunspell-be-tarask.spec
clean:
rm -f [email protected] [email protected] hunspell-be-tarask-$(VERSION_NUMBER).zip \
dictionaries/[email protected] dictionaries/[email protected] \
spell-be-tarask-$(VERSION_NUMBER).1.xpi \
dict-be-tarask-$(VERSION_NUMBER).oxt
.PHONY: clean rpm