File mingw64-win_iconv.spec of Package mingw64-win_iconv
#
# spec file for package mingw64-win_iconv
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
Name: mingw64-win_iconv
Version: 0.0.8
Release: 0
Summary: An implementation of iconv using win32 API
License: SUSE-Public-Domain
Group: Development/Libraries
Url: https://github.com/win-iconv/win-iconv/
Source: https://github.com/win-iconv/win-iconv/archive/v%{version}.tar.gz#/win-iconv-%{version}.tar.gz
Patch0: win-iconv-0.0.8-fix-library-prefix.patch
#!BuildIgnore: post-build-checks
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-filesystem
%_mingw64_package_header_debug
BuildArch: noarch
%description
The win_iconv is an implementation of iconv for Windows by Yukihiro Nakadaira
that has a much smaller footprint than GNU libiconv.
%package devel
Summary: An implementation of iconv using win32 API (development files)
Group: Development/Libraries
%description devel
The win_iconv is an implementation of iconv for Windows by Yukihiro Nakadaira
that has a much smaller footprint than GNU libiconv (development files).
The Win32 API does not support strict encoding conversion for some codepage.
And MLang function drops or replaces invalid bytes and does not return
useful error status as iconv does. This implementation cannot be used for
encoding validation purpose.
%package devel-static
Summary: An implementation of iconv using win32 API (development files)
Group: Development/Libraries
Requires: mingw64-libwin_iconv = %{version}
%description devel-static
The win_iconv is an implementation of iconv for Windows by Yukihiro Nakadaira
that has a much smaller footprint than GNU libiconv (development files).
The Win32 API does not support strict encoding conversion for some codepage.
And MLang function drops or replaces invalid bytes and does not return
useful error status as iconv does. This implementation cannot be used for
encoding validation purpose.
%package -n mingw64-libwin_iconv
Summary: An implementation of iconv using win32 API (shared library)
Group: Development/Libraries
Provides: %{name}-dll = %{version}
Obsoletes: %{name}-dll < %{version}
%description -n mingw64-libwin_iconv
The win_iconv is an implementation of iconv for Windows by Yukihiro Nakadaira
that has a much smaller footprint than GNU libiconv.
This package contains a shared library.
%_mingw64_debug_package
%prep
%autosetup -p1 -n win-iconv-%{version}
%build
rm Makefile
%{_mingw64_cmake} -DBUILD_STATIC=ON -DBUILD_SHARED=ON -DBUILD_EXECUTABLE=ON
%{_mingw64_cmake_build}
%install
%{_mingw64_cmake_install}
pushd %{buildroot}%{_mingw64_bindir}
cp win_iconv.exe iconv.exe
cp libiconv.dll iconv.dll
popd
%files
%defattr(-,root,root)
%{_mingw64_bindir}/iconv.exe
%{_mingw64_bindir}/win_iconv.exe
%files devel
%defattr(-,root,root)
%{_mingw64_libdir}/libiconv.dll.a
%{_mingw64_includedir}/iconv.h
%files devel-static
%defattr(-,root,root)
%{_mingw64_libdir}/libiconv.a
%{_mingw64_includedir}/iconv.h
%files -n mingw64-libwin_iconv
%defattr(-,root,root)
%{_mingw64_bindir}/iconv.dll
%{_mingw64_bindir}/libiconv.dll
%changelog