]>
Commit | Line | Data |
---|---|---|
1 | Summary: gettext libraries - cross mingw32 version | |
2 | Summary(pl.UTF-8): Biblioteki gettext - wersja skrośna dla mingw32 | |
3 | %define realname gettext | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 0.17 | |
6 | Release: 1 | |
7 | License: LGPL v2+ | |
8 | Group: Development/Libraries | |
9 | Source0: ftp://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz | |
10 | # Source0-md5: 58a2bc6d39c0ba57823034d55d65d606 | |
11 | Patch0: %{realname}-info.patch | |
12 | Patch1: %{realname}-killkillkill.patch | |
13 | URL: http://www.gnu.org/software/gettext/ | |
14 | BuildRequires: autoconf >= 2.60 | |
15 | BuildRequires: automake >= 1:1.10 | |
16 | BuildRequires: crossmingw32-gcc | |
17 | BuildRequires: crossmingw32-gcc-c++ | |
18 | # just to shorten build (libgettextlib is not packaged anyway) | |
19 | BuildRequires: crossmingw32-glib2 >= 2.0 | |
20 | BuildRequires: crossmingw32-libiconv | |
21 | BuildRequires: libtool | |
22 | BuildRequires: texinfo | |
23 | Requires: crossmingw32-libiconv | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define no_install_post_strip 1 | |
27 | ||
28 | %define target i386-mingw32 | |
29 | %define target_platform i386-pc-mingw32 | |
30 | ||
31 | %define _sysprefix /usr | |
32 | %define _prefix %{_sysprefix}/%{target} | |
33 | %define _libdir %{_prefix}/lib | |
34 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
35 | %define _dlldir /usr/share/wine/windows/system | |
36 | %define __cc %{target}-gcc | |
37 | %define __cxx %{target}-g++ | |
38 | ||
39 | %description | |
40 | gettext libraries - cross mingw32 version. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Biblioteki gettext - wersja skrośna dla mingw32. | |
44 | ||
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 | |
61 | Requires: crossmingw32-libiconv-dll | |
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 | ||
70 | %prep | |
71 | %setup -q -n %{realname}-%{version} | |
72 | %patch0 -p1 | |
73 | %patch1 -p1 | |
74 | ||
75 | %build | |
76 | %{__libtoolize} | |
77 | %{__aclocal} | |
78 | %{__autoconf} | |
79 | %{__automake} | |
80 | cd autoconf-lib-link | |
81 | %{__aclocal} -I m4 -I ../m4 | |
82 | %{__autoconf} | |
83 | %{__automake} | |
84 | cd ../gettext-runtime | |
85 | %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4 | |
86 | %{__autoconf} | |
87 | %{__automake} | |
88 | cd .. | |
89 | ||
90 | %configure \ | |
91 | --target=%{target} \ | |
92 | --host=%{target} \ | |
93 | --disable-csharp \ | |
94 | --enable-static | |
95 | ||
96 | %{__make} \ | |
97 | SHELL=bash | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %{__make} install \ | |
103 | DESTDIR=$RPM_BUILD_ROOT | |
104 | ||
105 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
106 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
107 | ||
108 | %if 0%{!?debug:1} | |
109 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
110 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
111 | %endif | |
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 | ||
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libintl.dll.a | |
123 | %{_libdir}/libintl.la | |
124 | %{_libdir}/libasprintf.dll.a | |
125 | %{_libdir}/libasprintf.la | |
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 |