]>
Commit | Line | Data |
---|---|---|
bc5a7e54 JB |
1 | Summary: gettext libraries - cross MinGW32 version |
2 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla MinGW32 | |
fb17fcec JB |
3 | %define realname gettext |
4 | Name: crossmingw32-%{realname} | |
608b2743 | 5 | Version: 0.18.1.1 |
e86b7230 | 6 | Release: 1 |
fb17fcec | 7 | License: LGPL v2+ |
c9e435aa | 8 | Group: Development/Libraries |
ab7c136d | 9 | Source0: http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz |
608b2743 JB |
10 | # Source0-md5: 3dd55b952826d2b32f51308f2f91aa89 |
11 | Patch0: %{realname}-libintl_by_gcj.patch | |
12 | Patch1: %{name}-kill_tools.patch | |
e86b7230 | 13 | URL: http://www.gnu.org/software/gettext/ |
608b2743 JB |
14 | BuildRequires: autoconf >= 2.62 |
15 | BuildRequires: automake >= 1:1.11 | |
e5e5fbcf | 16 | BuildRequires: crossmingw32-gcc |
db148317 | 17 | BuildRequires: crossmingw32-gcc-c++ |
e5e5fbcf | 18 | BuildRequires: crossmingw32-libiconv |
e86b7230 | 19 | BuildRequires: libtool |
b3175891 | 20 | BuildRequires: texinfo |
59d0034b JB |
21 | Requires: crossmingw32-libiconv |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 23 | |
24 | %define no_install_post_strip 1 | |
25 | ||
26 | %define target i386-mingw32 | |
27 | %define target_platform i386-pc-mingw32 | |
db148317 | 28 | |
59d0034b JB |
29 | %define _sysprefix /usr |
30 | %define _prefix %{_sysprefix}/%{target} | |
80f32cc3 | 31 | %define _libdir %{_prefix}/lib |
db148317 | 32 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
c9e435aa | 33 | %define _dlldir /usr/share/wine/windows/system |
e86b7230 | 34 | %define __cc %{target}-gcc |
35 | %define __cxx %{target}-g++ | |
36 | ||
608b2743 JB |
37 | %ifnarch %{ix86} |
38 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
39 | %define optflags -O2 | |
40 | %endif | |
41 | # -z options are invalid for mingw linker | |
42 | %define filterout_ld -Wl,-z,.* | |
43 | ||
e86b7230 | 44 | %description |
bc5a7e54 | 45 | gettext libraries - cross MinGW32 version. |
e5e5fbcf | 46 | |
8f9ab6bc | 47 | %description -l pl.UTF-8 |
bc5a7e54 | 48 | Biblioteki gettext - wersja skrośna dla MinGW32. |
e86b7230 | 49 | |
c9e435aa | 50 | %package static |
bc5a7e54 JB |
51 | Summary: Static gettext libraries (cross MinGW32 version) |
52 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna MinGW32) | |
c9e435aa JB |
53 | Group: Development/Libraries |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description static | |
bc5a7e54 | 57 | Static gettext libraries (cross MinGW32 version). |
c9e435aa JB |
58 | |
59 | %description static -l pl.UTF-8 | |
bc5a7e54 | 60 | Statyczne biblioteki gettext (wersja skrośna MinGW32). |
c9e435aa JB |
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 |
e86b7230 | 79 | |
80 | %build | |
e86b7230 | 81 | %{__libtoolize} |
608b2743 | 82 | cd gettext-runtime |
5afd9185 | 83 | %{__libtoolize} |
608b2743 | 84 | %{__aclocal} -I m4 -I ../m4 -I gnulib-m4 |
6a3f6222 | 85 | %{__autoconf} |
5afd9185 ŁK |
86 | %{__autoheader} |
87 | %{__automake} | |
88 | cd libasprintf | |
608b2743 | 89 | %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4 |
5afd9185 ŁK |
90 | %{__autoconf} |
91 | %{__autoheader} | |
92 | %{__automake} | |
608b2743 JB |
93 | cd ../../gettext-tools |
94 | %{__aclocal} -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 | |
95 | %{__autoconf} | |
96 | %{__autoheader} | |
97 | %{__automake} | |
98 | cd .. | |
99 | %{__aclocal} -I m4 | |
5afd9185 | 100 | %{__autoconf} |
6a3f6222 | 101 | %{__automake} |
e86b7230 | 102 | %configure \ |
103 | --target=%{target} \ | |
9738850f | 104 | --host=%{target} \ |
f9b2d210 | 105 | --disable-csharp \ |
608b2743 JB |
106 | --enable-static \ |
107 | --without-git | |
9738850f | 108 | |
608b2743 | 109 | %{__make} |
e86b7230 | 110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 113 | |
114 | %{__make} install \ | |
115 | DESTDIR=$RPM_BUILD_ROOT | |
116 | ||
c9e435aa JB |
117 | install -d $RPM_BUILD_ROOT%{_dlldir} |
118 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
119 | ||
59d0034b | 120 | %if 0%{!?debug:1} |
c9e435aa | 121 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
122 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
123 | %endif | |
c9e435aa JB |
124 | |
125 | rm -f $RPM_BUILD_ROOT%{_libdir}/charset.alias | |
126 | rm -rf $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gettext,locale,man} | |
127 | rm -rf $RPM_BUILD_ROOT%{_infodir} | |
128 | ||
e86b7230 | 129 | %clean |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
132 | %files | |
e5e5fbcf | 133 | %defattr(644,root,root,755) |
0449639a | 134 | %{_libdir}/libintl.dll.a |
7063962d | 135 | %{_libdir}/libintl.la |
7063962d | 136 | %{_libdir}/libasprintf.dll.a |
4c54fa9e | 137 | %{_libdir}/libasprintf.la |
608b2743 JB |
138 | %{_includedir}/autosprintf.h |
139 | %{_includedir}/libintl.h | |
c9e435aa JB |
140 | |
141 | %files static | |
142 | %defattr(644,root,root,755) | |
143 | %{_libdir}/libintl.a | |
144 | %{_libdir}/libasprintf.a | |
145 | ||
146 | %files dll | |
147 | %defattr(644,root,root,755) | |
148 | %{_dlldir}/libintl-8.dll | |
149 | %{_dlldir}/libasprintf-0.dll |