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