]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blame - crossmingw32-SDL_image.spec
- tabs in preamble
[packages/crossmingw32-SDL_image.git] / crossmingw32-SDL_image.spec
CommitLineData
2b9321d8 1%define realname SDL_image
2Summary: Simple DirectMedia Layer - Sample Image Loading Library - Mingw32 cross version
362e9cb0 3Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków - wersja skrośna dla Mingw32
2b9321d8 4Name: crossmingw32-%{realname}
648ec0b1 5Version: 1.2.5
10fe1d4b 6Release: 1
2b9321d8 7License: LGPL
8Group: Libraries
9Source0: http://www.libsdl.org/projects/SDL_image/release/%{realname}-%{version}.tar.gz
648ec0b1 10# Source0-md5: cd006109a73bf7dcc93e1c3ed15ee782
2b9321d8 11URL: http://www.libsdl.org/projects/SDL_image/
12BuildRequires: autoconf
13BuildRequires: automake
37e61a0a 14BuildRequires: crossmingw32-SDL
2b9321d8 15BuildRequires: crossmingw32-gcc
16BuildRequires: crossmingw32-libjpeg
17BuildRequires: crossmingw32-libpng
2b9321d8 18BuildRequires: crossmingw32-w32api
19BuildRequires: crossmingw32-zlib
20BuildRequires: libtool
37e61a0a
JB
21Requires: crossmingw32-SDL
22Requires: crossmingw32-runtime
2b9321d8 23BuildRoot: %{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%define arch %{_prefix}/%{target}
30%define gccarch %{_prefix}/lib/gcc-lib/%{target}
31%define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
32
33%define __cc %{target}-gcc
34%define __cxx %{target}-g++
35
dcf46c3e 36%ifarch alpha sparc sparc64 sparcv9
37%define optflags -O2
38%endif
39
2b9321d8 40%description
41This is a simple library to load images of various formats as SDL
42surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
43and PNG formats.
44
359a03f1
JR
45%description -l pl.UTF-8
46Jest to prosta biblioteka służąca do ładowania różnego formatu
47obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje
48następujące formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
2b9321d8 49
50%package dll
51Summary: %{realname} - DLL library for Windows
362e9cb0 52Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows
2b9321d8 53Group: Applications/Emulators
54
55%description dll
56%{realname} - DLL library for Windows.
57
359a03f1 58%description dll -l pl.UTF-8
2b9321d8 59%{realname} - biblioteka DLL dla Windows.
60
61%prep
62%setup -q -n %{realname}-%{version}
2b9321d8 63
093880c3
JB
64rm -f acinclude.m4
65
2b9321d8 66%build
67CC=%{target}-gcc ; export CC
68CXX=%{target}-g++ ; export CXX
69LD=%{target}-ld ; export LD
70AR=%{target}-ar ; export AR
71AS=%{target}-as ; export AS
72CROSS_COMPILE=1 ; export CROSS_COMPILE
73CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
74RANLIB=%{target}-ranlib ; export RANLIB
75LDSHARED="%{target}-gcc -shared" ; export LDSHARED
76TARGET="%{target}" ; export TARGET
77
2b9321d8 78%{__libtoolize}
79%{__aclocal}
80%{__autoconf}
81%{__automake}
82# no sdl test, because it requires configured wine to work
83%configure \
648ec0b1 84 png_lib=png.dll \
076dc26b 85 --host=%{_host} \
86 --target=%{target} \
2b9321d8 87 --with-sdl-prefix=%{arch} \
88 --disable-sdltest \
89 --enable-bmp \
90 --enable-gif \
91 --enable-jpg \
92 --enable-pcx \
93 --enable-png \
94 --enable-tga \
95 --disable-shared
96
a9cd7821 97%{__make} libSDL_image.la
2b9321d8 98
99%{__cc} --shared IMG*.o -Wl,--enable-auto-image-base -o SDL_image.dll -Wl,--out-implib,libSDL_image.dll.a -lSDL -lpng -ljpeg
100
101cp -f .libs/libSDL_image.a .
102
103%if 0%{!?debug:1}
104%{target}-strip -R.comment -R.note *.dll
105%{target}-strip -g -R.comment -R.note *.a
106%endif
107
108%install
109rm -rf $RPM_BUILD_ROOT
110install -d $RPM_BUILD_ROOT%{arch}/{include/SDL,lib}
111install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
112
113install *.a $RPM_BUILD_ROOT%{arch}/lib
114install SDL_image.h $RPM_BUILD_ROOT%{arch}/include/SDL
115install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%files
121%defattr(644,root,root,755)
122%{arch}/include/SDL/*
123%{arch}/lib/*
124
125%files dll
126%defattr(644,root,root,755)
a3b45ced 127%{_datadir}/wine/windows/system/*.dll
This page took 0.067562 seconds and 4 git commands to generate.