1 |
%define major 0 |
2 |
%define apiver 1.2 |
3 |
%define libname %mklibname %{name} %{apiver} %{major} |
4 |
%define develname %mklibname %{name} -d |
5 |
|
6 |
Summary: Simple DirectMedia Layer - image |
7 |
Name: SDL_image |
8 |
Version: 1.2.12 |
9 |
Release: %mkrel 1 |
10 |
License: LGPLv2+ |
11 |
Group: System/Libraries |
12 |
URL: http://www.libsdl.org/projects/SDL_image/index.html |
13 |
Source0: http://www.libsdl.org/projects/SDL_image/release/%{name}-%{version}.tar.gz |
14 |
Patch0: SDL_image-1.2.11-png_channels.patch |
15 |
BuildRequires: libjpeg-devel |
16 |
BuildRequires: libpng-devel |
17 |
BuildRequires: libtiff-devel |
18 |
BuildRequires: libSDL-devel >= 1.2.10 |
19 |
|
20 |
%description |
21 |
This is a simple library to load images of various formats as SDL surfaces. |
22 |
This library currently supports BMP, PPM, PCX, GIF, JPEG, and PNG formats. |
23 |
|
24 |
This package contains the binary `sdlshow' to test the library. |
25 |
|
26 |
%package -n %{libname} |
27 |
Summary: Main library for %{name} |
28 |
Group: System/Libraries |
29 |
Obsoletes: %{_lib}SDL_image1.2 < 1.2.6-2 |
30 |
|
31 |
%description -n %{libname} |
32 |
This package contains the library needed to run programs dynamically |
33 |
linked with %{name}. |
34 |
|
35 |
%package -n %{develname} |
36 |
Summary: Headers for developing programs that will use %{name} |
37 |
Group: Development/C |
38 |
Requires: %{libname} = %{version}-%{release} |
39 |
Requires: libSDL-devel |
40 |
Provides: lib%{name}-devel = %{version}-%{release} |
41 |
Provides: %{name}%{major}-devel = %{version}-%{release} |
42 |
Provides: %{name}-devel = %{version}-%{release} |
43 |
Obsoletes: %{_lib}SDL_image1.2-devel < 1.2.6-2 |
44 |
|
45 |
%description -n %{develname} |
46 |
This package contains the headers that programmers will need to develop |
47 |
applications which will use %{name}. |
48 |
|
49 |
%package -n %{libname}-test |
50 |
Summary: Test binary for %{name} |
51 |
Group: System/Libraries |
52 |
Obsoletes: %{_lib}SDL_image1.2-test < 1.2.6-2 |
53 |
|
54 |
%description -n %{libname}-test |
55 |
This package contains binary to test the associated library. |
56 |
|
57 |
%prep |
58 |
%setup -q |
59 |
%apply_patches |
60 |
|
61 |
%build |
62 |
# (anssi) --disable-x-shared disable dlopening, so that we link to them |
63 |
# dynamically instead, and thus get correct autorequires |
64 |
%configure2_5x --disable-static --enable-bmp \ |
65 |
--enable-gif \ |
66 |
--enable-jpg \ |
67 |
--enable-pcx \ |
68 |
--enable-png \ |
69 |
--enable-ppm \ |
70 |
--enable-tif \ |
71 |
--enable-xpm \ |
72 |
--disable-jpg-shared \ |
73 |
--disable-png-shared \ |
74 |
--disable-tif-shared |
75 |
|
76 |
%make |
77 |
|
78 |
%install |
79 |
rm -rf %{buildroot} |
80 |
%makeinstall_std |
81 |
|
82 |
rm -f %{buildroot}%{_libdir}/*.la |
83 |
|
84 |
install -d %{buildroot}%{_bindir} |
85 |
install -m755 .libs/showimage %{buildroot}%{_bindir}/sdlshow |
86 |
|
87 |
%clean |
88 |
rm -rf %{buildroot} |
89 |
|
90 |
%files -n %{libname}-test |
91 |
%defattr(-,root,root) |
92 |
%{_bindir}/sdlshow |
93 |
|
94 |
%files -n %{libname} |
95 |
%defattr(-,root,root) |
96 |
%{_libdir}/lib*%{apiver}.so.%{major}* |
97 |
|
98 |
%files -n %{develname} |
99 |
%defattr(-,root,root) |
100 |
%doc README CHANGES |
101 |
%{_libdir}/lib*.so |
102 |
%{_includedir}/SDL/* |
103 |
%{_libdir}/pkgconfig/SDL_image.pc |