]>
Commit | Line | Data |
---|---|---|
5afd9185 ŁK |
1 | # |
2 | %bcond_with bootstrap # use system GLib | |
3 | # | |
e5e5fbcf | 4 | Summary: gettext libraries - cross mingw32 version |
615485e8 | 5 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla mingw32 |
fb17fcec JB |
6 | %define realname gettext |
7 | Name: crossmingw32-%{realname} | |
8 | Version: 0.17 | |
e86b7230 | 9 | Release: 1 |
fb17fcec | 10 | License: LGPL v2+ |
c9e435aa | 11 | Group: Development/Libraries |
ab7c136d | 12 | Source0: http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz |
fb17fcec JB |
13 | # Source0-md5: 58a2bc6d39c0ba57823034d55d65d606 |
14 | Patch0: %{realname}-info.patch | |
5afd9185 ŁK |
15 | Patch1: %{realname}-libintl_by_gcj.patch |
16 | Patch2: %{realname}-removed_macros.patch | |
17 | Patch3: %{name}-kill_tools.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 |
db148317 | 22 | BuildRequires: crossmingw32-gcc-c++ |
fb17fcec | 23 | # just to shorten build (libgettextlib is not packaged anyway) |
5afd9185 | 24 | %{!?with_bootstrap:BuildRequires: crossmingw32-glib2 >= 2.0} |
e5e5fbcf | 25 | BuildRequires: crossmingw32-libiconv |
e86b7230 | 26 | BuildRequires: libtool |
b3175891 | 27 | BuildRequires: texinfo |
59d0034b JB |
28 | Requires: crossmingw32-libiconv |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 30 | |
31 | %define no_install_post_strip 1 | |
32 | ||
33 | %define target i386-mingw32 | |
34 | %define target_platform i386-pc-mingw32 | |
db148317 | 35 | |
59d0034b JB |
36 | %define _sysprefix /usr |
37 | %define _prefix %{_sysprefix}/%{target} | |
80f32cc3 | 38 | %define _libdir %{_prefix}/lib |
db148317 | 39 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
c9e435aa | 40 | %define _dlldir /usr/share/wine/windows/system |
e86b7230 | 41 | %define __cc %{target}-gcc |
42 | %define __cxx %{target}-g++ | |
43 | ||
44 | %description | |
e5e5fbcf JB |
45 | gettext libraries - cross mingw32 version. |
46 | ||
8f9ab6bc JR |
47 | %description -l pl.UTF-8 |
48 | Biblioteki gettext - wersja skrośna dla mingw32. | |
e86b7230 | 49 | |
c9e435aa JB |
50 | %package static |
51 | Summary: Static gettext libraries (cross mingw32 version) | |
52 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna mingw32) | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static gettext libraries (cross mingw32 version). | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczne biblioteki gettext (wersja skrośna mingw32). | |
61 | ||
62 | %package dll | |
63 | Summary: DLL gettext libraries for Windows | |
64 | Summary(pl.UTF-8): Biblioteki DLL gettext dla Windows | |
65 | Group: Applications/Emulators | |
d17eea6e | 66 | Requires: crossmingw32-libiconv-dll |
c9e435aa JB |
67 | Requires: wine |
68 | ||
69 | %description dll | |
70 | DLL gettext libraries for Windows. | |
71 | ||
72 | %description dll -l pl.UTF-8 | |
73 | Biblioteki DLL gettext dla Windows. | |
74 | ||
e86b7230 | 75 | %prep |
fb17fcec | 76 | %setup -q -n %{realname}-%{version} |
3cf55ad9 | 77 | %patch0 -p1 |
6a3f6222 | 78 | %patch1 -p1 |
5afd9185 ŁK |
79 | %patch2 -p1 |
80 | %patch3 -p1 | |
e86b7230 | 81 | |
82 | %build | |
e86b7230 | 83 | %{__libtoolize} |
f9b2d210 | 84 | cd autoconf-lib-link |
221fdc2c | 85 | %{__aclocal} -I m4 -I ../m4 |
f9b2d210 JB |
86 | %{__autoconf} |
87 | %{__automake} | |
88 | cd ../gettext-runtime | |
5afd9185 | 89 | %{__libtoolize} |
4047acdd | 90 | %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4 |
6a3f6222 | 91 | %{__autoconf} |
5afd9185 ŁK |
92 | %{__autoheader} |
93 | %{__automake} | |
94 | cd libasprintf | |
95 | %{__aclocal} -I ../m4 -I ../../m4 | |
96 | %{__autoconf} | |
97 | %{__autoheader} | |
98 | %{__automake} | |
99 | cd ../.. | |
100 | %{__aclocal} | |
101 | %{__autoconf} | |
6a3f6222 | 102 | %{__automake} |
e86b7230 | 103 | |
104 | %configure \ | |
105 | --target=%{target} \ | |
9738850f | 106 | --host=%{target} \ |
f9b2d210 | 107 | --disable-csharp \ |
9738850f | 108 | --enable-static |
109 | ||
fb17fcec JB |
110 | %{__make} \ |
111 | SHELL=bash | |
e86b7230 | 112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 115 | |
116 | %{__make} install \ | |
117 | DESTDIR=$RPM_BUILD_ROOT | |
118 | ||
c9e435aa JB |
119 | install -d $RPM_BUILD_ROOT%{_dlldir} |
120 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
121 | ||
59d0034b | 122 | %if 0%{!?debug:1} |
c9e435aa | 123 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
124 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
125 | %endif | |
c9e435aa JB |
126 | |
127 | rm -f $RPM_BUILD_ROOT%{_libdir}/charset.alias | |
128 | rm -rf $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gettext,locale,man} | |
129 | rm -rf $RPM_BUILD_ROOT%{_infodir} | |
130 | ||
e86b7230 | 131 | %clean |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
134 | %files | |
e5e5fbcf | 135 | %defattr(644,root,root,755) |
0449639a | 136 | %{_libdir}/libintl.dll.a |
7063962d | 137 | %{_libdir}/libintl.la |
7063962d | 138 | %{_libdir}/libasprintf.dll.a |
4c54fa9e | 139 | %{_libdir}/libasprintf.la |
c9e435aa JB |
140 | %{_includedir}/*.h |
141 | ||
142 | %files static | |
143 | %defattr(644,root,root,755) | |
144 | %{_libdir}/libintl.a | |
145 | %{_libdir}/libasprintf.a | |
146 | ||
147 | %files dll | |
148 | %defattr(644,root,root,755) | |
149 | %{_dlldir}/libintl-8.dll | |
150 | %{_dlldir}/libasprintf-0.dll |