]>
Commit | Line | Data |
---|---|---|
1 | %define realname gettext | |
2 | Summary: gettext libraries - cross MinGW32 version | |
3 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla MinGW32 | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 0.19.8.1 | |
6 | Release: 1 | |
7 | License: LGPL v2+ | |
8 | Group: Development/Libraries | |
9 | Source0: http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.lz | |
10 | # Source0-md5: d838d2c4144261d0c5fbab4a0aceb5c1 | |
11 | Patch0: %{realname}-libintl_by_gcj.patch | |
12 | Patch1: %{name}-kill_tools.patch | |
13 | URL: http://www.gnu.org/software/gettext/ | |
14 | BuildRequires: autoconf >= 2.62 | |
15 | BuildRequires: automake >= 1:1.13 | |
16 | BuildRequires: crossmingw32-gcc | |
17 | BuildRequires: crossmingw32-gcc-c++ | |
18 | BuildRequires: crossmingw32-libiconv | |
19 | BuildRequires: libtool >= 2:2 | |
20 | BuildRequires: lzip | |
21 | BuildRequires: sed >= 4.0 | |
22 | BuildRequires: tar >= 1:1.22 | |
23 | BuildRequires: texinfo | |
24 | Requires: crossmingw32-libiconv | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %define no_install_post_strip 1 | |
28 | ||
29 | %define target i386-mingw32 | |
30 | %define target_platform i386-pc-mingw32 | |
31 | ||
32 | %define _sysprefix /usr | |
33 | %define _prefix %{_sysprefix}/%{target} | |
34 | %define _libdir %{_prefix}/lib | |
35 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
36 | %define _dlldir /usr/share/wine/windows/system | |
37 | %define __cc %{target}-gcc | |
38 | %define __cxx %{target}-g++ | |
39 | %define _ssp_cflags %{nil} | |
40 | ||
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 | ||
48 | %description | |
49 | gettext libraries - cross MinGW32 version. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Biblioteki gettext - wersja skrośna dla MinGW32. | |
53 | ||
54 | %package static | |
55 | Summary: Static gettext libraries (cross MinGW32 version) | |
56 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna MinGW32) | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description static | |
61 | Static gettext libraries (cross MinGW32 version). | |
62 | ||
63 | %description static -l pl.UTF-8 | |
64 | Statyczne biblioteki gettext (wersja skrośna MinGW32). | |
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 | |
70 | Requires: crossmingw32-libiconv-dll | |
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 | ||
79 | %prep | |
80 | %setup -q -n %{realname}-%{version} | |
81 | %patch0 -p1 | |
82 | %patch1 -p1 | |
83 | ||
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 | ||
92 | %build | |
93 | %{__libtoolize} | |
94 | cd gettext-runtime | |
95 | %{__libtoolize} | |
96 | %{__aclocal} -I m4 -I ../m4 -I gnulib-m4 | |
97 | %{__autoconf} | |
98 | %{__autoheader} | |
99 | %{__automake} | |
100 | cd libasprintf | |
101 | %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4 | |
102 | %{__autoconf} | |
103 | %{__autoheader} | |
104 | %{__automake} | |
105 | cd ../../gettext-tools | |
106 | %{__aclocal} -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 | |
107 | %{__autoconf} | |
108 | %{__autoheader} | |
109 | %{__automake} | |
110 | cd .. | |
111 | %{__aclocal} -I m4 | |
112 | %{__autoconf} | |
113 | %{__automake} | |
114 | %configure \ | |
115 | --target=%{target} \ | |
116 | --host=%{target} \ | |
117 | --disable-csharp \ | |
118 | --enable-static \ | |
119 | --without-bzip2 \ | |
120 | --without-git \ | |
121 | --with-xz | |
122 | ||
123 | %{__make} | |
124 | ||
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | %{__make} install \ | |
129 | DESTDIR=$RPM_BUILD_ROOT | |
130 | ||
131 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
132 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
133 | ||
134 | %if 0%{!?debug:1} | |
135 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
136 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
137 | %endif | |
138 | ||
139 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{{envsubst,gettext,ngettext}.exe,gettext.sh} | |
140 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,gettext,locale,man} | |
141 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
142 | ||
143 | %clean | |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %files | |
147 | %defattr(644,root,root,755) | |
148 | %{_libdir}/libintl.dll.a | |
149 | %{_libdir}/libintl.la | |
150 | %{_libdir}/libasprintf.dll.a | |
151 | %{_libdir}/libasprintf.la | |
152 | %{_includedir}/autosprintf.h | |
153 | %{_includedir}/libintl.h | |
154 | ||
155 | %files static | |
156 | %defattr(644,root,root,755) | |
157 | %{_libdir}/libintl.a | |
158 | %{_libdir}/libasprintf.a | |
159 | ||
160 | %files dll | |
161 | %defattr(644,root,root,755) | |
162 | %{_dlldir}/libintl-8.dll | |
163 | %{_dlldir}/libasprintf-0.dll |