Date: Tuesday, February 26, 2019 @ 10:11:09 Author: arodseth Revision: 436093
upgpkg: nltk-data 3.4-1 Modified: nltk-data/trunk/PKGBUILD ----------+ PKGBUILD | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-02-26 08:27:53 UTC (rev 436092) +++ PKGBUILD 2019-02-26 10:11:09 UTC (rev 436093) @@ -1,36 +1,37 @@ -# Maintainer: Alexander F Rødseth <xypr...@archlinux.org> +# Maintainer: Alexander F. Rødseth <xypr...@archlinux.org> # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: Anton Bazhenov <anton.bazhenov at gmail> # Contributor: Michal Bozon <michal.bozon__at__gmail.com> pkgname=nltk-data -pkgver=3.3 +pkgver=3.4 pkgrel=1 pkgdesc='Corpora, grammars and other linguistic data for NLTK' -arch=('any') -url='http://www.nltk.org/data.html' -license=('custom') -makedepends=("python-nltk=$pkgver" 'python-six' 'unzip') -source=('LICENSE') +arch=(any) +url='https://www.nltk.org/data.html' +license=(custom) +makedepends=("python-nltk=$pkgver" python-six unzip) +source=(LICENSE) md5sums=('69998d5f493a60e7a1467b8003ab8e22') package() { install -d "$pkgdir/usr/share/nltk_data" - # Downloading the data. - # TODO: Do what the python script does, but in this PKGBUILD + # Download the data python -m nltk.downloader -d "$pkgdir/usr/share/nltk_data" all + # Extract the downloaded files for _dir in "$pkgdir/usr/share/nltk_data/"*; do unzip -u "$_dir/"\*.zip -d "$_dir" rm -f "$_dir/"*.zip done + # Correct file permissions find "$pkgdir/usr/share/nltk_data/" -type f -exec chmod 0644 {} \; find "$pkgdir/usr/share/nltk_data/" -type d -exec chmod 0755 {} \; - install -d "$pkgdir/usr/share/licenses/nltk-data" - install -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/nltk-data" + # Install the license + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/nltk-data/LICENSE" } # vim: ts=2 sw=2 et: