diff -Nru snowball-2.0.0/debian/changelog snowball-2.0.0/debian/changelog --- snowball-2.0.0/debian/changelog 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/changelog 2020-08-05 05:51:00.000000000 +0000 @@ -1,3 +1,16 @@ +snowball (2.0.0-2) unstable; urgency=medium + + [ Dmitry Shachnev ] + * Update to debhelper compat level 13. + * Remove dh-exec dependency, debhelper now supports substitutions natively. + * Build python3-snowballstemmer package from this source. + * Add debian/clean file. + + [ Stefano Rivera ] + * Add copyright holders. + + -- Stefano Rivera Tue, 04 Aug 2020 22:51:00 -0700 + snowball (2.0.0-1) unstable; urgency=medium [ Dmitry Shachnev ] diff -Nru snowball-2.0.0/debian/clean snowball-2.0.0/debian/clean --- snowball-2.0.0/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ snowball-2.0.0/debian/clean 2020-08-05 05:51:00.000000000 +0000 @@ -0,0 +1,3 @@ +.pybuild/ +libstemmer.a +libstemmer.so* diff -Nru snowball-2.0.0/debian/control snowball-2.0.0/debian/control --- snowball-2.0.0/debian/control 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/control 2020-08-05 05:51:00.000000000 +0000 @@ -2,7 +2,12 @@ Section: libs Priority: optional Maintainer: Stefano Rivera -Build-Depends: debhelper-compat (= 12), dh-exec, python3, snowball-data +Build-Depends: + debhelper-compat (= 13), + dh-python, + python3-all, + python3-setuptools, + snowball-data Standards-Version: 4.5.0 Homepage: https://snowballstem.org/ Vcs-Git: https://salsa.debian.org/debian/snowball.git @@ -72,3 +77,27 @@ researchers wishing to reproduce results of earlier experiments. . This package contains "stemwords", a simple utility for stemming words. + +Package: python3-snowballstemmer +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Suggests: python3-stemmer +Description: Pure Python Snowball stemming library + Snowball provides access to efficient algorithms for calculating a + "stemmed" form of a word. This is a form with most of the common + morphological endings removed; hopefully representing a common + linguistic base form. This is most useful in building search engines + and information retrieval software; for example, a search with stemming + enabled should be able to find a document containing "cycling" given the + query "cycles". + . + Snowball provides algorithms for several (mainly European) languages. + It also provides access to the classic Porter stemming algorithm for + English: although this has been superseded by an improved algorithm, the + original algorithm may be of interest to information retrieval + researchers wishing to reproduce results of earlier experiments. + . + This package contains the pure Python module that implements Snowball + algorithms. When python3-stemmer package (which contains the C extension) + is installed, it uses that extension instead of the pure Python code. diff -Nru snowball-2.0.0/debian/copyright snowball-2.0.0/debian/copyright --- snowball-2.0.0/debian/copyright 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/copyright 2020-08-05 05:51:00.000000000 +0000 @@ -7,7 +7,9 @@ License: BSD-3-snowball Files: debian/* -Copyright: 2010-2019, Stefano Rivera +Copyright: 2010-2020, Stefano Rivera + 2019-2020, Dmitry Shachnev + 2020, Gianfranco Costamagna License: BSD-3-snowball License: BSD-3-snowball diff -Nru snowball-2.0.0/debian/libstemmer0d.install snowball-2.0.0/debian/libstemmer0d.install --- snowball-2.0.0/debian/libstemmer0d.install 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/libstemmer0d.install 2020-08-05 05:51:00.000000000 +0000 @@ -1,3 +1 @@ -#!/usr/bin/dh-exec - libstemmer*.so.* /usr/lib/${DEB_HOST_MULTIARCH} diff -Nru snowball-2.0.0/debian/libstemmer-dev.install snowball-2.0.0/debian/libstemmer-dev.install --- snowball-2.0.0/debian/libstemmer-dev.install 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/libstemmer-dev.install 2020-08-05 05:51:00.000000000 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/dh-exec - include/libstemmer.h /usr/include libstemmer.a /usr/lib/${DEB_HOST_MULTIARCH} libstemmer.so /usr/lib/${DEB_HOST_MULTIARCH} diff -Nru snowball-2.0.0/debian/patches/python-dist.diff snowball-2.0.0/debian/patches/python-dist.diff --- snowball-2.0.0/debian/patches/python-dist.diff 1970-01-01 00:00:00.000000000 +0000 +++ snowball-2.0.0/debian/patches/python-dist.diff 2020-08-05 05:51:00.000000000 +0000 @@ -0,0 +1,18 @@ +Description: preserve the Python source directory instead of deleting it +Author: Dmitry Shachnev +Forwarded: not-needed +Last-Update: 2020-07-18 + +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -443,9 +443,7 @@ dist_libstemmer_python: $(PYTHON_SOURCES + cp -a $(PYTHON_SOURCES) $${dest}/src/$(python_runtime_dir) && \ + cp -a $(PYTHON_SAMPLE_SOURCES) $${dest}/src/$(python_sample_dir) && \ + cp -a $(PYTHON_RUNTIME_SOURCES) $${dest}/src/$(python_runtime_dir) && \ +- cp -a $(COMMON_FILES) $(PYTHON_PACKAGE_FILES) $${dest} && \ +- (cd $${dest} && $(python) setup.py sdist bdist_wheel && cp dist/*.tar.gz dist/*.whl ..) && \ +- rm -rf $${dest} ++ cp -a $(COMMON_FILES) $(PYTHON_PACKAGE_FILES) $${dest} + + dist_libstemmer_js: $(JS_SOURCES) + destname=jsstemmer; \ diff -Nru snowball-2.0.0/debian/patches/series snowball-2.0.0/debian/patches/series --- snowball-2.0.0/debian/patches/series 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/patches/series 2020-08-05 05:51:00.000000000 +0000 @@ -1,2 +1,3 @@ build-options.diff shared-library.diff +python-dist.diff diff -Nru snowball-2.0.0/debian/rules snowball-2.0.0/debian/rules --- snowball-2.0.0/debian/rules 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/rules 2020-08-05 05:51:00.000000000 +0000 @@ -1,15 +1,20 @@ #!/usr/bin/make -f %: - dh $@ + dh $@ --with python3 override_dh_auto_build: dh_auto_build -- $(shell dpkg-buildflags --export=configure) + $(MAKE) dist_libstemmer_python + dh_auto_build --buildsystem=pybuild -- --dir dist/snowballstemmer --name snowballstemmer + +override_dh_auto_install-indep: + dh_auto_install --buildsystem=pybuild -- --dir dist/snowballstemmer --name snowballstemmer override_dh_auto_test: STEMMING_DATA=/usr/share/snowball/data dh_auto_test --no-parallel -override_dh_installdocs: +override_dh_installdocs-arch: dh_installdocs --link-doc=libstemmer0d override_dh_strip: diff -Nru snowball-2.0.0/debian/tests/control snowball-2.0.0/debian/tests/control --- snowball-2.0.0/debian/tests/control 2020-07-15 00:59:30.000000000 +0000 +++ snowball-2.0.0/debian/tests/control 2020-08-05 05:51:00.000000000 +0000 @@ -3,3 +3,6 @@ Tests: compilation Depends: build-essential, libstemmer-dev + +Tests: python-stemwords +Depends: python3-snowballstemmer, snowball-data diff -Nru snowball-2.0.0/debian/tests/python-stemwords snowball-2.0.0/debian/tests/python-stemwords --- snowball-2.0.0/debian/tests/python-stemwords 1970-01-01 00:00:00.000000000 +0000 +++ snowball-2.0.0/debian/tests/python-stemwords 2020-08-05 05:51:00.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu + +cp -a /usr/share/snowball/data/english/* "$AUTOPKGTEST_TMP" +cp python/stemwords.py "$AUTOPKGTEST_TMP" +cd "$AUTOPKGTEST_TMP" + +python3 stemwords.py -i voc.txt -o test-output.txt -l english +cmp output.txt test-output.txt