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