[arch-commits] Commit in nltk-data/trunk (PKGBUILD)
Alexander Rødseth
arodseth at gemini.archlinux.org
Sat Oct 9 18:27:15 UTC 2021
Date: Saturday, October 9, 2021 @ 18:27:15
Author: arodseth
Revision: 1029177
Extract zip files in the right locations + use the same version as the Python package
Modified:
nltk-data/trunk/PKGBUILD
----------+
PKGBUILD | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-10-09 18:26:45 UTC (rev 1029176)
+++ PKGBUILD 2021-10-09 18:27:15 UTC (rev 1029177)
@@ -11,7 +11,7 @@
#
pkgname=nltk-data
-pkgver=3.6.2
+pkgver=3.6.4
pkgrel=1
pkgdesc='Corpora, grammars and other linguistic data for NLTK'
arch=(any)
@@ -240,6 +240,13 @@
package() {
install -d "$pkgdir/usr/share/nltk_data"
find * -type d -exec cp -r "{}" "$pkgdir/usr/share/nltk_data" \;
+ for surl in "${source[@]}"; do
+ dirname="$(dirname $surl | cut -d/ -f8)"
+ [ "$surl" = "LICENSE" ] && continue || true
+ zipdirname=$(basename -s .zip "$surl")
+ install -d "$pkgdir/usr/share/nltk_data/$dirname"
+ mv "$pkgdir/usr/share/nltk_data/$zipdirname" "$pkgdir/usr/share/nltk_data/$dirname/$zipdirname"
+ done
find "$pkgdir/usr/share/nltk_data/" -type f -exec chmod 0644 {} \;
find "$pkgdir/usr/share/nltk_data/" -type d -exec chmod 0755 {} \;
install -Dm644 -t "$pkgdir/usr/share/licenses/nltk-data" LICENSE
More information about the arch-commits
mailing list