Needed to bump the version again in order to get rid of the %preun.
[fedora-mingw.git] / SDL / mingw32-SDL.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-SDL
8 Version:        1.2.13
9 Release:        2%{?dist}
10 Summary:        MinGW Windows port of SDL cross-platform multimedia library
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14 URL:            http://www.libsdl.org/
15 Source0:        http://www.libsdl.org/release/SDL-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 BuildArch:      noarch
19
20 # Patches from native version.
21 Patch0:         SDL-1.2.10-byteorder.patch
22 Patch17:        SDL-1.2.13-libdir.patch
23 Patch21:        SDL-1.2.12-multilib.patch
24 Patch23:        SDL-1.2.11-dynamic-esd.patch
25 Patch24:        SDL-1.2.12-x11dyn64.patch
26 Patch25:        SDL-1.2.12-disable_yasm.patch
27 Patch26:        SDL-1.2.13-dynamic-pulse.patch
28 Patch27:        SDL-1.2.13-pulse-rework.patch
29 Patch28:        SDL-1.2.13-audiodriver.patch
30
31 BuildRequires:  mingw32-filesystem >= 30
32 BuildRequires:  mingw32-gcc
33 BuildRequires:  mingw32-binutils
34
35 #%ifarch %{ix86}
36 #BuildRequires: nasm
37 #%endif
38
39
40 %description
41 Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
42 designed to provide fast access to the graphics frame buffer and audio
43 device.
44
45
46 %prep
47 %setup -q -n SDL-%{version}
48 %patch0 -p1 -b .byteorder
49 %patch17 -p1 -b .libdir
50 %patch21 -p1 -b .multilib
51 %patch23 -p1 -b .dynamic-esd
52 %patch24 -p1 -b .x11dyn64
53 %patch25 -p1 -b .disable_yasm
54 %patch26 -p1 -b .dynamic-pulse
55 %patch27 -p1 -b .pulse-rework
56 %patch28 -p1 -b .audiodriver
57
58
59 %build
60 %{_mingw32_configure} \
61   --disable-video-svga --disable-video-ggi --disable-video-aalib \
62   --disable-debug \
63   --enable-sdl-dlopen \
64   --enable-dlopen \
65   --enable-arts-shared \
66   --enable-esd-shared \
67   --enable-pulseaudio-shared \
68   --enable-alsa \
69   --disable-rpath
70
71 make
72
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 make DESTDIR=$RPM_BUILD_ROOT install
77
78 # Remove static libraries but DON'T remove *.dll.a files.
79 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDL.a
80
81 # Actually libSDLmain.a seems to be required.  It just contains
82 # a single object file called SDL_win32_main.o.
83 #rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDLmain.a
84
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89
90 %files
91 %defattr(-,root,root)
92 %{_mingw32_bindir}/SDL.dll
93 %{_mingw32_bindir}/sdl-config
94 %{_mingw32_libdir}/libSDL.dll.a
95 %{_mingw32_libdir}/libSDL.la
96 %{_mingw32_libdir}/libSDLmain.a
97 %{_mingw32_libdir}/pkgconfig/sdl.pc
98 %{_mingw32_datadir}/aclocal/sdl.m4
99 %{_mingw32_mandir}/man3/*.3*
100 %{_mingw32_includedir}/SDL
101
102
103 %changelog
104 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.13-2
105 - Initial RPM release.