]>
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} |
e5f47d69 JB |
12 | Version: 0.18.3 |
13 | Release: 1 | |
fb17fcec | 14 | License: LGPL v2+ |
c9e435aa | 15 | Group: Development/Libraries |
ab7c136d | 16 | Source0: http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz |
e5f47d69 | 17 | # Source0-md5: 3fa4236c41b7e837355de144210207ec |
608b2743 JB |
18 | Patch0: %{realname}-libintl_by_gcj.patch |
19 | Patch1: %{name}-kill_tools.patch | |
e5f47d69 | 20 | Patch2: %{realname}-ac.patch |
e86b7230 | 21 | URL: http://www.gnu.org/software/gettext/ |
608b2743 JB |
22 | BuildRequires: autoconf >= 2.62 |
23 | BuildRequires: automake >= 1:1.11 | |
e5e5fbcf | 24 | BuildRequires: crossmingw32-gcc |
db148317 | 25 | BuildRequires: crossmingw32-gcc-c++ |
e5e5fbcf | 26 | BuildRequires: crossmingw32-libiconv |
e86b7230 | 27 | BuildRequires: libtool |
b3175891 | 28 | BuildRequires: texinfo |
59d0034b JB |
29 | Requires: crossmingw32-libiconv |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
e86b7230 | 31 | |
32 | %define no_install_post_strip 1 | |
33 | ||
34 | %define target i386-mingw32 | |
35 | %define target_platform i386-pc-mingw32 | |
db148317 | 36 | |
59d0034b JB |
37 | %define _sysprefix /usr |
38 | %define _prefix %{_sysprefix}/%{target} | |
80f32cc3 | 39 | %define _libdir %{_prefix}/lib |
db148317 | 40 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
c9e435aa | 41 | %define _dlldir /usr/share/wine/windows/system |
e86b7230 | 42 | %define __cc %{target}-gcc |
43 | %define __cxx %{target}-g++ | |
97f38208 | 44 | %define _ssp_cflags %{nil} |
e86b7230 | 45 | |
608b2743 JB |
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 | ||
e86b7230 | 53 | %description |
bc5a7e54 | 54 | gettext libraries - cross MinGW32 version. |
e5e5fbcf | 55 | |
8f9ab6bc | 56 | %description -l pl.UTF-8 |
bc5a7e54 | 57 | Biblioteki gettext - wersja skrośna dla MinGW32. |
e86b7230 | 58 | |
c9e435aa | 59 | %package static |
bc5a7e54 JB |
60 | Summary: Static gettext libraries (cross MinGW32 version) |
61 | Summary(pl.UTF-8): Statyczne biblioteki gettext (wersja skrośna MinGW32) | |
c9e435aa JB |
62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description static | |
bc5a7e54 | 66 | Static gettext libraries (cross MinGW32 version). |
c9e435aa JB |
67 | |
68 | %description static -l pl.UTF-8 | |
bc5a7e54 | 69 | Statyczne biblioteki gettext (wersja skrośna MinGW32). |
c9e435aa JB |
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 | |
d17eea6e | 75 | Requires: crossmingw32-libiconv-dll |
c9e435aa JB |
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 | ||
e86b7230 | 84 | %prep |
fb17fcec | 85 | %setup -q -n %{realname}-%{version} |
3cf55ad9 | 86 | %patch0 -p1 |
6a3f6222 | 87 | %patch1 -p1 |
e5f47d69 | 88 | %patch2 -p1 |
e86b7230 | 89 | |
90 | %build | |
e86b7230 | 91 | %{__libtoolize} |
608b2743 | 92 | cd gettext-runtime |
5afd9185 | 93 | %{__libtoolize} |
608b2743 | 94 | %{__aclocal} -I m4 -I ../m4 -I gnulib-m4 |
6a3f6222 | 95 | %{__autoconf} |
5afd9185 ŁK |
96 | %{__autoheader} |
97 | %{__automake} | |
98 | cd libasprintf | |
608b2743 | 99 | %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4 |
5afd9185 ŁK |
100 | %{__autoconf} |
101 | %{__autoheader} | |
102 | %{__automake} | |
608b2743 JB |
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 | |
5afd9185 | 110 | %{__autoconf} |
6a3f6222 | 111 | %{__automake} |
e86b7230 | 112 | %configure \ |
113 | --target=%{target} \ | |
9738850f | 114 | --host=%{target} \ |
f9b2d210 | 115 | --disable-csharp \ |
608b2743 | 116 | --enable-static \ |
2116e22e JB |
117 | --without-bzip2 \ |
118 | --without-git \ | |
119 | --with-xz | |
9738850f | 120 | |
608b2743 | 121 | %{__make} |
e86b7230 | 122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
e86b7230 | 125 | |
126 | %{__make} install \ | |
127 | DESTDIR=$RPM_BUILD_ROOT | |
128 | ||
c9e435aa JB |
129 | install -d $RPM_BUILD_ROOT%{_dlldir} |
130 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
131 | ||
59d0034b | 132 | %if 0%{!?debug:1} |
c9e435aa | 133 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
59d0034b JB |
134 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
135 | %endif | |
c9e435aa | 136 | |
e5f47d69 JB |
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} | |
c9e435aa | 140 | |
e86b7230 | 141 | %clean |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
144 | %files | |
e5e5fbcf | 145 | %defattr(644,root,root,755) |
0449639a | 146 | %{_libdir}/libintl.dll.a |
7063962d | 147 | %{_libdir}/libintl.la |
7063962d | 148 | %{_libdir}/libasprintf.dll.a |
4c54fa9e | 149 | %{_libdir}/libasprintf.la |
608b2743 JB |
150 | %{_includedir}/autosprintf.h |
151 | %{_includedir}/libintl.h | |
c9e435aa JB |
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 |