File mingw64-libthai.spec of Package mingw64-libthai

#
# spec file for package mingw64-libthai
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define _name   libthai
Name:           mingw64-%{_name}
Version:        0.1.29
Release:        0
Summary:        Thai Language Support Routines
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
URL:            https://linux.thai.net/plone/TLWG/libthai/
Source:         https://linux.thai.net/pub/thailinux/software/libthai/%{_name}-%{version}.tar.xz
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkgconf
BuildRequires:  mingw64-libdatrie-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
LibThai is a set of Thai language support routines to aid
incorporation of Thai language support into applications. It includes
important Thai-specific functions, such as word breaking, input and
output methods, and basic character and string support.

%package -n mingw64-libthai0
Summary:        Thai Language Support Routines
# SLPP applied since version 0.1.15.
# libthai needs the data to run, but the data is not parallel-installable,
# hence the >= instead of =. We just hope the data format will stay the same in
# the future.
Group:          System/Libraries
Requires:       mingw64-libthai-data >= %{version}
Provides:       mingw64-libthai = %{version}
Obsoletes:      mingw64-libthai < %{version}

%description -n mingw64-libthai0
LibThai is a set of Thai language support routines to aid
incorporation of Thai language support into applications. It includes
important Thai-specific functions, such as word breaking, input and
output methods, and basic character and string support.

%package data
Summary:        Data files for the Thai language support library
Group:          System/Libraries

%description data
LibThai is a set of Thai language support routines to aid
incorporation of Thai language support into applications. It includes
important Thai-specific functions, such as word breaking, input and
output methods, and basic character and string support.

This package contains the data files for libthai.

%package devel
Summary:        Development files for the Thai language support library
Group:          Development/Languages/C and C++
Requires:       mingw64-libthai0 = %{version}

%description devel
LibThai is a set of Thai language support routines to aid
incorporation of Thai language support into applications. It includes
important Thai-specific functions, such as word breaking, input and
output methods, and basic character and string support.

This package contains headers and libraries required for developing
software using libthai.

%_mingw64_debug_package

%prep
%setup -q -n %{_name}-%{version}

%build
%_mingw64_configure --disable-static
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print


%files -n mingw64-libthai0
%{_mingw64_bindir}/libthai-*.dll

%files data
%{_mingw64_datadir}/libthai/

%files devel
%{_mingw64_includedir}/thai/
%{_mingw64_libdir}/libthai.dll.a
%{_mingw64_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by