LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File nltk-data-punkt.spec of Package nltk-data-punkt-no-tests (Project home:jayvdb:coala)

#
# spec file for package python3-nltk-punkt
#
# Copyright (c) 2017 John Vandenberg.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define packgroup tokenizers
%define pack punkt
Name:           nltk-data-%{pack}
Version:        0.2
Release:        20130826gita2d463f
Url:            http://nltk.org/
Summary:        Natural Language Toolkit Data %{packgroup} %{pack}
License:        Apache-2.0
Group:          Development/Languages/Python
Source0:        https://github.com/nltk/nltk_data/raw/gh-pages/packages/%{packgroup}/%{pack}.zip
Source1:        https://github.com/nltk/nltk_data/raw/gh-pages/packages/%{packgroup}/%{pack}.xml
BuildRequires:  unzip
Recommends:     python3-nltk
Suggests:       python2-nltk
BuildArch:      noarch

%description
NLTK -- the Natural Language Toolkit Data %{packgroup} %{pack}.

%prep
#

%build
#

%install
# need to use `install`
mkdir -p %{buildroot}/%{_datarootdir}/nltk_data/%{packgroup}/
cp %{_sourcedir}/%{pack}.* %{buildroot}/%{_datarootdir}/nltk_data/%{packgroup}/
cd %{buildroot}/%{_datarootdir}/nltk_data/%{packgroup}/
unzip %{_sourcedir}/%{pack}.zip
rm %{pack}/PY3/README
chmod -R o-w %{pack}/
chmod -R o+r %{pack}/
chmod o+x %{pack}/
chmod o+x %{pack}/PY3
ls -al %{pack}/
rm %{pack}.zip

%files
%defattr(-, root, root)
%doc %{_datarootdir}/nltk_data/%{packgroup}/%{pack}/README
%{_datarootdir}/nltk_data/%{packgroup}/%{pack}.xml
%{_datarootdir}/nltk_data/%{packgroup}/%{pack}/
%dir %{_datarootdir}/nltk_data/%{packgroup}/
%dir %{_datarootdir}/nltk_data/

%changelog