File mingw32-win_iconv.spec of Package mingw32-win_iconv
#
# spec file for package mingw32-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:           mingw32-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
#!BuildIgnore: post-build-checks
BuildRequires:  cmake
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-filesystem
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{_mingw32_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).
%package dll
Summary:        An implementation of iconv using win32 API (shared library to load dynamically)
Group:          Development/Libraries
%description dll
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 that is used by programs that need to
load symbols dynamically.
%_mingw32_debug_package
%prep
%setup -q -n win-iconv-%{version}
%build
%{_mingw32_cmake} -DBUILD_STATIC=ON -DBUILD_SHARED=ON -DBUILD_EXECUTABLE=ON .
%{_mingw32_make}
%install
%{_mingw32_make} DESTDIR=%{buildroot} install
pushd %{buildroot}%{_mingw32_bindir}
cp win_iconv.exe iconv.exe
cp iconv.dll libiconv.dll
popd
rm %{buildroot}%{_mingw32_libdir}/*.dll.a
%files
%defattr(-,root,root)
%{_mingw32_bindir}/iconv.exe
%{_mingw32_bindir}/win_iconv.exe
%files devel
%defattr(-,root,root)
%{_mingw32_libdir}/libiconv.a
%{_mingw32_includedir}/iconv.h
%files dll
%defattr(-,root,root)
%{_mingw32_bindir}/iconv.dll
%{_mingw32_bindir}/libiconv.dll
%changelog