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