File mingw32-libdatrie.spec of Package mingw32-libdatrie

#
# spec file for package mingw32-libdatrie
#
# 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   libdatrie
Name:           mingw32-%{_name}
Version:        0.2.13
Release:        0
Summary:        Double-Array Trie Library
License:        LGPL-2.1-only
Group:          Development/Libraries/C and C++
URL:            https://linux.thai.net/~thep/datrie/datrie.html
Source:         https://linux.thai.net/pub/thailinux/software/libthai/%{_name}-%{version}.tar.xz
BuildRequires:  autoconf-archive
BuildRequires:  doxygen
BuildRequires:  libtool
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-pkgconf
# configure: error: *** No locale_charset() nor nl_langinfo(CODESET) found.
# Please consider installing GNU libiconv.
#BuildRequires:  mingw32-win_iconv-devel
BuildRequires:  mingw32-libiconv-devel
BuildRequires:  xz
%_mingw32_package_header_debug
BuildArch:      noarch

%description
This is an implementation of double-array structure for representing
trie, as proposed by Junichi Aoe.

%package -n mingw32-libdatrie1
Summary:        Double-Array Trie Library
Group:          System/Libraries

%description -n mingw32-libdatrie1
This is an implementation of double-array structure for representing
trie, as proposed by Junichi Aoe.

%package devel
Summary:        Development files for the Double-Array Trie library
Group:          Development/Libraries/C and C++
Requires:       mingw32-libdatrie1 = %{version}
Requires:       libdatrie-devel

%description devel
This is an implementation of double-array structure for representing
trie, as proposed by Junichi Aoe.

This package contains the development files for libdatrie.

%_mingw32_debug_package

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

%build
autoreconf -fiv
%_mingw32_configure \
        --disable-static \
        --with-html-docdir=%{_mingw32_docdir}/libdatrie/html
%make_build

%install
%make_install
rm -f %{buildroot}%{_mingw32_libdir}/libdatrie.la

rm -f %{buildroot}%{_mingw32_bindir}/trietool-0.2
cp %{buildroot}%{_mingw32_bindir}/trietool.exe %{buildroot}%{_mingw32_bindir}/trietool-0.2.exe

%files -n mingw32-libdatrie1
%license COPYING
%doc AUTHORS ChangeLog README
%{_mingw32_bindir}/libdatrie*.dll

%files devel
%doc README.migration
%doc %{_mingw32_docdir}/libdatrie
%{_mingw32_bindir}/trietool*.exe
%{_mingw32_mandir}/man*/trietool*.1*
%{_mingw32_includedir}/datrie/
%{_mingw32_libdir}/libdatrie.dll.a
%{_mingw32_libdir}/pkgconfig/datrie-0.2.pc

%changelog
openSUSE Build Service is sponsored by