86fd6a349cd1a08141c70608a77732054515e30b
[packages/crossmingw32-gettext.git] / crossmingw32-gettext.spec
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.2.1
13 Release:        2
14 License:        LGPL v2+
15 Group:          Development/Libraries
16 Source0:        http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz
17 # Source0-md5:  034c8103b14654ebd300fadac44d6f14
18 Patch0:         %{realname}-libintl_by_gcj.patch
19 Patch1:         %{name}-kill_tools.patch
20 URL:            http://www.gnu.org/software/gettext/
21 BuildRequires:  autoconf >= 2.62
22 BuildRequires:  automake >= 1:1.11
23 BuildRequires:  crossmingw32-gcc
24 BuildRequires:  crossmingw32-gcc-c++
25 BuildRequires:  crossmingw32-libiconv
26 BuildRequires:  libtool
27 BuildRequires:  texinfo
28 Requires:       crossmingw32-libiconv
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         no_install_post_strip   1
32
33 %define         target                  i386-mingw32
34 %define         target_platform         i386-pc-mingw32
35
36 %define         _sysprefix              /usr
37 %define         _prefix                 %{_sysprefix}/%{target}
38 %define         _libdir                 %{_prefix}/lib
39 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
40 %define         _dlldir                 /usr/share/wine/windows/system
41 %define         __cc                    %{target}-gcc
42 %define         __cxx                   %{target}-g++
43 %define         _ssp_cflags             %{nil}
44
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
52 %description
53 gettext libraries - cross MinGW32 version.
54
55 %description -l pl.UTF-8
56 Biblioteki gettext - wersja skrośna dla MinGW32.
57
58 %package static
59 Summary:        Static gettext libraries (cross MinGW32 version)
60 Summary(pl.UTF-8):      Statyczne biblioteki gettext (wersja skrośna MinGW32)
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}-%{release}
63
64 %description static
65 Static gettext libraries (cross MinGW32 version).
66
67 %description static -l pl.UTF-8
68 Statyczne biblioteki gettext (wersja skrośna MinGW32).
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
74 Requires:       crossmingw32-libiconv-dll
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
83 %prep
84 %setup -q -n %{realname}-%{version}
85 %patch0 -p1
86 %patch1 -p1
87
88 %build
89 %{__libtoolize}
90 cd gettext-runtime
91 %{__libtoolize}
92 %{__aclocal} -I m4 -I ../m4 -I gnulib-m4
93 %{__autoconf}
94 %{__autoheader}
95 %{__automake}
96 cd libasprintf
97 %{__aclocal} -I ../../m4 -I ../m4 -I gnulib-m4
98 %{__autoconf}
99 %{__autoheader}
100 %{__automake}
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
108 %{__autoconf}
109 %{__automake}
110 %configure \
111         --target=%{target} \
112         --host=%{target} \
113         --disable-csharp \
114         --enable-static \
115         --without-bzip2 \
116         --without-git \
117         --with-xz
118
119 %{__make}
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123
124 %{__make} install \
125         DESTDIR=$RPM_BUILD_ROOT
126
127 install -d $RPM_BUILD_ROOT%{_dlldir}
128 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
129
130 %if 0%{!?debug:1}
131 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
132 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
133 %endif
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
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %files
143 %defattr(644,root,root,755)
144 %{_libdir}/libintl.dll.a
145 %{_libdir}/libintl.la
146 %{_libdir}/libasprintf.dll.a
147 %{_libdir}/libasprintf.la
148 %{_includedir}/autosprintf.h
149 %{_includedir}/libintl.h
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
This page took 0.058825 seconds and 2 git commands to generate.