File mingw32-gettext.spec of Package mingw32-gettext

%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
%define __os_install_post %{_mingw32_debug_install_post} \
                          %{_mingw32_install_post}

Name:           mingw32-gettext
Version:        0.18.1.1
Release:        0
Summary:        GNU libraries and utilities for producing multi-lingual messages

License:        GPLv2+ and LGPLv2+
Group:          Development/Libraries
Url:            http://www.gnu.org/software/gettext/
Source0:        http://ftp.gnu.org/pub/gnu/gettext/gettext-%{version}.tar.gz
Source100:      %{name}-rpmlintrc
Patch0:         gettext-0.18.1.1-tml.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildArch: noarch
#!BuildIgnore: post-build-checks

BuildRequires:  mingw32-filesystem >= 23
BuildRequires:  mingw32-runtime
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-win_iconv-devel

%description
GNU gettext library for internationalization of software.  This package offers to programmers, translators, and even
users, a well integrated set of tools and documentation.  GNU gettext is designed to minimize the impact of
internationalization on program sources, keeping this impact as small and hardly noticeable as possible.


%package runtime
Summary:        GNU libraries and utilities for producing multi-lingual messages (runtime)
Group:          Development/Libraries

%description runtime
GNU gettext library for internationalization of software.  This package offers to programmers, translators, and even
users, a well integrated set of tools and documentation.  GNU gettext is designed to minimize the impact of
internationalization on program sources, keeping this impact as small and hardly noticeable as possible.


%package -n mingw32-libintl
Summary:        GNU libraries and utilities for producing multi-lingual messages (libintl)
Group:          Development/Libraries

%description -n mingw32-libintl
GNU gettext library for internationalization of software.
This package contains the dynamic library needed at runtime by programs using gettext.


%package -n mingw32-libintl-devel
Summary:        GNU libraries and utilities for producing multi-lingual messages (libintl development files)
Group:          Development/Libraries

%description -n mingw32-libintl-devel
GNU gettext library for internationalization of software.
This package contains the development files needed to link against libintl.


%package tools
Summary:        GNU libraries and utilities for producing multi-lingual messages (tools)
Group:          Development/Libraries
Requires:       %{name}-runtime >= %{version}
Requires:       mingw32(lib:iconv)

%description tools
GNU gettext library for internationalization of software.  This package offers to programmers, translators, and even
users, a well integrated set of tools and documentation.  GNU gettext is designed to minimize the impact of
internationalization on program sources, keeping this impact as small and hardly noticeable as possible.


%{_mingw32_debug_package}

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

%patch0 -p0 -b .tml


%build
echo "lt_cv_deplibs_check_method='pass_all'" >>mingw32-config.cache
echo "gl_cv_func_memchr_works='yes'" >>mingw32-config.cache
echo "ac_cv_func_strnlen_working='yes'" >>mingw32-config.cache
%{_mingw32_configure} \
	--disable-java --disable-native-java \
	--disable-csharp \
	--without-emacs \
	--enable-threads=win32 \
	--enable-shared --disable-static

%{_mingw32_make} %{?_smp_mflags} || %{_mingw32_make}


%install
%{_mingw32_make} DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_mingw32_datadir}/locale/locale.alias
rm -f %{buildroot}%{_mingw32_libdir}/charset.alias
rm -f %{buildroot}%{_mingw32_datadir}/info/dir

%find_lang gettext-runtime
%find_lang gettext-tools

%clean
rm -rf ${buildroot}


%files -n mingw32-libintl
%defattr(-,root,root)
%{_mingw32_bindir}/libintl-8.dll

%files -n mingw32-libintl-devel
%defattr(-,root,root)
%{_mingw32_includedir}/libintl.h
%{_mingw32_libdir}/libintl.dll.a

%files runtime -f gettext-runtime.lang
%defattr(-,root,root)
%{_mingw32_bindir}/envsubst.exe
%{_mingw32_bindir}/gettext.exe
%{_mingw32_bindir}/gettext.sh
%{_mingw32_bindir}/msgfmt.exe
%{_mingw32_bindir}/ngettext.exe
%{_mingw32_bindir}/libasprintf-0.dll
%{_mingw32_bindir}/libgettextlib-*-*.dll
%{_mingw32_bindir}/libgettextsrc-*-*.dll

%{_mingw32_mandir}/man1/envsubst.1*
%{_mingw32_mandir}/man1/gettext.1*
%{_mingw32_mandir}/man1/msgfmt.1*
%{_mingw32_mandir}/man1/ngettext.1*

%{_mingw32_mandir}/man3/bind_textdomain_codeset.3*
%{_mingw32_mandir}/man3/bindtextdomain.3*
%{_mingw32_mandir}/man3/dcgettext.3*
%{_mingw32_mandir}/man3/dcngettext.3*
%{_mingw32_mandir}/man3/dgettext.3*
%{_mingw32_mandir}/man3/dngettext.3*
%{_mingw32_mandir}/man3/gettext.3*
%{_mingw32_mandir}/man3/ngettext.3*
%{_mingw32_mandir}/man3/textdomain.3*


%files tools -f gettext-tools.lang
%defattr(-,root,root)
%{_mingw32_bindir}/autopoint
%{_mingw32_bindir}/gettextize
%{_mingw32_bindir}/libgettextpo-0.dll
%{_mingw32_bindir}/msg*.exe
%exclude %{_mingw32_bindir}/msgfmt.exe
%{_mingw32_bindir}/recode-sr-latin.exe
%{_mingw32_bindir}/xgettext.exe

%{_mingw32_includedir}/autosprintf.h
%{_mingw32_includedir}/gettext-po.h

%{_mingw32_libdir}/gettext
%{_mingw32_libdir}/libasprintf.dll.a
%{_mingw32_libdir}/libgettextlib.dll.a
%{_mingw32_libdir}/libgettextpo.dll.a
%{_mingw32_libdir}/libgettextsrc.dll.a
%{_mingw32_docdir}/gettext
%{_mingw32_docdir}/libasprintf/autosprintf_all.html

%{_mingw32_datadir}/gettext/
%{_mingw32_datadir}/aclocal/*m4
%{_mingw32_datadir}/info/autosprintf.info*
%{_mingw32_datadir}/info/gettext.info*

%{_mingw32_mandir}/man1/autopoint.1*
%{_mingw32_mandir}/man1/gettextize.1*
%{_mingw32_mandir}/man1/msg*1*
%exclude %{_mingw32_mandir}/man1/msgfmt.1*
%{_mingw32_mandir}/man1/recode-sr-latin.1*
%{_mingw32_mandir}/man1/xgettext.1*


%changelog
openSUSE Build Service is sponsored by