diff options
author | Jake | 2018-04-09 19:21:18 +0200 |
---|---|---|
committer | Jake | 2018-04-09 19:21:18 +0200 |
commit | 8675c8123ba132ca1a7c0877e6ee0b929a6fa5ae (patch) | |
tree | 1fc6c9107c00435688defb90df68b6a87b57b47a | |
download | aur-8675c8123ba132ca1a7c0877e6ee0b929a6fa5ae.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 54 |
2 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b16120dad08f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = keepassxc-wordlists-hunspell + pkgdesc = Wordlists generated from system Hunspell dicts for keepassxc + pkgver = 1.0 + pkgrel = 1 + url = https://github.com/wooorm/dictionaries + arch = any + license = GPL + depends = keepassxc>=2.2.0 + optdepends = hunspell-de + optdepends = hunspell-en_US + optdepends = hunspell-en_GB + optdepends = hunspell-en_CA + optdepends = hunspell-en_AU + optdepends = hunspell-el + optdepends = hunspell-es + optdepends = hunspell-fr + optdepends = hunspell-he + optdepends = hunspell-hu + optdepends = hunspell-it + optdepends = hunspell-nl + optdepends = hunspell-pl + optdepends = hunspell-ro + +pkgname = keepassxc-wordlists-hunspell + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..72d873d4002d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Jake <aur@ja-ke.tech> +pkgname=keepassxc-wordlists-hunspell +pkgver=1.0 +pkgrel=1 +pkgdesc="Wordlists generated from system Hunspell dicts for keepassxc" +arch=('any') +url="https://github.com/wooorm/dictionaries" +license=('GPL') +depends=('keepassxc>=2.2.0') +optdepends=('hunspell-de' + 'hunspell-en_US' + 'hunspell-en_GB' + 'hunspell-en_CA' + 'hunspell-en_AU' + 'hunspell-el' + 'hunspell-es' + 'hunspell-fr' + 'hunspell-he' + 'hunspell-hu' + 'hunspell-it' + 'hunspell-nl' + 'hunspell-pl' + 'hunspell-ro' + ) + +# Possible dict files and front matter/license info length +_lang=("de_DE.dic" "en_US.dic" "en_GB.dic" "en_CA.dic" "en_AU.dic" "el_GR.dic" "es_ES.dic"\ + "fr_FR.dic" "he_HE.dic" "hu_HU.dic" "it_IT.dic" "nl_NL.dic" "pl_PL.dic" "ro_RO.dic") +_front=(16 1 1 1 1 1 1 1 1 1 1 1 1 1) + +prepare() { + +for ((i = 0; i < ${#_lang[@]}; ++i)); do + file="${_lang[$i]}" + + if [ -f /usr/share/hunspell/$file ]; then + #Strip everything but the words and convert to UTF-8 + tail -n +${_front[$i]} /usr/share/hunspell/$file |iconv -f ISO-8859-15 -t UTF-8 | sed -r 's/\/.+//g' > $srcdir/$file.txt + echo "Converted "$file"!" + else + echo "("$file" not found)" + fi +done + +} + +package() { + for file in ${_lang[@]}; do + if [ -f $srcdir/$file.txt ]; then + install -Dm644 $srcdir/$file.txt $pkgdir/usr/share/keepassxc/wordlists/$file.wordlist + fi + done + +} |