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