]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blob - crossmingw32-SDL_image.spec
- release 2
[packages/crossmingw32-SDL_image.git] / crossmingw32-SDL_image.spec
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}
5 Version:        1.2.6
6 Release:        2
7 License:        LGPL v2.1+
8 Group:          Libraries
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)
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 %ifarch alpha sparc sparc64 sparcv9
38 # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
39 %define         optflags        -O2
40 %endif
41
42 %description
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,
45 and PNG formats.
46
47 This package contains the cross version for Win32.
48
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.
53
54 Ten pakiet zawiera wersję skrośną dla Win32.
55
56 %package static
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}
61
62 %description static
63 Static SDL_image library (cross mingw32 version).
64
65 %description static -l pl.UTF-8
66 Statyczna biblioteka SDL_image (wersja skrośna mingw32).
67
68 %package dll
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
73 Requires:       wine
74
75 %description dll
76 SDL_image - DLL library for Windows.
77
78 %description dll -l pl.UTF-8
79 SDL_image - biblioteka DLL dla Windows.
80
81 %prep
82 %setup -q -n %{realname}-%{version}
83
84 rm -f acinclude.m4
85
86 %build
87 %{__libtoolize}
88 %{__aclocal}
89 %{__autoconf}
90 %{__automake}
91 # no sdl test, because it requires configured wine to work
92 %configure \
93         png_lib=libpng12-0.dll \
94         --host=%{target} \
95         --target=%{target} \
96         --with-sdl-prefix=%{_prefix} \
97         --disable-sdltest \
98         --enable-bmp \
99         --enable-gif \
100         --enable-jpg \
101         --enable-pcx \
102         --enable-png \
103         --enable-tga
104
105 # LIBS hack for libtool not detecting libraries without .la files
106 %{__make} \
107         LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')"
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %{__make} install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 install -d $RPM_BUILD_ROOT%{_dlldir}
116 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
117
118 %if 0%{!?debug:1}
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
121 %endif
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %files
127 %defattr(644,root,root,755)
128 %doc CHANGES README
129 %{_libdir}/libSDL_image.dll.a
130 %{_libdir}/libSDL_image.la
131 %{_includedir}/SDL/SDL_image.h
132
133 %files static
134 %defattr(644,root,root,755)
135 %{_libdir}/libSDL_image.a
136
137 %files dll
138 %defattr(644,root,root,755)
139 %{_dlldir}/libSDL_image-*.dll
This page took 0.054253 seconds and 4 git commands to generate.