]>
Commit | Line | Data |
---|---|---|
4c54fa9e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without asprintf # without libasprintf (in C++) | |
4 | # | |
e86b7230 | 5 | %define realname gettext |
e5e5fbcf | 6 | Summary: gettext libraries - cross mingw32 version |
615485e8 | 7 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla mingw32 |
e86b7230 | 8 | Name: crossmingw32-%{realname} |
56f9329a | 9 | Version: 0.16.1 |
e86b7230 | 10 | Release: 1 |
11 | License: LGPL | |
12 | Group: Libraries | |
aaf94a88 | 13 | Source0: ftp://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz |
56f9329a | 14 | # Source0-md5: 3d9ad24301c6d6b17ec30704a13fe127 |
6a3f6222 | 15 | Patch0: %{realname}-info.patch |
59d0034b | 16 | Patch1: %{realname}-killkillkill.patch |
f9b2d210 | 17 | Patch2: %{name}.patch |
e86b7230 | 18 | URL: http://www.gnu.org/software/gettext/ |
024b6753 JB |
19 | BuildRequires: autoconf >= 2.60 |
20 | BuildRequires: automake >= 1:1.10 | |
e5e5fbcf | 21 | BuildRequires: crossmingw32-gcc |
4c54fa9e | 22 | %{?with_asprintf:BuildRequires: crossmingw32-gcc-c++} |
e5e5fbcf | 23 | BuildRequires: crossmingw32-libiconv |
e86b7230 | 24 | BuildRequires: libtool |
b3175891 | 25 | BuildRequires: texinfo |
59d0034b JB |
26 | Requires: crossmingw32-libiconv |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 28 | |
29 | %define no_install_post_strip 1 | |
30 | ||
31 | %define target i386-mingw32 | |
32 | %define target_platform i386-pc-mingw32 | |
59d0034b JB |
33 | %define _sysprefix /usr |
34 | %define _prefix %{_sysprefix}/%{target} | |
e86b7230 | 35 | |
36 | %define __cc %{target}-gcc | |
37 | %define __cxx %{target}-g++ | |
38 | ||
39 | %description | |
e5e5fbcf JB |
40 | gettext libraries - cross mingw32 version. |
41 | ||
8f9ab6bc JR |
42 | %description -l pl.UTF-8 |
43 | Biblioteki gettext - wersja skrośna dla mingw32. | |
e86b7230 | 44 | |
45 | %prep | |
46 | %setup -q -n %{realname}-%{version} | |
3cf55ad9 | 47 | %patch0 -p1 |
6a3f6222 | 48 | %patch1 -p1 |
49 | %patch2 -p1 | |
e86b7230 | 50 | |
51 | %build | |
e86b7230 | 52 | %{__libtoolize} |
6a3f6222 | 53 | %{__aclocal} |
e86b7230 | 54 | %{__autoconf} |
6a3f6222 | 55 | %{__automake} |
f9b2d210 | 56 | cd autoconf-lib-link |
221fdc2c | 57 | %{__aclocal} -I m4 -I ../m4 |
f9b2d210 JB |
58 | %{__autoconf} |
59 | %{__automake} | |
60 | cd ../gettext-runtime | |
4047acdd | 61 | %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4 |
6a3f6222 | 62 | %{__autoconf} |
63 | %{__automake} | |
59d0034b | 64 | cd .. |
e86b7230 | 65 | |
66 | %configure \ | |
59d0034b JB |
67 | AR="%{target}-ar" \ |
68 | RANLIB="%{target}-ranlib" \ | |
e86b7230 | 69 | --target=%{target} \ |
70 | --host=%{target_platform} \ | |
f9b2d210 | 71 | --disable-csharp \ |
59d0034b | 72 | --disable-static |
e86b7230 | 73 | %{__make} |
74 | ||
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 77 | |
78 | %{__make} install \ | |
79 | DESTDIR=$RPM_BUILD_ROOT | |
80 | ||
59d0034b JB |
81 | %if 0%{!?debug:1} |
82 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_bindir}/*.dll | |
83 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
84 | %endif | |
85 | ||
e86b7230 | 86 | %clean |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
e5e5fbcf | 90 | %defattr(644,root,root,755) |
7063962d JB |
91 | %{_bindir}/libintl-8.dll |
92 | %{_libdir}/libintl.dll.a | |
93 | %{_libdir}/libintl.la | |
4c54fa9e | 94 | %if %{with asprintf} |
7063962d JB |
95 | %{_bindir}/libasprintf-0.dll |
96 | %{_libdir}/libasprintf.dll.a | |
4c54fa9e JB |
97 | %{_libdir}/libasprintf.la |
98 | %endif | |
59d0034b | 99 | %{_includedir}/*.h |