- fixed _dlldir
[packages/crossmingw32-libtiff.git] / crossmingw32-libtiff.spec
1 Summary:        Library for handling TIFF files - cross MinGW32 version
2 Summary(pl.UTF-8):      Biblioteka do manipulacji plikami w formacie TIFF - wersja skrośna MinGW32
3 %define         realname   libtiff
4 Name:           crossmingw32-%{realname}
5 Version:        3.9.5
6 Release:        2
7 License:        BSD-like
8 Group:          Development/Libraries
9 Source0:        ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{version}.tar.gz
10 # Source0-md5:  8fc7ce3b4e1d0cc8a319336967815084
11 Patch0:         %{realname}-sec.patch
12 Patch1:         %{realname}-glut.patch
13 Patch2:         %{realname}-CVE-2009-2285.patch
14 URL:            http://www.remotesensing.org/libtiff/
15 BuildRequires:  autoconf >= 2.59
16 BuildRequires:  automake >= 1:1.11
17 BuildRequires:  crossmingw32-gcc-c++
18 BuildRequires:  crossmingw32-libjpeg
19 BuildRequires:  crossmingw32-zlib
20 BuildRequires:  libtool
21 Requires:       crossmingw32-libjpeg
22 Requires:       crossmingw32-zlib
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         no_install_post_strip   1
26
27 %define         target                  i386-mingw32
28 %define         target_platform         i386-pc-mingw32
29
30 %define         _sysprefix              /usr
31 %define         _prefix                 %{_sysprefix}/%{target}
32 %define         _libdir                 %{_prefix}/lib
33 %define         _dlldir                 /usr/share/wine/windows/system
34 %define         __cc                    %{target}-gcc
35 %define         __cxx                   %{target}-g++
36
37 %ifnarch %{ix86}
38 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
39 %define         optflags        -O2
40 %endif
41 # -z options are invalid for mingw linker
42 %define         filterout_ld    -Wl,-z,.*
43
44 %description
45 This package is a library of functions that manipulate TIFF images
46 (cross MinGW32 version).
47
48 %description -l pl.UTF-8
49 Ten pakiet zawiera bibliotekę pozwalającą manipulować plikami w
50 formacie TIFF (w wersji skrośnej MinGW32).
51
52 %package static
53 Summary:        Static libtiff library (cross MinGW32 version)
54 Summary(pl.UTF-8):      Statyczna biblioteka libtiff (wersja skrośna MinGW32)
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57
58 %description static
59 Static libtiff library (cross MinGW32 version).
60
61 %description static -l pl.UTF-8
62 Statyczna biblioteka libtiff (wersja skrośna MinGW32).
63
64 %package dll
65 Summary:        DLL libtiff library for Windows
66 Summary(pl.UTF-8):      Biblioteka DLL libtiff dla Windows
67 Group:          Applications/Emulators
68 Requires:       wine
69 Requires:       crossmingw32-libjpeg-dll
70 Requires:       crossmingw32-zlib-dll
71
72 %description dll
73 DLL libtiff library for Windows.
74
75 %description dll -l pl.UTF-8
76 Biblioteka DLL libtiff dla Windows.
77
78 %package cxx
79 Summary:        libtiff C++ streams library (cross MinGW32 version)
80 Summary(pl.UTF-8):      Biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32)
81 Group:          Development/Libraries
82 Requires:       %{name} = %{version}-%{release}
83
84 %description cxx
85 libtiff C++ streams library (cross MinGW32 version).
86
87 %description cxx -l pl.UTF-8
88 Biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32).
89
90 %package cxx-static
91 Summary:        Static libtiff C++ streams library (cross MinGW32 version)
92 Summary(pl.UTF-8):      Statyczna biblioteka strumieni C++ dla libtiff (wersja skrośna MinGW32)
93 Group:          Development/Libraries
94 Requires:       %{name}-cxx = %{version}-%{release}
95
96 %description cxx-static
97 Static libtiff C++ streams library (cross MinGW32 version).
98
99 %description cxx-static -l pl.UTF-8
100 Statyczna biblioteka strumieni C++ dla libtiff (wersja skrośna
101 MinGW32).
102
103 %package cxx-dll
104 Summary:        DLL libtiff C++ streams library for Windows
105 Summary(pl.UTF-8):      Biblioteka DLL strumieni C++ libtiff dla Windows
106 Group:          Applications/Emulators
107 Requires:       %{name}-dll = %{version}-%{release}
108
109 %description cxx-dll
110 DLL libtiff C++ streams library for Windows.
111
112 %description cxx-dll -l pl.UTF-8
113 Biblioteka DLL strumieni C++ libtiff dla Windows.
114
115 %prep
116 %setup -q -n tiff-%{version}
117 %patch0 -p1
118 %patch1 -p0
119 %patch2 -p1
120
121 %{__rm} m4/{libtool,lt*}.m4
122
123 %build
124 %{__libtoolize}
125 %{__aclocal} -I m4
126 %{__autoconf}
127 %{__autoheader}
128 %{__automake}
129 %configure \
130         lt_cv_deplibs_check_method=pass_all \
131         --target=%{target} \
132         --host=%{target} \
133         --enable-static
134 %{__make}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138
139 %{__make} install \
140         DESTDIR=$RPM_BUILD_ROOT
141
142 install -d $RPM_BUILD_ROOT%{_dlldir}
143 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
144
145 %if 0%{!?debug:1}
146 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
147 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
148 %endif
149
150 rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc,man}
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %files
156 %defattr(644,root,root,755)
157 %doc COPYRIGHT ChangeLog README TODO
158 %{_libdir}/libtiff.dll.a
159 %{_libdir}/libtiff.la
160 %{_includedir}/tiff*.h
161
162 %files static
163 %defattr(644,root,root,755)
164 %{_libdir}/libtiff.a
165
166 %files dll
167 %defattr(644,root,root,755)
168 %{_dlldir}/libtiff-*.dll
169
170 %files cxx
171 %defattr(644,root,root,755)
172 %{_libdir}/libtiffxx.dll.a
173 %{_libdir}/libtiffxx.la
174 %{_includedir}/tiffio.hxx
175
176 %files cxx-static
177 %defattr(644,root,root,755)
178 %{_libdir}/libtiffxx.a
179
180 %files cxx-dll
181 %defattr(644,root,root,755)
182 %{_dlldir}/libtiffxx-*.dll
This page took 0.146075 seconds and 3 git commands to generate.