]>
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} |
5dff76fa JB |
5 | Version: 0.20.1 |
6 | Release: 1 | |
fb17fcec | 7 | License: LGPL v2+ |
c9e435aa | 8 | Group: Development/Libraries |
5dff76fa JB |
9 | Source0: http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.xz |
10 | # Source0-md5: 9ed9e26ab613b668e0026222a9c23639 | |
11 | Patch0: %{name}-kill_tools.patch | |
12 | Patch1: %{realname}-mingw32.patch | |
e86b7230 | 13 | URL: http://www.gnu.org/software/gettext/ |
5dff76fa | 14 | BuildRequires: autoconf >= 2.63 |
478762d8 | 15 | BuildRequires: automake >= 1:1.13 |
e5e5fbcf | 16 | BuildRequires: crossmingw32-gcc |
db148317 | 17 | BuildRequires: crossmingw32-gcc-c++ |
e5e5fbcf | 18 | BuildRequires: crossmingw32-libiconv |
478762d8 JB |
19 | BuildRequires: libtool >= 2:2 |
20 | BuildRequires: sed >= 4.0 | |
65675030 | 21 | BuildRequires: tar >= 1:1.22 |
b3175891 | 22 | BuildRequires: texinfo |
5dff76fa | 23 | BuildRequires: xz |
59d0034b JB |
24 | Requires: crossmingw32-libiconv |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 26 | |
27 | %define no_install_post_strip 1 | |
28 | ||
29 | %define target i386-mingw32 | |
30 | %define target_platform i386-pc-mingw32 | |
db148317 | 31 | |
59d0034b JB |
32 | %define _sysprefix /usr |
33 | %define _prefix %{_sysprefix}/%{target} | |
80f32cc3 | 34 | %define _libdir %{_prefix}/lib |
db148317 | 35 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
c9e435aa | 36 | %define _dlldir /usr/share/wine/windows/system |
e86b7230 | 37 | %define __cc %{target}-gcc |
38 | %define __cxx %{target}-g++ | |
97f38208 | 39 | %define _ssp_cflags %{nil} |
e86b7230 | 40 | |
608b2743 JB |
41 | %ifnarch %{ix86} |
42 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
43 | %define optflags -O2 | |
44 | %endif | |
45 | # -z options are invalid for mingw linker | |
46 | %define filterout_ld -Wl,-z,.* | |
47 | ||
e86b7230 | 48 | %description |
bc5a7e54 | 49 | gettext libraries - cross MinGW32 version. |
e5e5fbcf | 50 | |
8f9ab6bc | 51 | %description -l pl.UTF-8 |
bc5a7e54 | 52 | Biblioteki gettext - wersja skrośna dla MinGW32. |
e86b7230 | 53 | |
c9e435aa | 54 | %package static |
bc5a7e54 JB |
55 | Summary: Static gettext libraries (cross MinGW32 version) |
56 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna MinGW32) | |
c9e435aa JB |
57 | Group: Development/Libraries |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description static | |
bc5a7e54 | 61 | Static gettext libraries (cross MinGW32 version). |
c9e435aa JB |
62 | |
63 | %description static -l pl.UTF-8 | |
bc5a7e54 | 64 | Statyczne biblioteki gettext (wersja skrośna MinGW32). |
c9e435aa JB |
65 | |
66 | %package dll | |
67 | Summary: DLL gettext libraries for Windows | |
68 | Summary(pl.UTF-8): Biblioteki DLL gettext dla Windows | |
69 | Group: Applications/Emulators | |
d17eea6e | 70 | Requires: crossmingw32-libiconv-dll |
c9e435aa JB |
71 | Requires: wine |
72 | ||
73 | %description dll | |
74 | DLL gettext libraries for Windows. | |
75 | ||
76 | %description dll -l pl.UTF-8 | |
77 | Biblioteki DLL gettext dla Windows. | |
78 | ||
e86b7230 | 79 | %prep |
fb17fcec | 80 | %setup -q -n %{realname}-%{version} |
3cf55ad9 | 81 | %patch0 -p1 |
6a3f6222 | 82 | %patch1 -p1 |
e86b7230 | 83 | |
478762d8 JB |
84 | %{__sed} -i \ |
85 | -e 's@m4_esyscmd(\[build-aux/git-version-gen \.tarball-version\])@[%{version}]@' \ | |
86 | configure.ac | |
87 | %{__sed} -i \ | |
88 | -e 's@m4_esyscmd(\[\.\./build-aux/git-version-gen \.\./\.tarball-version\])@[%{version}]@' \ | |
89 | gettext-runtime/configure.ac \ | |
90 | gettext-tools/configure.ac | |
91 | ||
e86b7230 | 92 | %build |
608b2743 | 93 | cd gettext-runtime |
5afd9185 | 94 | %{__libtoolize} |
608b2743 | 95 | %{__aclocal} -I m4 -I ../m4 -I gnulib-m4 |
6a3f6222 | 96 | %{__autoconf} |
5afd9185 ŁK |
97 | %{__autoheader} |
98 | %{__automake} | |
99 | cd libasprintf | |
608b2743 | 100 | %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4 |
5afd9185 ŁK |
101 | %{__autoconf} |
102 | %{__autoheader} | |
103 | %{__automake} | |
5dff76fa JB |
104 | cd ../../libtextstyle |
105 | %{__libtoolize} | |
106 | %{__aclocal} -I m4 -I gnulib-m4 | |
107 | %{__autoconf} | |
108 | %{__autoheader} | |
109 | %{__automake} | |
110 | cd ../gettext-tools | |
608b2743 JB |
111 | %{__aclocal} -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 |
112 | %{__autoconf} | |
113 | %{__autoheader} | |
114 | %{__automake} | |
5dff76fa JB |
115 | cd examples |
116 | %{__aclocal} -I ../../gettext-runtime/m4 -I ../../m4 | |
117 | %{__autoconf} | |
118 | %{__automake} | |
119 | cd ../.. | |
608b2743 | 120 | %{__aclocal} -I m4 |
5afd9185 | 121 | %{__autoconf} |
6a3f6222 | 122 | %{__automake} |
e86b7230 | 123 | %configure \ |
124 | --target=%{target} \ | |
9738850f | 125 | --host=%{target} \ |
f9b2d210 | 126 | --disable-csharp \ |
608b2743 | 127 | --enable-static \ |
a70f2dde | 128 | --enable-threads=windows \ |
2116e22e JB |
129 | --without-bzip2 \ |
130 | --without-git \ | |
131 | --with-xz | |
9738850f | 132 | |
608b2743 | 133 | %{__make} |
e86b7230 | 134 | |
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 137 | |
138 | %{__make} install \ | |
139 | DESTDIR=$RPM_BUILD_ROOT | |
140 | ||
c9e435aa | 141 | install -d $RPM_BUILD_ROOT%{_dlldir} |
38daf245 | 142 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
c9e435aa | 143 | |
59d0034b | 144 | %if 0%{!?debug:1} |
c9e435aa | 145 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
146 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
147 | %endif | |
c9e435aa | 148 | |
e5f47d69 JB |
149 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{{envsubst,gettext,ngettext}.exe,gettext.sh} |
150 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,gettext,locale,man} | |
151 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
c9e435aa | 152 | |
e86b7230 | 153 | %clean |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %files | |
e5e5fbcf | 157 | %defattr(644,root,root,755) |
0449639a | 158 | %{_libdir}/libintl.dll.a |
7063962d | 159 | %{_libdir}/libintl.la |
7063962d | 160 | %{_libdir}/libasprintf.dll.a |
4c54fa9e | 161 | %{_libdir}/libasprintf.la |
608b2743 JB |
162 | %{_includedir}/autosprintf.h |
163 | %{_includedir}/libintl.h | |
c9e435aa JB |
164 | |
165 | %files static | |
166 | %defattr(644,root,root,755) | |
167 | %{_libdir}/libintl.a | |
168 | %{_libdir}/libasprintf.a | |
169 | ||
170 | %files dll | |
171 | %defattr(644,root,root,755) | |
172 | %{_dlldir}/libintl-8.dll | |
173 | %{_dlldir}/libasprintf-0.dll |