]>
Commit | Line | Data |
---|---|---|
e5e5fbcf | 1 | Summary: gettext libraries - cross mingw32 version |
615485e8 | 2 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla mingw32 |
fb17fcec JB |
3 | %define realname gettext |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 0.17 | |
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 |
fb17fcec JB |
10 | # Source0-md5: 58a2bc6d39c0ba57823034d55d65d606 |
11 | Patch0: %{realname}-info.patch | |
12 | Patch1: %{realname}-killkillkill.patch | |
e86b7230 | 13 | URL: http://www.gnu.org/software/gettext/ |
024b6753 JB |
14 | BuildRequires: autoconf >= 2.60 |
15 | BuildRequires: automake >= 1:1.10 | |
e5e5fbcf | 16 | BuildRequires: crossmingw32-gcc |
db148317 | 17 | BuildRequires: crossmingw32-gcc-c++ |
fb17fcec JB |
18 | # just to shorten build (libgettextlib is not packaged anyway) |
19 | BuildRequires: crossmingw32-glib2 >= 2.0 | |
e5e5fbcf | 20 | BuildRequires: crossmingw32-libiconv |
e86b7230 | 21 | BuildRequires: libtool |
b3175891 | 22 | BuildRequires: texinfo |
59d0034b JB |
23 | Requires: crossmingw32-libiconv |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 25 | |
26 | %define no_install_post_strip 1 | |
27 | ||
28 | %define target i386-mingw32 | |
29 | %define target_platform i386-pc-mingw32 | |
db148317 | 30 | |
59d0034b JB |
31 | %define _sysprefix /usr |
32 | %define _prefix %{_sysprefix}/%{target} | |
80f32cc3 | 33 | %define _libdir %{_prefix}/lib |
db148317 | 34 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
c9e435aa | 35 | %define _dlldir /usr/share/wine/windows/system |
e86b7230 | 36 | %define __cc %{target}-gcc |
37 | %define __cxx %{target}-g++ | |
38 | ||
39 | %description | |
e5e5fbcf JB |
40 | gettext libraries - cross mingw32 version. |
41 | ||
8f9ab6bc JR |
42 | %description -l pl.UTF-8 |
43 | Biblioteki gettext - wersja skrośna dla mingw32. | |
e86b7230 | 44 | |
c9e435aa JB |
45 | %package static |
46 | Summary: Static gettext libraries (cross mingw32 version) | |
47 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna mingw32) | |
48 | Group: Development/Libraries | |
49 | Requires: %{name} = %{version}-%{release} | |
50 | ||
51 | %description static | |
52 | Static gettext libraries (cross mingw32 version). | |
53 | ||
54 | %description static -l pl.UTF-8 | |
55 | Statyczne biblioteki gettext (wersja skrośna mingw32). | |
56 | ||
57 | %package dll | |
58 | Summary: DLL gettext libraries for Windows | |
59 | Summary(pl.UTF-8): Biblioteki DLL gettext dla Windows | |
60 | Group: Applications/Emulators | |
d17eea6e | 61 | Requires: crossmingw32-libiconv-dll |
c9e435aa JB |
62 | Requires: wine |
63 | ||
64 | %description dll | |
65 | DLL gettext libraries for Windows. | |
66 | ||
67 | %description dll -l pl.UTF-8 | |
68 | Biblioteki DLL gettext dla Windows. | |
69 | ||
e86b7230 | 70 | %prep |
fb17fcec | 71 | %setup -q -n %{realname}-%{version} |
3cf55ad9 | 72 | %patch0 -p1 |
6a3f6222 | 73 | %patch1 -p1 |
e86b7230 | 74 | |
75 | %build | |
e86b7230 | 76 | %{__libtoolize} |
6a3f6222 | 77 | %{__aclocal} |
e86b7230 | 78 | %{__autoconf} |
6a3f6222 | 79 | %{__automake} |
f9b2d210 | 80 | cd autoconf-lib-link |
221fdc2c | 81 | %{__aclocal} -I m4 -I ../m4 |
f9b2d210 JB |
82 | %{__autoconf} |
83 | %{__automake} | |
84 | cd ../gettext-runtime | |
4047acdd | 85 | %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4 |
6a3f6222 | 86 | %{__autoconf} |
87 | %{__automake} | |
59d0034b | 88 | cd .. |
e86b7230 | 89 | |
90 | %configure \ | |
91 | --target=%{target} \ | |
9738850f | 92 | --host=%{target} \ |
f9b2d210 | 93 | --disable-csharp \ |
9738850f | 94 | --enable-static |
95 | ||
fb17fcec JB |
96 | %{__make} \ |
97 | SHELL=bash | |
e86b7230 | 98 | |
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 101 | |
102 | %{__make} install \ | |
103 | DESTDIR=$RPM_BUILD_ROOT | |
104 | ||
c9e435aa JB |
105 | install -d $RPM_BUILD_ROOT%{_dlldir} |
106 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
107 | ||
59d0034b | 108 | %if 0%{!?debug:1} |
c9e435aa | 109 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
110 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
111 | %endif | |
c9e435aa JB |
112 | |
113 | rm -f $RPM_BUILD_ROOT%{_libdir}/charset.alias | |
114 | rm -rf $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gettext,locale,man} | |
115 | rm -rf $RPM_BUILD_ROOT%{_infodir} | |
116 | ||
e86b7230 | 117 | %clean |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %files | |
e5e5fbcf | 121 | %defattr(644,root,root,755) |
0449639a | 122 | %{_libdir}/libintl.dll.a |
7063962d | 123 | %{_libdir}/libintl.la |
7063962d | 124 | %{_libdir}/libasprintf.dll.a |
4c54fa9e | 125 | %{_libdir}/libasprintf.la |
c9e435aa JB |
126 | %{_includedir}/*.h |
127 | ||
128 | %files static | |
129 | %defattr(644,root,root,755) | |
130 | %{_libdir}/libintl.a | |
131 | %{_libdir}/libasprintf.a | |
132 | ||
133 | %files dll | |
134 | %defattr(644,root,root,755) | |
135 | %{_dlldir}/libintl-8.dll | |
136 | %{_dlldir}/libasprintf-0.dll |