1 %define realname SDL_image
2 Summary: Simple DirectMedia Layer - Sample Image Loading Library - Mingw32 cross version
3 Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków - wersja skrośna dla Mingw32
4 Name: crossmingw32-%{realname}
9 Source0: http://www.libsdl.org/projects/SDL_image/release/%{realname}-%{version}.tar.gz
10 # Source0-md5: b866dc4f647517bdaf57f6ffdefd013e
11 URL: http://www.libsdl.org/projects/SDL_image/
12 BuildRequires: autoconf
13 BuildRequires: automake
14 BuildRequires: crossmingw32-SDL >= 1.2.10
15 BuildRequires: crossmingw32-gcc
16 BuildRequires: crossmingw32-libjpeg >= 6b
17 BuildRequires: crossmingw32-libpng >= 1.2.0
18 BuildRequires: crossmingw32-w32api
19 BuildRequires: crossmingw32-zlib
20 BuildRequires: libtool
21 Requires: crossmingw32-SDL >= 1.2.10
22 Requires: crossmingw32-runtime
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define no_install_post_strip 1
27 %define target i386-mingw32
28 %define target_platform i386-pc-mingw32
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++
37 %ifarch alpha sparc sparc64 sparcv9
38 # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
43 This is a simple library to load images of various formats as SDL
44 surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
47 This package contains the cross version for Win32.
49 %description -l pl.UTF-8
50 Jest to prosta biblioteka służąca do ładowania różnego formatu
51 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje
52 następujące formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
54 Ten pakiet zawiera wersję skrośną dla Win32.
57 Summary: Static SDL_image library (cross mingw32 version)
58 Summary(pl.UTF-8): Statyczna biblioteka SDL_image (wersja skrośna mingw32)
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
63 Static SDL_image library (cross mingw32 version).
65 %description static -l pl.UTF-8
66 Statyczna biblioteka SDL_image (wersja skrośna mingw32).
69 Summary: SDL_image - DLL library for Windows
70 Summary(pl.UTF-8): SDL_image - biblioteka DLL dla Windows
71 Group: Applications/Emulators
72 Requires: crossmingw32-SDL-dll >= 1.2.10
76 SDL_image - DLL library for Windows.
78 %description dll -l pl.UTF-8
79 SDL_image - biblioteka DLL dla Windows.
82 %setup -q -n %{realname}-%{version}
91 # no sdl test, because it requires configured wine to work
93 png_lib=libpng12-0.dll \
96 --with-sdl-prefix=%{_prefix} \
105 # LIBS hack for libtool not detecting libraries without .la files
107 LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')"
110 rm -rf $RPM_BUILD_ROOT
113 DESTDIR=$RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT%{_dlldir}
116 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
119 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
120 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
124 rm -rf $RPM_BUILD_ROOT
127 %defattr(644,root,root,755)
129 %{_libdir}/libSDL_image.dll.a
130 %{_libdir}/libSDL_image.la
131 %{_includedir}/SDL/SDL_image.h
134 %defattr(644,root,root,755)
135 %{_libdir}/libSDL_image.a
138 %defattr(644,root,root,755)
139 %{_dlldir}/libSDL_image-*.dll