]>
Commit | Line | Data |
---|---|---|
97f38208 | 1 | %define realname gettext |
bc5a7e54 JB |
2 | Summary: gettext libraries - cross MinGW32 version |
3 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla MinGW32 | |
fb17fcec | 4 | Name: crossmingw32-%{realname} |
7a0f63e2 | 5 | Version: 0.18.3.2 |
e5f47d69 | 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 |
7a0f63e2 | 10 | # Source0-md5: 241aba309d07aa428252c74b40a818ef |
608b2743 JB |
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++ | |
97f38208 | 36 | %define _ssp_cflags %{nil} |
e86b7230 | 37 | |
608b2743 JB |
38 | %ifnarch %{ix86} |
39 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
40 | %define optflags -O2 | |
41 | %endif | |
42 | # -z options are invalid for mingw linker | |
43 | %define filterout_ld -Wl,-z,.* | |
44 | ||
e86b7230 | 45 | %description |
bc5a7e54 | 46 | gettext libraries - cross MinGW32 version. |
e5e5fbcf | 47 | |
8f9ab6bc | 48 | %description -l pl.UTF-8 |
bc5a7e54 | 49 | Biblioteki gettext - wersja skrośna dla MinGW32. |
e86b7230 | 50 | |
c9e435aa | 51 | %package static |
bc5a7e54 JB |
52 | Summary: Static gettext libraries (cross MinGW32 version) |
53 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna MinGW32) | |
c9e435aa JB |
54 | Group: Development/Libraries |
55 | Requires: %{name} = %{version}-%{release} | |
56 | ||
57 | %description static | |
bc5a7e54 | 58 | Static gettext libraries (cross MinGW32 version). |
c9e435aa JB |
59 | |
60 | %description static -l pl.UTF-8 | |
bc5a7e54 | 61 | Statyczne biblioteki gettext (wersja skrośna MinGW32). |
c9e435aa JB |
62 | |
63 | %package dll | |
64 | Summary: DLL gettext libraries for Windows | |
65 | Summary(pl.UTF-8): Biblioteki DLL gettext dla Windows | |
66 | Group: Applications/Emulators | |
d17eea6e | 67 | Requires: crossmingw32-libiconv-dll |
c9e435aa JB |
68 | Requires: wine |
69 | ||
70 | %description dll | |
71 | DLL gettext libraries for Windows. | |
72 | ||
73 | %description dll -l pl.UTF-8 | |
74 | Biblioteki DLL gettext dla Windows. | |
75 | ||
e86b7230 | 76 | %prep |
fb17fcec | 77 | %setup -q -n %{realname}-%{version} |
3cf55ad9 | 78 | %patch0 -p1 |
6a3f6222 | 79 | %patch1 -p1 |
e86b7230 | 80 | |
81 | %build | |
e86b7230 | 82 | %{__libtoolize} |
608b2743 | 83 | cd gettext-runtime |
5afd9185 | 84 | %{__libtoolize} |
608b2743 | 85 | %{__aclocal} -I m4 -I ../m4 -I gnulib-m4 |
6a3f6222 | 86 | %{__autoconf} |
5afd9185 ŁK |
87 | %{__autoheader} |
88 | %{__automake} | |
89 | cd libasprintf | |
608b2743 | 90 | %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4 |
5afd9185 ŁK |
91 | %{__autoconf} |
92 | %{__autoheader} | |
93 | %{__automake} | |
608b2743 JB |
94 | cd ../../gettext-tools |
95 | %{__aclocal} -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 | |
96 | %{__autoconf} | |
97 | %{__autoheader} | |
98 | %{__automake} | |
99 | cd .. | |
100 | %{__aclocal} -I m4 | |
5afd9185 | 101 | %{__autoconf} |
6a3f6222 | 102 | %{__automake} |
e86b7230 | 103 | %configure \ |
104 | --target=%{target} \ | |
9738850f | 105 | --host=%{target} \ |
f9b2d210 | 106 | --disable-csharp \ |
608b2743 | 107 | --enable-static \ |
2116e22e JB |
108 | --without-bzip2 \ |
109 | --without-git \ | |
110 | --with-xz | |
9738850f | 111 | |
608b2743 | 112 | %{__make} |
e86b7230 | 113 | |
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 116 | |
117 | %{__make} install \ | |
118 | DESTDIR=$RPM_BUILD_ROOT | |
119 | ||
c9e435aa JB |
120 | install -d $RPM_BUILD_ROOT%{_dlldir} |
121 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
122 | ||
59d0034b | 123 | %if 0%{!?debug:1} |
c9e435aa | 124 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
125 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
126 | %endif | |
c9e435aa | 127 | |
e5f47d69 JB |
128 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{{envsubst,gettext,ngettext}.exe,gettext.sh} |
129 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,gettext,locale,man} | |
130 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
c9e435aa | 131 | |
e86b7230 | 132 | %clean |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %files | |
e5e5fbcf | 136 | %defattr(644,root,root,755) |
0449639a | 137 | %{_libdir}/libintl.dll.a |
7063962d | 138 | %{_libdir}/libintl.la |
7063962d | 139 | %{_libdir}/libasprintf.dll.a |
4c54fa9e | 140 | %{_libdir}/libasprintf.la |
608b2743 JB |
141 | %{_includedir}/autosprintf.h |
142 | %{_includedir}/libintl.h | |
c9e435aa JB |
143 | |
144 | %files static | |
145 | %defattr(644,root,root,755) | |
146 | %{_libdir}/libintl.a | |
147 | %{_libdir}/libasprintf.a | |
148 | ||
149 | %files dll | |
150 | %defattr(644,root,root,755) | |
151 | %{_dlldir}/libintl-8.dll | |
152 | %{_dlldir}/libasprintf-0.dll |