]> git.pld-linux.org Git - packages/crossmingw32-libiconv.git/blob - crossmingw32-libiconv.spec
- filter out some compiler and linker flags
[packages/crossmingw32-libiconv.git] / crossmingw32-libiconv.spec
1 Summary:        Character set conversion library - MinGW32 cross version
2 Summary(pl.UTF-8):      Biblioteka konwersji zestawów znaków - wersja skrośna dla MinGW32
3 %define         realname   libiconv
4 Name:           crossmingw32-%{realname}
5 Version:        1.13.1
6 Release:        1
7 License:        LGPL v2+
8 Group:          Development/Libraries
9 Source0:        http://ftp.gnu.org/gnu/libiconv/%{realname}-%{version}.tar.gz
10 # Source0-md5:  7ab33ebd26687c744a37264a330bbe9a
11 URL:            http://www.gnu.org/software/libiconv/
12 BuildRequires:  automake
13 BuildRequires:  crossmingw32-gcc
14 # because of broken w32 relink in libtool
15 BuildConflicts: crossmingw32-libiconv < 1.10
16 Requires:       crossmingw32-runtime
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         no_install_post_strip   1
20
21 %define         target                  i386-mingw32
22 %define         target_platform         i386-pc-mingw32
23
24 %define         _sysprefix              /usr
25 %define         _prefix                 %{_sysprefix}/%{target}
26 %define         _libdir                 %{_prefix}/lib
27 %define         _dlldir                 /usr/share/wine/windows/system
28 %define         __cc                    %{target}-gcc
29 %define         __cxx                   %{target}-g++
30 %define         filterout_ld    -Wl,-z,.*
31 %define         filterout       -gdwarf-3
32
33 %ifnarch %{ix86}
34 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
35 %define         optflags        -O2
36 %endif
37 # -z options are invalid for mingw linker
38 %define         filterout_ld    -Wl,-z,.*
39
40 %description
41 The libiconv library provides an iconv() implementation, for use on
42 systems which don't have one, or whose implementation cannot convert
43 from/to Unicode.
44
45 This package contains the cross version for MinGW32.
46
47 %description -l pl.UTF-8
48 Ta biblioteka dostarcza implementację iconv() do używania z systemami,
49 które takiej funkcji nie posiadają, lub na których implementacja nie
50 potrafi konwertować z/do Unikodu.
51
52 Ten pakiet zawiera wersję skrośną dla MinGW32.
53
54 %package static
55 Summary:        Static iconv libraries (cross MinGW32 version)
56 Summary(pl.UTF-8):      Statyczne biblioteki iconv (wersja skrośna MinGW32)
57 Group:          Development/Libraries
58 Requires:       %{name} = %{version}-%{release}
59
60 %description static
61 Static iconv libraries (cross MinGW32 version).
62
63 %description static -l pl.UTF-8
64 Statyczne biblioteki iconv (wersja skrośna MinGW32).
65
66 %package dll
67 Summary:        DLL iconv libraries for Windows
68 Summary(pl.UTF-8):      Biblioteki DLL iconv dla Windows
69 Group:          Applications/Emulators
70 Requires:       wine
71
72 %description dll
73 DLL iconv libraries for Windows.
74
75 %description dll -l pl.UTF-8
76 Biblioteki DLL iconv dla Windows.
77
78 %prep
79 %setup -q -n %{realname}-%{version}
80
81 %build
82 cp -f /usr/share/automake/config.sub libcharset/build-aux
83 cp -f /usr/share/automake/config.sub build-aux
84 %configure \
85         --target="%{target}" \
86         --host="%{target}" \
87         --enable-static
88
89 %{__make}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT%{_dlldir}
94
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
99
100 %if 0%{!?debug:1}
101 %{target}-strip -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
102 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
103 %endif
104
105 # not used on win32
106 rm -f $RPM_BUILD_ROOT%{_libdir}/charset.alias
107 # runtime only
108 rm -f $RPM_BUILD_ROOT%{_bindir}/iconv
109 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
110
111 rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc,man}
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %files
117 %defattr(644,root,root,755)
118 %{_libdir}/libcharset.dll.a
119 %{_libdir}/libiconv.dll.a
120 %{_libdir}/libcharset.la
121 %{_libdir}/libiconv.la
122 %{_includedir}/iconv.h
123 %{_includedir}/libcharset.h
124 %{_includedir}/localcharset.h
125
126 %files static
127 %defattr(644,root,root,755)
128 %{_libdir}/libcharset.a
129 %{_libdir}/libiconv.a
130
131 %files dll
132 %defattr(644,root,root,755)
133 %{_dlldir}/libcharset-*.dll
134 %{_dlldir}/libiconv-*.dll
This page took 0.061274 seconds and 3 git commands to generate.