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