summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO27
-rw-r--r--.nvchecker.toml4
-rw-r--r--PKGBUILD74
3 files changed, 28 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de31abdc1f47..1002bf58d564 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,27 +1,14 @@
-pkgbase = stavekontrolden
- pkgdesc = Stavekontrolden Danish dictionaries; for use with nuspell/hunspell, hyphen, libmythes, LibreOffice, and OpenOffice
+pkgbase = hunspell-da
+ pkgdesc = Danish hunspell dictionaries
pkgver = 2.8.098
pkgrel = 1
url = https://stavekontrolden.dk/
arch = any
license = GPL-3.0-only AND (GPL-2.0-only AND LGPL-2.1-only AND MPL-1.1)
- makedepends = libarchive
- makedepends = coreutils
- makedepends = findutils
optdepends = hunspell: the spell checking libraries and apps
- optdepends = hyphen: for use of hyphenation rules
- optdepends = libmythes: for use of thesaurus dictionary
- provides = libreoffice-extension-da_dk
- provides = openoffice-extension-da_dk
- provides = hunspell-da
- provides = hyphen-da
- provides = mythes-da
- conflicts = libreoffice-extension-da_dk
- conflicts = openoffice-extension-da_dk
- conflicts = hunspell-da
- conflicts = hyphen-da
- conflicts = mythes-da
- source = https://stavekontrolden.dk/dictionaries/da_DK/da_DK-2.8.098.oxt
- b2sums = 266f278aac99838efeb2c6aa7cd426ff15ce409bf7d50aacbd051902b2d89a898894121dc4113ceab663187bab5149ec086ae8ed0374363f56b6b746af06049a
+ source = https://stavekontrolden.dk/dictionaries/da_DK/da_DK-2.8.098.aff
+ source = https://stavekontrolden.dk/dictionaries/da_DK/da_DK-2.8.098.dic
+ b2sums = 3bef0a2355c095466dd47713b921065d13098dc5aa98dd815f4620993fde08a52b3e50d6284928ecec56b66b1ef65874aa6b8e0bc68ef453807bdbf530e94476
+ b2sums = 69aa516202ae76fbffd191385d7e1e986a9f92eaa494e4c593e137082d23972f384afcb6666629faa30bd82ec045accffd6ed3654f462d420ca5410e544b5916
-pkgname = stavekontrolden
+pkgname = hunspell-da
diff --git a/.nvchecker.toml b/.nvchecker.toml
index 7c2c5c2456fd..385d85cee9a1 100644
--- a/.nvchecker.toml
+++ b/.nvchecker.toml
@@ -1,4 +1,4 @@
-[stavekontrolden]
+[hunspell-da]
source = "regex"
url = "https://stavekontrolden.dk/?dictionaries=1"
-regex = "da_DK-((?:\\d|\\.)+)\\.oxt"
+regex = "da_DK-((?:\\d|\\.)+)\\.aff"
diff --git a/PKGBUILD b/PKGBUILD
index 6db932ac485a..c5267ada711f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,73 +1,37 @@
+# Maintainer: Frederik Nordahl Jul Sabroe <frederikns at gmail dot com>
# Maintainer: Frederik “Freso” S. Olesen <archlinux@freso.dk>
-# Contributor: Frederik Nordahl Jul Sabroe <frederikns at gmail dot com>
# Contributor: adament <adament@adament.net>
# Contributor: Jamie Magee <jamie dot magee at gmail dot com>
-pkgname=stavekontrolden
+pkgname=hunspell-da
pkgver=2.8.098
pkgrel=1
-pkgdesc="Stavekontrolden Danish dictionaries; for use with nuspell/hunspell, hyphen, libmythes, LibreOffice, and OpenOffice"
+pkgdesc="Danish hunspell dictionaries"
arch=('any')
url='https://stavekontrolden.dk/'
license=('GPL-3.0-only AND (GPL-2.0-only AND LGPL-2.1-only AND MPL-1.1)')
optdepends=(
- 'hunspell: the spell checking libraries and apps'
- 'hyphen: for use of hyphenation rules'
- 'libmythes: for use of thesaurus dictionary')
-makedepends=('libarchive' 'coreutils' 'findutils')
-provides=('libreoffice-extension-da_dk' 'openoffice-extension-da_dk' 'hunspell-da' 'hyphen-da' 'mythes-da')
-conflicts=("${provides[@]}")
-source=("https://stavekontrolden.dk/dictionaries/da_DK/da_DK-$pkgver.oxt")
-b2sums=('266f278aac99838efeb2c6aa7cd426ff15ce409bf7d50aacbd051902b2d89a898894121dc4113ceab663187bab5149ec086ae8ed0374363f56b6b746af06049a')
-
-package() {
- # LibreOffice extension
- _extension_dir="${pkgdir}"/usr/lib/libreoffice/share/extensions/da_DK
- install -dm755 "${_extension_dir}"
- bsdtar -xf da_DK-$pkgver.oxt -C "${_extension_dir}"/
-
- # Symlink for OpenOffice
- install -dm755 "${pkgdir}"/opt/openoffice4/share/extensions
- ln -s /usr/lib/libreoffice/share/extensions/da_DK "${pkgdir}"/opt/openoffice4/share/extensions/da_DK
-
- # set types and make directories
- _types=('hunspell' 'hyphen' 'mythes')
- for type in "${_types[@]}"; do
- install -dm755 "${pkgdir}"/usr/share/$type
+ 'hunspell: the spell checking libraries and apps')
+source=("https://stavekontrolden.dk/dictionaries/da_DK/da_DK-$pkgver.aff"
+ "https://stavekontrolden.dk/dictionaries/da_DK/da_DK-$pkgver.dic")
+b2sums=('3bef0a2355c095466dd47713b921065d13098dc5aa98dd815f4620993fde08a52b3e50d6284928ecec56b66b1ef65874aa6b8e0bc68ef453807bdbf530e94476'
+ '69aa516202ae76fbffd191385d7e1e986a9f92eaa494e4c593e137082d23972f384afcb6666629faa30bd82ec045accffd6ed3654f462d420ca5410e544b5916')
+
+build() {
+ # Rename downloaded files
+ for file in "${source[@]}"; do
+ mv $(basename $file) $(basename ${file/+([\.-]+([0-9]))/})
done
+}
- _link_dir=../../lib/libreoffice/share/extensions/da_DK
-
- # hunspell
- ln -s $_link_dir/da_DK.dic "${pkgdir}"/usr/share/hunspell/da_DK.dic
- ln -s $_link_dir/da_DK.aff "${pkgdir}"/usr/share/hunspell/da_DK.aff
-
- # hyphen
- ln -s $_link_dir/hyph_da_DK.dic "${pkgdir}"/usr/share/hyphen/hyph_da_DK.dic
- ln -s $_link_dir/hyph_da_DK.dic "${pkgdir}"/usr/share/hyphen/hyph_da.dic
-
- # thesaurus (mythes)
- ln -s $_link_dir/th_da_DK.dat "${pkgdir}"/usr/share/mythes/th_da_DK.dat
- ln -s $_link_dir/th_da_DK.idx "${pkgdir}"/usr/share/mythes/th_da_DK.idx
+package() {
+ install -dm755 "${pkgdir}"/usr/share/hunspell
+ install -m644 da_DK.dic da_DK.aff $pkgdir/usr/share/hunspell
# myspell/dicts symlinks
install -dm755 "${pkgdir}"/usr/share/myspell/dicts
pushd "$pkgdir"/usr/share/myspell/dicts > /dev/null
- for type in "${_types[@]}"; do
- for file in "${pkgdir}"/usr/share/$type/*; do
- ln -Ls ../../$type/"$(basename $file)" .
- done
+ for file in "${pkgdir}"/usr/share/hunspell/*; do
+ ln -sv /usr/share/hunspell/"$(basename $file)" .
done
popd > /dev/null
-
- install -dm755 "${pkgdir}"/usr/share/doc/$pkgname
- ln -s ../$_link_dir/README_da_DK.txt "${pkgdir}"/usr/share/doc/$pkgname/README_da_DK.txt
- ln -s ../$_link_dir/HYPH_da_DK_README.txt "${pkgdir}"/usr/share/doc/$pkgname/HYPH_da_DK_README.txt
- install -dm755 "${pkgdir}"/usr/share/licenses/$pkgname
- ln -s ../$_link_dir/README_da_DK.txt "${pkgdir}"/usr/share/licenses/$pkgname/README_da_DK.txt
- ln -s ../$_link_dir/HYPH_da_DK_README.txt "${pkgdir}"/usr/share/licenses/$pkgname/HYPH_da_DK_README.txt
-
- # Remove world writable bits
- chmod --recursive go-w "${pkgdir}"
- # Remove executable bits
- find "${pkgdir}"/ -type f -exec chmod -x {} +
}