]>
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} |
62708ac7 | 5 | Version: 0.22.5 |
6c959d56 JB |
6 | Release: 1 |
7 | License: LGPL v2.1+ | |
c9e435aa | 8 | Group: Development/Libraries |
3b0ebe07 | 9 | Source0: https://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.lz |
62708ac7 | 10 | # Source0-md5: d82550b0c72b2bf175b682d27c7565fc |
5dff76fa JB |
11 | Patch0: %{name}-kill_tools.patch |
12 | Patch1: %{realname}-mingw32.patch | |
e86b7230 | 13 | URL: http://www.gnu.org/software/gettext/ |
217974b1 | 14 | BuildRequires: autoconf >= 2.64 |
478762d8 | 15 | BuildRequires: automake >= 1:1.13 |
e5e5fbcf | 16 | BuildRequires: crossmingw32-gcc |
db148317 | 17 | BuildRequires: crossmingw32-gcc-c++ |
e5e5fbcf | 18 | BuildRequires: crossmingw32-libiconv |
478762d8 | 19 | BuildRequires: libtool >= 2:2 |
3b0ebe07 | 20 | BuildRequires: lzip |
478762d8 | 21 | BuildRequires: sed >= 4.0 |
65675030 | 22 | BuildRequires: tar >= 1:1.22 |
b3175891 | 23 | BuildRequires: texinfo |
59d0034b JB |
24 | Requires: crossmingw32-libiconv |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 26 | |
27 | %define no_install_post_strip 1 | |
ce9c7c10 | 28 | %define _enable_debug_packages 0 |
e86b7230 | 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 |
e86b7230 | 84 | |
478762d8 JB |
85 | %{__sed} -i \ |
86 | -e 's@m4_esyscmd(\[build-aux/git-version-gen \.tarball-version\])@[%{version}]@' \ | |
87 | configure.ac | |
88 | %{__sed} -i \ | |
89 | -e 's@m4_esyscmd(\[\.\./build-aux/git-version-gen \.\./\.tarball-version\])@[%{version}]@' \ | |
90 | gettext-runtime/configure.ac \ | |
91 | gettext-tools/configure.ac | |
92 | ||
e86b7230 | 93 | %build |
608b2743 | 94 | cd gettext-runtime |
5afd9185 | 95 | %{__libtoolize} |
608b2743 | 96 | %{__aclocal} -I m4 -I ../m4 -I gnulib-m4 |
6a3f6222 | 97 | %{__autoconf} |
5afd9185 ŁK |
98 | %{__autoheader} |
99 | %{__automake} | |
100 | cd libasprintf | |
608b2743 | 101 | %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4 |
5afd9185 ŁK |
102 | %{__autoconf} |
103 | %{__autoheader} | |
104 | %{__automake} | |
5dff76fa JB |
105 | cd ../../libtextstyle |
106 | %{__libtoolize} | |
107 | %{__aclocal} -I m4 -I gnulib-m4 | |
108 | %{__autoconf} | |
109 | %{__autoheader} | |
110 | %{__automake} | |
111 | cd ../gettext-tools | |
608b2743 JB |
112 | %{__aclocal} -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 |
113 | %{__autoconf} | |
114 | %{__autoheader} | |
115 | %{__automake} | |
5dff76fa JB |
116 | cd examples |
117 | %{__aclocal} -I ../../gettext-runtime/m4 -I ../../m4 | |
118 | %{__autoconf} | |
119 | %{__automake} | |
120 | cd ../.. | |
608b2743 | 121 | %{__aclocal} -I m4 |
5afd9185 | 122 | %{__autoconf} |
6a3f6222 | 123 | %{__automake} |
e86b7230 | 124 | %configure \ |
125 | --target=%{target} \ | |
9738850f | 126 | --host=%{target} \ |
f9b2d210 | 127 | --disable-csharp \ |
608b2743 | 128 | --enable-static \ |
a70f2dde | 129 | --enable-threads=windows \ |
2116e22e JB |
130 | --without-bzip2 \ |
131 | --without-git \ | |
132 | --with-xz | |
9738850f | 133 | |
608b2743 | 134 | %{__make} |
e86b7230 | 135 | |
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 138 | |
139 | %{__make} install \ | |
140 | DESTDIR=$RPM_BUILD_ROOT | |
141 | ||
c9e435aa | 142 | install -d $RPM_BUILD_ROOT%{_dlldir} |
38daf245 | 143 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
c9e435aa | 144 | |
59d0034b | 145 | %if 0%{!?debug:1} |
c9e435aa | 146 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
147 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
148 | %endif | |
c9e435aa | 149 | |
e5f47d69 JB |
150 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{{envsubst,gettext,ngettext}.exe,gettext.sh} |
151 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,gettext,locale,man} | |
152 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
c9e435aa | 153 | |
e86b7230 | 154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
157 | %files | |
e5e5fbcf | 158 | %defattr(644,root,root,755) |
0449639a | 159 | %{_libdir}/libintl.dll.a |
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 |