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: cd006109a73bf7dcc93e1c3ed15ee782
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 _dlldir /usr/share/wine/windows/system
33 %define __cc %{target}-gcc
34 %define __cxx %{target}-g++
36 %ifarch alpha sparc sparc64 sparcv9
37 # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
42 This is a simple library to load images of various formats as SDL
43 surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
46 This package contains the cross version for Win32.
48 %description -l pl.UTF-8
49 Jest to prosta biblioteka służąca do ładowania różnego formatu
50 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje
51 następujące formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
53 Ten pakiet zawiera wersję skrośną dla Win32.
56 Summary: Static SDL_image library (cross mingw32 version)
57 Summary(pl.UTF-8): Statyczna biblioteka SDL_image (wersja skrośna mingw32)
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
62 Static SDL_image library (cross mingw32 version).
64 %description static -l pl.UTF-8
65 Statyczna biblioteka SDL_image (wersja skrośna mingw32).
68 Summary: SDL_image - DLL library for Windows
69 Summary(pl.UTF-8): SDL_image - biblioteka DLL dla Windows
70 Group: Applications/Emulators
71 Requires: crossmingw32-SDL-dll >= 1.2.10
75 SDL_image - DLL library for Windows.
77 %description dll -l pl.UTF-8
78 SDL_image - biblioteka DLL dla Windows.
81 %setup -q -n %{realname}-%{version}
90 # no sdl test, because it requires configured wine to work
92 png_lib=libpng12-0.dll \
95 --with-sdl-prefix=%{_prefix} \
104 # LIBS hack for libtool not detecting libraries without .la files
106 LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')"
109 rm -rf $RPM_BUILD_ROOT
112 DESTDIR=$RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT%{_dlldir}
115 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
118 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
119 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
123 rm -rf $RPM_BUILD_ROOT
126 %defattr(644,root,root,755)
128 %{_libdir}/libSDL_image.dll.a
129 %{_libdir}/libSDL_image.la
130 %{_includedir}/SDL/SDL_image.h
133 %defattr(644,root,root,755)
134 %{_libdir}/libSDL_image.a
137 %defattr(644,root,root,755)
138 %{_dlldir}/libSDL_image-*.dll