- Add xdq, sus, mrh, hrx, brh, ary, en_SE.UTF-8 - Get new translations and translation changes from CLDR - setup.py: use open() instead of deprecated codecs.open(), declare minimum Python version >= 3.8 - Add Yangon timezone id part - languages.xml: Rename Asia/Rangoon to Asia/Yangon - territories.xml: Rename Asia/Rangoon to Asia/Yangon
78 lines
2.9 KiB
RPMSpec
78 lines
2.9 KiB
RPMSpec
Name: langtable
|
|
Version: 0.0.71
|
|
Release: %autorelease
|
|
Summary: Guessing reasonable defaults for locale, keyboard layout, territory, and language.
|
|
# the translations in languages.xml and territories.xml are (mostly)
|
|
# imported from CLDR and are thus under the Unicode license, the
|
|
# short name for this license is "MIT", see:
|
|
# https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Style_without_sublicense_.28Unicode.29
|
|
License: GPL-3.0-or-later
|
|
URL: https://github.com/mike-fabian/langtable
|
|
Source0: https://github.com/mike-fabian/langtable/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: perl-interpreter
|
|
BuildRequires: python3-devel
|
|
|
|
%description
|
|
langtable is used to guess reasonable defaults for locale, keyboard layout,
|
|
territory, and language, if part of that information is already known. For
|
|
example, guess the territory and the keyboard layout if the language
|
|
is known or guess the language and keyboard layout if the territory is
|
|
already known.
|
|
|
|
%package -n python3-langtable
|
|
Summary: Python module to query the langtable-data
|
|
License: GPL-3.0-or-later
|
|
Requires: %{name} = %{version}-%{release}
|
|
Obsoletes: %{name}-data < %{version}-%{release}
|
|
Provides: %{name}-data = %{version}-%{release}
|
|
|
|
%description -n python3-langtable
|
|
This package contains a Python module to query the data
|
|
from langtable-data.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires
|
|
|
|
%build
|
|
perl -pi -e "s,_DATADIR = '(.*)',_DATADIR = '%{_datadir}/langtable'," langtable/langtable.py
|
|
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
|
|
%pyproject_install
|
|
%pyproject_save_files langtable
|
|
|
|
%check
|
|
%pyproject_check_import
|
|
|
|
(cd $RPM_BUILD_DIR/%{name}-%{version}/langtable; %{__python3} langtable.py)
|
|
(cd $RPM_BUILD_DIR/%{name}-%{version}; %{__python3} test_cases.py)
|
|
xmllint --noout --relaxng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/schemas/keyboards.rng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/data/keyboards.xml.gz
|
|
xmllint --noout --relaxng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/schemas/languages.rng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/data/languages.xml.gz
|
|
xmllint --noout --relaxng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/schemas/territories.rng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/data/territories.xml.gz
|
|
xmllint --noout --relaxng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/schemas/timezoneidparts.rng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/data/timezoneidparts.xml.gz
|
|
xmllint --noout --relaxng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/schemas/timezones.rng \
|
|
$RPM_BUILD_DIR/%{name}-%{version}/langtable/data/timezones.xml.gz
|
|
|
|
%files
|
|
%license COPYING unicode-license.txt
|
|
%doc README* ChangeLog test_cases.py langtable/schemas/*.rng
|
|
|
|
%files -n python3-langtable -f %{pyproject_files}
|
|
|
|
%changelog
|
|
%autochangelog
|