]> git.pld-linux.org Git - packages/crossmingw32-SDL.git/blob - crossmingw32-SDL.spec
- update to final 1.2.7
[packages/crossmingw32-SDL.git] / crossmingw32-SDL.spec
1 %define         realname        SDL
2 Summary:        SDL (Simple DirectMedia Layer) - Game/Multimedia Library - Mingw32 cross version
3 Summary(pl):    SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów - wersja skro¶na dla Mingw32
4 Name:           crossmingw32-%{realname}
5 Version:        1.2.7
6 Release:        3
7 License:        LGPL
8 Group:          X11/Libraries
9 Source0:        http://www.libsdl.org/release/%{realname}-%{version}.tar.gz
10 # Source0-md5:  d29b34b6ba3ed213893fc9d8d35e357a
11 Patch0:         %{realname}-byteorder.patch
12 Patch2:         %{realname}-amfix.patch
13 Patch3:         %{realname}-lpthread.patch
14 URL:            http://www.libsdl.org/
15 BuildRequires:  autoconf
16 BuildRequires:  automake
17 BuildRequires:  crossmingw32-gcc
18 BuildRequires:  crossmingw32-runtime
19 BuildRequires:  crossmingw32-w32api
20 BuildRequires:  crossmingw32-w32api-dx
21 BuildRequires:  libtool >= 2:1.4d
22 BuildConflicts: crossmingw32-dx70
23 %ifarch %{ix86}
24 BuildRequires:  nasm
25 %endif
26 BuildRequires:  perl-modules
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         no_install_post_strip   1
30
31 %define         target          i386-mingw32
32 %define         target_platform i386-pc-mingw32
33 %define         arch            %{_prefix}/%{target}
34 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
35 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
36
37 %define         __cc            %{target}-gcc
38 %define         __cxx           %{target}-g++
39
40 %ifarch alpha sparc sparc64 sparcv9
41 # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
42 %define         optflags        -O2
43 %endif
44
45 %description
46 SDL (Simple DirectMedia Layer) is a library that allows you portable,
47 low level access to a video framebuffer, audio output, mouse, and
48 keyboard. It can support both windowed and DGA modes of XFree86, and
49 it is designed to be portable - applications linked with SDL can also
50 be built on Win32 and BeOS.
51
52 %description -l pl
53 SDL (Simple DirectMedia Layer) jest bibliotek± udostêpniaj±c±
54 przeno¶ny, niskopoziomowy dostêp do bufora ramki video, wyj¶cia audio,
55 myszy oraz klawiatury. Mo¿e obs³ugiwaæ zarówno okienkowy tryb XFree86
56 jak i DGA. Konstruuj±c j± miano na uwadze przeno¶no¶æ: aplikacje
57 konsolidowane z SDL mo¿na równie¿ budowaæ w systemach Win32 i BeOS.
58
59 %description -l pt_BR
60 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
61 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
62
63 Essa biblioteca é usada por alguns jogos.
64
65 %package dll
66 Summary:        SDL - DLL library for Windows
67 Summary(pl):    SDL - biblioteka DLL dla Windows
68 Group:          Applications/Emulators
69
70 %description dll
71 SDL - DLL library for Windows.
72
73 %description dll -l pl
74 SDL - biblioteka DLL dla Windows.
75
76 %prep
77 %setup -q -n %{realname}-%{version}
78 %patch0 -p1
79 %patch2 -p1
80 %patch3 -p1
81
82 %build
83 CC=%{target}-gcc ; export CC
84 CXX=%{target}-g++ ; export CXX
85 LD=%{target}-ld ; export LD
86 AR=%{target}-ar ; export AR
87 AS=%{target}-as ; export AS
88 CROSS_COMPILE=1 ; export CROSS_COMPILE
89 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
90 RANLIB=%{target}-ranlib ; export RANLIB
91 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
92 TARGET="%{target}" ; export TARGET
93
94 ./autogen.sh
95 %configure \
96         --target=%{target} \
97         --host=%{target} \
98         --build=i386-linux \
99 %ifarch %{ix86}
100         --enable-nasm \
101 %else
102         --disable-nasm \
103 %endif
104         --prefix=%{arch} \
105         --disable-stdio-redirect
106
107 %{__make}
108
109 cat sdl-config | sed -e 's@-I/usr/include/SDL@-I%{arch}/include/SDL@' \
110         -e 's@libdirs="-L/usr/lib "@libdirs="-L%{arch}/lib"@' > sdl.new
111 mv -f sdl.new sdl-config
112
113 %if 0%{!?debug:1}
114 %{target}-strip src/.libs/SDL.dll
115 %{target}-strip -g -R.comment -R.note src/.libs/*.a
116 %endif
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT%{arch}/{bin,include/SDL,lib}
121 install -d $RPM_BUILD_ROOT%{_bindir}
122 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
123
124 install include/*.h $RPM_BUILD_ROOT%{arch}/include/SDL
125 install sdl-config $RPM_BUILD_ROOT%{arch}/bin/sdl-config
126 install src/.libs/libSDL{,.dll}.a src/main/libSDLmain.a $RPM_BUILD_ROOT%{arch}/lib
127 install src/.libs/SDL.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system/
128
129 ln -s %{arch}/bin/sdl-config $RPM_BUILD_ROOT%{_bindir}/%{target}-sdl-config
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %files
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_bindir}/*
137 %attr(755,root,root) %{arch}/bin/*
138 %{arch}/include/SDL
139 %{arch}/lib/*
140
141 %files dll
142 %defattr(644,root,root,755)
143 %{_datadir}/wine/windows/system/*
This page took 0.065082 seconds and 4 git commands to generate.