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