diff options
author | Archadept | 2018-04-14 16:00:50 +0200 |
---|---|---|
committer | Archadept | 2018-04-14 16:00:50 +0200 |
commit | 7f19e023e5c8949e75ba0cd29f5593946d67c5e0 (patch) | |
tree | 50e83172324e3a9939722898aaedbd17fad0741a | |
parent | 1148021b4c19d4e2268e855168ca48cc7426d816 (diff) | |
download | aur-7f19e023e5c8949e75ba0cd29f5593946d67c5e0.tar.gz |
Unneeded conversion and BOM removal
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 53 |
2 files changed, 30 insertions, 29 deletions
@@ -1,10 +1,10 @@ # Generated by mksrcinfo v8 -# Mon Feb 12 20:12:27 UTC 2018 +# Sat Apr 14 14:00:22 UTC 2018 pkgbase = hunspell-la pkgdesc = Latin dictionary for Hunspell pkgver = 20130331 - pkgrel = 2 - url = http://extensions.libreoffice.org/extension-center/latin-spelling-and-hyphenation-dictionaries + pkgrel = 3 + url = https://extensions.libreoffice.org/extensions/latin-spelling-and-hyphenation-dictionaries arch = any license = GPL optdepends = hunspell: the spell checking libraries and apps @@ -1,43 +1,44 @@ # Maintainer: Archadept -# Revision: 2018-02-12 +# Revision: 2018-04-14 pkgname=hunspell-la pkgver=20130331 -pkgrel=2 +pkgrel=3 pkgdesc='Latin dictionary for Hunspell' arch=('any') -url="http://extensions.libreoffice.org/extension-center/latin-spelling-and-hyphenation-dictionaries" +url="https://extensions.libreoffice.org/extensions/latin-spelling-and-hyphenation-dictionaries" license=('GPL') -optdepends=('hunspell: the spell checking libraries and apps') +optdepends=('hunspell: the spell checking libraries and apps') source=('https://extensions.libreoffice.org/extensions/latin-spelling-and-hyphenation-dictionaries/2013.03.31/@@download/file/dict-la_2013-03-31.oxt') md5sums=('46674c8e9985b97e3f71555ed83a90cd') +prepare() { + # Hunspell ignores byte order mark (BOM sequence), see changelog of 2007-03-19: + # https://github.com/hunspell/hunspell/blob/master/ChangeLog + # However, some third-party applications can be affected. For example: + # https://bugs.launchpad.net/ubuntu/+source/hunspell-ru/+bug/992194 + + # BOM removal + LC_ALL=C sed -i '1s/^\xEF\xBB\xBF//' "${srcdir}/la/universal/la.dic" + LC_ALL=C sed -i '1s/^\xEF\xBB\xBF//' "${srcdir}/la/universal/la.aff" +} + package() { - cd "${srcdir}/la" - - install -dm755 ${pkgdir}/usr/share/hunspell - install -m644 la.dic ${pkgdir}/usr/share/hunspell - install -m644 la.aff ${pkgdir}/usr/share/hunspell - - # UTF-8 - conv='iconv -f iso8859-1 -t utf-8' - $conv la.dic > la_LA.dic - $conv la.aff | sed '1s/SET ISO8859-1/SET UTF-8/' > la_LA.aff - install -m644 la_LA.dic ${pkgdir}/usr/share/hunspell/ - install -m644 la_LA.aff ${pkgdir}/usr/share/hunspell/ - - rm ${pkgdir}/usr/share/hunspell/la.dic - rm ${pkgdir}/usr/share/hunspell/la.aff - - # symlinks + cd "${srcdir}/la/universal" + + # Hunspell dictionary + install -Dm644 la.dic ${pkgdir}/usr/share/hunspell/la_LA.dic + install -Dm644 la.aff ${pkgdir}/usr/share/hunspell/la_LA.aff + + # MySpell links install -dm755 ${pkgdir}/usr/share/myspell/dicts pushd ${pkgdir}/usr/share/myspell/dicts for file in ${pkgdir}/usr/share/hunspell/*; do - ln -sv /usr/share/hunspell/$(basename ${file}) . + ln -sv /usr/share/hunspell/$(basename ${file}) . done popd - - # docs - install -dm755 ${pkgdir}/usr/share/doc/${pkgname} - install -m644 README_la.txt $pkgdir/usr/share/doc/${pkgname}/README_la.txt + + # Docs + install -Dm644 "${srcdir}/la/README_la.txt" "${pkgdir}/usr/share/doc/${pkgname}/README_la.txt" } + |