]> git.pld-linux.org Git - packages/crossmingw32-SDL.git/blob - crossmingw32-SDL.spec
- unified bconds
[packages/crossmingw32-SDL.git] / crossmingw32-SDL.spec
1 #
2 # Conditional build:
3 # _without_alsa - without alsa support
4 # _without_arts - without arts support
5 # _without_esd  - without esound support
6 # _with_nas     - with nas support
7 #
8 %define         realname        SDL
9 Summary:        SDL (Simple DirectMedia Layer) - Game/Multimedia Library
10 Summary(es):    Simple DirectMedia Layer
11 Summary(pl):    SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
12 Summary(pt_BR): Simple DirectMedia Layer
13 Summary(ru):    Simple DirectMedia Layer
14 Summary(uk):    Simple DirectMedia Layer
15 Summary(zh_CN): SDL (Simple DirectMedia Layer) Generic APIs - ÓÎÏ·/¶àýÌå¿â
16 Name:           crossmingw32-%{realname}
17 Version:        1.2.6
18 Release:        1
19 License:        LGPL
20 Group:          X11/Libraries
21 Source0:        http://www.libsdl.org/release/%{realname}-%{version}.tar.gz
22 # Source0-md5:  9011f147f23ec535515291d0c9c6904c
23 Patch0:         %{realname}-byteorder.patch
24 Patch1:         %{realname}-fixlibs.patch
25 Patch2:         %{realname}-amfix.patch
26 Patch3:         %{realname}-lpthread.patch
27 Patch4:         %{realname}-ac25x.patch
28 Patch5:         %{realname}-no_rpath_in_sdl-config.patch
29 Patch6:         %{realname}-noobjc.patch
30 Patch7:         %{realname}-am17.patch
31 Patch8:         %{realname}-lt15.patch
32 URL:            http://www.libsdl.org/
33 BuildRequires:  OpenGL-devel
34 BuildRequires:  XFree86-devel >= 4.0.2
35 BuildRequires:  autoconf
36 BuildRequires:  automake
37 BuildRequires:  crossmingw32-gcc
38 BuildRequires:  crossmingw32-dx70
39 BuildRequires:  libtool >= 2:1.4d
40 %ifarch %{ix86}
41 BuildRequires:  nasm
42 %endif
43 BuildRequires:  perl-modules
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         no_install_post_strip   1
47
48 %define         target          i386-mingw32
49 %define         target_platform i386-pc-mingw32
50 %define         arch            %{_prefix}/%{target}
51 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
52 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
53
54 %define         __cc            %{target}-gcc
55 %define         __cxx           %{target}-g++
56
57 %description
58 SDL (Simple DirectMedia Layer) is a library that allows you portable,
59 low level access to a video framebuffer, audio output, mouse, and
60 keyboard. It can support both windowed and DGA modes of XFree86, and
61 it is designed to be portable - applications linked with SDL can also
62 be built on Win32 and BeOS.
63
64 %description -l pl
65 SDL (Simple DirectMedia Layer) jest bibliotek± udostêpniaj±c±
66 przeno¶ny, niskopoziomowy dostêp do bufora ramki video, wyj¶cia audio,
67 myszy oraz klawiatury. Mo¿e obs³ugiwaæ zarówno okienkowy tryb XFree86
68 jak i DGA. Konstruuj±c j± miano na uwadze przeno¶no¶æ: aplikacje
69 konsolidowane z SDL mo¿na równie¿ budowaæ w systemach Win32 i BeOS.
70
71 %description -l pt_BR
72 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
73 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
74
75 Essa biblioteca é usada por alguns jogos.
76
77 %package devel
78 Summary:        SDL - Header files
79 Summary(pl):    SDL - Pliki nag³ówkowe
80 Summary(pt_BR): Bibliotecas e arquivos de cabeçalho para aplicações SDL
81 Summary(ru):    æÁÊÌÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ SDL
82 Summary(uk):    æÁÊÌÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, ÝÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ SDL
83 Summary(zh_CN): SDL (Simple DirectMedia Layer) ¿ª·¢¿â
84 Group:          X11/Development/Libraries
85 Requires:       %{name} = %{version}
86 Requires:       XFree86-devel >= 4.0.2
87 %ifnarch sparc sparc64
88 %{!?_without_alsa:Requires:     alsa-lib-devel}
89 %endif
90 %{!?_without_arts:Requires:     arts-devel}
91 %{!?_without_esd:Requires:      esound-devel}
92 %{?_with_nas:Requires:  nas-devel}
93
94 %description devel
95 SDL - Header files.
96
97 %description devel -l pl
98 SDL - Pliki nag³ówkowe.
99
100 %description devel -l pt_BR
101 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
102 recursos para o desenvolvimento de aplicativos com SDL.
103
104 %description devel -l ru
105 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÆÁÊÌÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ,
106 ÉÓÐÏÌØÚÕÀÝÉÈ SDL.
107
108 %description devel -l uk
109 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÆÁÊÌÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, ÝÏ
110 ×ÉËÏÒÉÓÔÏ×ÕÀÔØ SDL.
111
112 %package static
113 Summary:        SDL - static libraries
114 Summary(pl):    SDL - biblioteki statyczne
115 Summary(pt_BR): Biblioteca estática para desenvolvimento de aplicações com a SDL
116 Summary(ru):    óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ SDL
117 Summary(uk):    óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÒÏÚÒÏÂËÉ Ú ×ÉËÏÒÉÓÔÁÎÎÑÍ SDL
118 Group:          X11/Development/Libraries
119 Requires:       %{name}-devel = %{version}
120
121 %description static
122 SDL - static libraries.
123
124 %description static -l pl
125 SDL - biblioteki statyczne.
126
127 %description static -l pt_BR
128 Biblioteca estática para desenvolvimento de aplicações com a SDL.
129
130 %description static -l ru
131 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ,
132 ÉÓÐÏÌØÚÕÀÝÉÈ SDL.
133
134 %description static -l uk
135 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, ÝÏ
136 ×ÉËÏÒÉÓÔÏ×ÕÀÔØ SDL.
137
138 %package examples
139 Summary:        SDL - example programs
140 Summary(pl):    SDL - programy przyk³adowe
141 Group:          X11/Development/Libraries
142 Requires:       %{name}-devel = %{version}
143
144 %description examples
145 SDL - example programs.
146
147 %description examples -l pl
148 SDL - przyk³adowe programy.
149
150 %prep
151 %setup -q -n %{realname}-%{version}
152 %patch0 -p1
153 %patch1 -p1
154 %patch2 -p1
155 %patch3 -p1
156 %patch4 -p1
157 %patch5 -p1
158 #%%patch6 -p1
159 #%%patch7 -p1
160 %patch8 -p1
161
162 # get COPY_ARCH_SRC, remove the rest
163 head -n 16 acinclude.m4 > acinclude.tmp
164 mv -f acinclude.tmp acinclude.m4
165
166 find . -type d -name CVS -print | xargs rm -rf {} \;
167
168
169
170 %build
171 CC=%{target}-gcc ; export CC
172 CXX=%{target}-g++ ; export CXX
173 LD=%{target}-ld ; export LD
174 AR=%{target}-ar ; export AR
175 AS=%{target}-as ; export AS
176 CROSS_COMPILE=1 ; export CROSS_COMPILE
177 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
178 RANLIB=%{target}-ranlib ; export RANLIB
179 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
180 TARGET="%{target}" ; export TARGET
181
182 rm -f missing libtool
183 %{__libtoolize}
184 %{__aclocal}
185 %{__automake}
186 %{__autoconf}
187 %configure \
188         --target=%{target} \
189         --host=%{target} \
190         --build=i386-linux \
191 %ifarch %{ix86}
192         --enable-nasm \
193 %else
194         --disable-nasm \
195 %endif
196         --prefix=%{arch}
197
198 %{__make}
199
200 cat sdl-config | sed -e 's@-I/usr/include/SDL@-I/%{arch}/include/SDL@' > sdl.new
201 mv -f sdl.new sdl-config
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT%{arch}/{bin,include/SDL,lib}
206 install -d $RPM_BUILD_ROOT%{_bindir}
207
208 install include/*.h $RPM_BUILD_ROOT%{arch}/include/SDL
209 install sdl-config $RPM_BUILD_ROOT%{arch}/bin/sdl-config
210 install src/.libs/libSDL.a src/main/libSDLmain.a $RPM_BUILD_ROOT%{arch}/lib
211
212 ln -s %{arch}/bin/sdl-config $RPM_BUILD_ROOT%{_bindir}/%{target}-sdl-config
213
214 %clean
215 rm -rf $RPM_BUILD_ROOT
216
217 %files
218 %defattr(644,root,root,755)
219 %attr(755,root,root) %{_bindir}/*
220 %attr(755,root,root) %{arch}/bin/*
221 %{arch}/include/SDL
222 %{arch}/lib/*
This page took 0.106884 seconds and 4 git commands to generate.