archrelease: copy trunk to extra-x86_64
[arch-packages.git] / hunspell-en / repos / extra-any / PKGBUILD
blob715422fb4cb9372d8ba37fcba67c353412b85601
1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
3 pkgbase=hunspell-en
4 pkgname=('hunspell-en_us' 'hunspell-en_au' 'hunspell-en_ca' 'hunspell-en_gb')
5 pkgver=2020.12.07
6 pkgrel=4
7 pkgdesc="English hunspell dictionaries"
8 arch=(any)
9 url="http://wordlist.aspell.net/dicts/"
10 license=('LGPL' 'custom:scowl')
11 makedepends=('qt6-webengine')
12 optdepends=('hunspell: the spell checking libraries and apps')
13 source=(https://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_US-large-$pkgver.zip
14         https://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_AU-large-$pkgver.zip
15         https://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_CA-large-$pkgver.zip
16         https://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_GB-large-$pkgver.zip
17         hunspell-en-allow-non-typographical.marks.patch)
18 sha512sums=('b370fc77735666d9de1c0cc9a1028819974b254291a0aacbcf6037a8cbb23f75538f2130249a0bab46d32dbbd3e0788407c227423d375ef1430dff7a016092dc'
19             '020684f5d8abf227a6566ebfe7343ee51f7f79576a89e9955ca614b3847e2b7e7be48025b22265a4cb8f86e5e8cbb2620385b46104c3ffec5c604775dea0bec0'
20             'a3c591d8593b3fb6d0c28c2764cb85dec6650073f7b6a1074e9d6f96cbb2194d4bd0cbd61be59ebe14f89e3f5d5d83f10706e69130ec5c7d90f088005de9b464'
21             'a402c40717cd185ea8c14be2d4dc7df67580f197d276ae660a7cf478ae3e07e469c78271feb0c4c6b7c1c418bfb10e7f42c1e5f4b9635a4d3c47e1af4a747a4c'
22             '12571c9a64bb205a30a4843b88c16373b093c92506612abc7eaae7ee2c3694a3eaa98f5b236cde4a185e442ea8dfe2e88da0676527c43a8b55714562e49266a1')
23 b2sums=('f7ab7abb438806826408a5641b82094a69dc85c403389e6ea63d726c68dee49542e1b826f73261eef37cb53f291047d95b91011c501ee00e0e7fd62e301850d3'
24         '91d7a7c925d24c27591e70df8f7db9dca469106fcb14dbeb8befb645befe345237b76d7f0f38027b2cb4c894ea53c2574c938341d890411d2648519dd9943c93'
25         'f2b6b9ece44c9c07f084d8af0deec96218390288ec7caf07316ef517042f4a3b0d581353d1635d4e2a2797867ed95a6e76325c42e3364a15db8a49a94f50ddff'
26         'f71b304e97e10368180d0abb7b2304649c4e481848226d693768f54dca96b9f4f1e85e54efd052546236cbc94b5caba19df801d75c46ab20a68df98e7758aeb1'
27         'e0ef68e17c5530fa7c8c9de9e8977ff92f4a28df55cb6be3ba4a4b3c3fef415d61cf3467633322ba1ff28554775d012e186b9686f8114f33bdbac4d46c322f60')
29 prepare() {
30   sed -i "s:SET UTF8:SET UTF-8:g" *.aff
32   # recognize apostrophes - FS#70425
33   # https://sourceforge.net/p/hunspell/patches/35/
34   patch -Np1 -i ./hunspell-en-allow-non-typographical.marks.patch
37 package_hunspell-en_us() {
38   pkgdesc="US English hunspell dictionaries"
39   # TODO: remove conflicts/provides/replaces 2021-09-23
40   conflicts=('hunspell-en_US')
41   provides=('hunspell-en_US')
42   replaces=('hunspell-en_US<=2020.12.07-1')
44   cd "$srcdir"
45   install -vDm 644 en_US*.dic en_US*.aff -t "$pkgdir/usr/share/hunspell"
47   pushd "$pkgdir/usr/share/hunspell/"
48     en_US_aliases="en_US"
49     for lang in $en_US_aliases; do
50       ln -s en_US-large.aff $lang.aff
51       ln -s en_US-large.dic $lang.dic
52     done
53   popd
55   # Install webengine dictionaries   
56   install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
57   for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
58   _filename=$(basename $_file)
59     /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
60   ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
61   done
63   # myspell symlinks
64   install -dm755 "${pkgdir}/usr/share/myspell/dicts"
65   pushd "$pkgdir/usr/share/myspell/dicts"
66     for file in "$pkgdir/usr/share/hunspell/"*; do
67       ln -sv /usr/share/hunspell/$(basename $file) .
68     done
69   popd
71   # licenses
72   install -D -m644 README_en_US-large.txt "$pkgdir/usr/share/licenses/$pkgname/Copyright_en_US-large"
75 package_hunspell-en_au() {
76   pkgdesc="AU English hunspell dictionaries"
77   # TODO: remove conflicts/provides/replaces 2021-09-23
78   conflicts=('hunspell-en_AU')
79   provides=('hunspell-en_AU')
80   replaces=('hunspell-en_AU<=2020.12.07-1')
82   cd "$srcdir"
83   install -vDm 644 en_AU*.dic en_AU*.aff -t "$pkgdir/usr/share/hunspell"
85   pushd "$pkgdir/usr/share/hunspell/"
86     en_AU_aliases="en_AU"
87     for lang in $en_AU_aliases; do
88       ln -s en_AU-large.aff $lang.aff
89       ln -s en_AU-large.dic $lang.dic
90     done
91   popd
93   # Install webengine dictionaries   
94   install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
95   for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
96   _filename=$(basename $_file)
97     /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
98   ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
99   done
101   # myspell symlinks
102   install -dm755 "${pkgdir}/usr/share/myspell/dicts"
103   pushd "$pkgdir/usr/share/myspell/dicts"
104     for file in "$pkgdir/usr/share/hunspell/"*; do
105       ln -sv "/usr/share/hunspell/$(basename "$file")" .
106     done
107   popd
109   # licenses
110   install -D -m644 README_en_AU-large.txt "$pkgdir/usr/share/licenses/$pkgname/Copyright_en_AU-large"
113 package_hunspell-en_ca() {
114   pkgdesc="CA English hunspell dictionaries"
115   # TODO: remove conflicts/provides/replaces 2021-09-23
116   conflicts=('hunspell-en_CA')
117   provides=('hunspell-en_CA')
118   replaces=('hunspell-en_CA<=2020.12.07-1')
120   cd "$srcdir"
121   install -vDm 644 en_CA*.dic en_CA*.aff -t "$pkgdir/usr/share/hunspell"
123   pushd "$pkgdir/usr/share/hunspell/"
124     en_CA_aliases="en_CA"
125     for lang in $en_CA_aliases; do
126       ln -s en_CA-large.aff $lang.aff
127       ln -s en_CA-large.dic $lang.dic
128     done
129   popd
131   # Install webengine dictionaries   
132   install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
133   for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
134   _filename=$(basename $_file)
135     /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
136   ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
137   done
139   # myspell symlinks
140   install -dm755 "${pkgdir}/usr/share/myspell/dicts"
141   pushd "$pkgdir/usr/share/myspell/dicts"
142     for file in "$pkgdir/usr/share/hunspell/"*; do
143       ln -sv "/usr/share/hunspell/$(basename $file)" .
144     done
145   popd
147   # licenses
148   install -D -m644 README_en_CA-large.txt "$pkgdir/usr/share/licenses/$pkgname/Copyright_en_CA-large"
151 package_hunspell-en_gb() {
152   pkgdesc="GB English hunspell dictionaries"
153   # TODO: remove conflicts/provides/replaces 2021-09-23
154   conflicts=('hunspell-en_GB')
155   provides=('hunspell-en_GB')
156   replaces=('hunspell-en_GB<=2020.12.07-1')
158   cd "$srcdir"
159   install -vDm 644 en_GB*.dic en_GB*.aff -t "$pkgdir/usr/share/hunspell"
161   pushd "$pkgdir/usr/share/hunspell/"
162     en_GB_aliases="en_AG en_BS en_BW en_BZ en_DK en_GB en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW"
163     for lang in $en_GB_aliases; do
164       ln -s en_GB-large.aff $lang.aff
165       ln -s en_GB-large.dic $lang.dic
166     done
167   popd
169   # Install webengine dictionaries   
170   install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
171   for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
172   _filename=$(basename $_file)
173     /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
174   ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
175   done
177   # myspell symlinks
178   install -dm755 "${pkgdir}/usr/share/myspell/dicts"
179   pushd "$pkgdir/usr/share/myspell/dicts"
180     for file in "$pkgdir/usr/share/hunspell/"*; do
181       ln -sv "/usr/share/hunspell/$(basename "$file")" .
182     done
183   popd
185   # licenses
186   install -D -m644 README_en_GB-large.txt "$pkgdir/usr/share/licenses/$pkgname/Copyright_en_GB-large"