]> git.pld-linux.org Git - packages/crossmingw32-gettext.git/blob - crossmingw32-gettext.spec
- added bootstrap mode
[packages/crossmingw32-gettext.git] / crossmingw32-gettext.spec
1 #
2 %bcond_with     bootstrap       # use system GLib
3 #
4 Summary:        gettext libraries - cross mingw32 version
5 Summary(pl.UTF-8):      Biblioteki gettext - wersja skrośna dla mingw32
6 %define         realname                gettext
7 Name:           crossmingw32-%{realname}
8 Version:        0.17
9 Release:        1
10 License:        LGPL v2+
11 Group:          Development/Libraries
12 Source0:        http://ftp.gnu.org/gnu/gettext/%{realname}-%{version}.tar.gz
13 # Source0-md5:  58a2bc6d39c0ba57823034d55d65d606
14 Patch0:         %{realname}-info.patch
15 Patch1:         %{realname}-libintl_by_gcj.patch
16 Patch2:         %{realname}-removed_macros.patch
17 Patch3:         %{name}-kill_tools.patch
18 URL:            http://www.gnu.org/software/gettext/
19 BuildRequires:  autoconf >= 2.60
20 BuildRequires:  automake >= 1:1.10
21 BuildRequires:  crossmingw32-gcc
22 BuildRequires:  crossmingw32-gcc-c++
23 # just to shorten build (libgettextlib is not packaged anyway)
24 %{!?with_bootstrap:BuildRequires:       crossmingw32-glib2 >= 2.0}
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
44 %description
45 gettext libraries - cross mingw32 version.
46
47 %description -l pl.UTF-8
48 Biblioteki gettext - wersja skrośna dla mingw32.
49
50 %package static
51 Summary:        Static gettext libraries (cross mingw32 version)
52 Summary(pl.UTF-8):      Statyczne biblioteki gettext (wersja skrośna mingw32)
53 Group:          Development/Libraries
54 Requires:       %{name} = %{version}-%{release}
55
56 %description static
57 Static gettext libraries (cross mingw32 version).
58
59 %description static -l pl.UTF-8
60 Statyczne biblioteki gettext (wersja skrośna mingw32).
61
62 %package dll
63 Summary:        DLL gettext libraries for Windows
64 Summary(pl.UTF-8):      Biblioteki DLL gettext dla Windows
65 Group:          Applications/Emulators
66 Requires:       crossmingw32-libiconv-dll
67 Requires:       wine
68
69 %description dll
70 DLL gettext libraries for Windows.
71
72 %description dll -l pl.UTF-8
73 Biblioteki DLL gettext dla Windows.
74
75 %prep
76 %setup -q -n %{realname}-%{version}
77 %patch0 -p1
78 %patch1 -p1
79 %patch2 -p1
80 %patch3 -p1
81
82 %build
83 %{__libtoolize}
84 cd autoconf-lib-link
85 %{__aclocal} -I m4 -I ../m4
86 %{__autoconf}
87 %{__automake}
88 cd ../gettext-runtime
89 %{__libtoolize}
90 %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
91 %{__autoconf}
92 %{__autoheader}
93 %{__automake}
94 cd libasprintf
95 %{__aclocal} -I ../m4 -I ../../m4
96 %{__autoconf}
97 %{__autoheader}
98 %{__automake}
99 cd ../..
100 %{__aclocal}
101 %{__autoconf}
102 %{__automake}
103
104 %configure \
105         --target=%{target} \
106         --host=%{target} \
107         --disable-csharp \
108         --enable-static
109
110 %{__make} \
111         SHELL=bash
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %{__make} install \
117         DESTDIR=$RPM_BUILD_ROOT
118
119 install -d $RPM_BUILD_ROOT%{_dlldir}
120 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
121
122 %if 0%{!?debug:1}
123 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
124 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
125 %endif
126
127 rm -f $RPM_BUILD_ROOT%{_libdir}/charset.alias
128 rm -rf $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc,gettext,locale,man}
129 rm -rf $RPM_BUILD_ROOT%{_infodir}
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %files
135 %defattr(644,root,root,755)
136 %{_libdir}/libintl.dll.a
137 %{_libdir}/libintl.la
138 %{_libdir}/libasprintf.dll.a
139 %{_libdir}/libasprintf.la
140 %{_includedir}/*.h
141
142 %files static
143 %defattr(644,root,root,755)
144 %{_libdir}/libintl.a
145 %{_libdir}/libasprintf.a
146
147 %files dll
148 %defattr(644,root,root,755)
149 %{_dlldir}/libintl-8.dll
150 %{_dlldir}/libasprintf-0.dll
This page took 0.063306 seconds and 4 git commands to generate.