]> git.pld-linux.org Git - packages/SDL2_image.git/blob - SDL2_image.spec
up to 2.8.2
[packages/SDL2_image.git] / SDL2_image.spec
1 #
2 # Conditional build:
3 %bcond_without  avif            # AV1 Image File Format support
4 %bcond_without  jxl             # JPEG XL support
5 %bcond_without  static_libs     # static library
6
7 Summary:        Simple DirectMedia Layer 2 - Sample Image Loading Library
8 Summary(pl.UTF-8):      Przykładowa biblioteka do ładowania obrazków dla SDL2
9 Summary(pt_BR.UTF-8):   Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens
10 Name:           SDL2_image
11 Version:        2.8.2
12 Release:        1
13 License:        Zlib-like
14 Group:          Libraries
15 Source0:        https://github.com/libsdl-org/SDL_image/releases/download/release-%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  8464c8aaad39fe9be6a9c1e85b370cd1
17 Patch0:         %{name}-libjpeg.patch
18 URL:            https://github.com/libsdl-org/SDL_image
19 BuildRequires:  SDL2-devel >= 2.0.9
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 %{?with_avif:BuildRequires:     libavif-devel >= 0.9.3}
23 BuildRequires:  libjpeg-devel >= 8
24 %{?with_jxl:BuildRequires:      libjxl-devel}
25 BuildRequires:  libpng-devel >= 2:1.6.0
26 BuildRequires:  libtiff-devel >= 4
27 BuildRequires:  libtool >= 2:2
28 BuildRequires:  libwebp-devel >= 0.6.0
29 BuildRequires:  pkgconfig >= 1:0.9.0
30 BuildRequires:  rpmbuild(macros) >= 1.527
31 Requires:       SDL2 >= 2.0.9
32 %{?with_avif:Suggests:  libavif >= 0.9.3}
33 Suggests:       libjpeg >= 8
34 %{?with_jxl:Suggests:   libjxl}
35 Suggests:       libpng >= 2:1.6.0
36 Suggests:       libtiff >= 4
37 Suggests:       libwebp >= 0.6.0
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 # NOTE: libraries dlopened by sonames detected at build time:
41 # libavif.so.15
42 # libjpeg.so.8
43 # libjxl.so.0.8
44 # libpng16.so.16
45 # libtiff.so.5
46 # libwebp.so.7
47
48 %description
49 This is a simple library to load images of various formats as SDL2
50 surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX,
51 PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats.
52
53 %description -l pl.UTF-8
54 Jest to prosta biblioteka służąca do ładowania różnego formatu
55 obrazków jako powierzchni SDL2. W chwili obecnej biblioteka obsługuje
56 następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM),
57 TGA, TIFF, WebP, XCF oraz XPM.
58
59 %description -l pt_BR.UTF-8
60 Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens.
61
62 %package devel
63 Summary:        Header files and more to develop SDL2_image applications
64 Summary(pl.UTF-8):      Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image
65 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL2
66 Group:          Development/Libraries
67 Requires:       %{name} = %{version}-%{release}
68 Requires:       SDL2-devel >= 2.0.9
69
70 %description devel
71 Header files and more to develop SDL2_image applications.
72
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image.
75
76 %description devel -l pt_BR.UTF-8
77 Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
78 SDL2.
79
80 %package static
81 Summary:        Static SDL2_image libraries
82 Summary(pl.UTF-8):      Statyczne biblioteki SDL2_image
83 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento de aplicações SDL2
84 Group:          Development/Libraries
85 Requires:       %{name}-devel = %{version}-%{release}
86
87 %description static
88 Statis SDL2_image libraries.
89
90 %description static -l pl.UTF-8
91 Statyczne biblioteki SDL2_image.
92
93 %description static -l pt_BR.UTF-8
94 Bibliotecas estáticas para desenvolvimento de aplicações SDL2.
95
96 %prep
97 %setup -q
98 %patch0 -p1
99
100 %build
101 %{__libtoolize}
102 %{__aclocal}
103 %{__autoconf}
104 %{__automake}
105 %configure \
106         %{__enable_disable static_libs static} \
107         --disable-stb-image \
108         %{__enable_disable avif} \
109         --enable-avif-shared \
110         --enable-bmp \
111         --enable-gif \
112         --enable-jpg \
113         --enable-jpg-shared \
114         %{__enable_disable jxl} \
115         --enable-jxl-shared \
116         --enable-lbm \
117         --enable-pcx \
118         --enable-png \
119         --enable-png-shared \
120         --enable-pnm \
121         --enable-qoi \
122         --enable-svg \
123         --enable-tga \
124         --enable-tif \
125         --enable-tif-shared \
126         --enable-webp \
127         --enable-webp-shared \
128         --enable-xcf \
129         --enable-xpm \
130         --enable-xv
131
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT%{_bindir}
137
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT
140
141 install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show
142
143 # obsoleted by pkg-config
144 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %post   -p /sbin/ldconfig
150 %postun -p /sbin/ldconfig
151
152 %files
153 %defattr(644,root,root,755)
154 %doc CHANGES.txt LICENSE.txt README.txt
155 %attr(755,root,root) %{_bindir}/sdl2show
156 %attr(755,root,root) %{_libdir}/libSDL2_image-2.0.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libSDL2_image-2.0.so.0
158
159 %files devel
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libSDL2_image.so
162 %{_libdir}/cmake/SDL2_image
163 %{_includedir}/SDL2/SDL_image.h
164 %{_pkgconfigdir}/SDL2_image.pc
165
166 %if %{with static_libs}
167 %files static
168 %defattr(644,root,root,755)
169 %{_libdir}/libSDL2_image.a
170 %endif
This page took 0.698229 seconds and 3 git commands to generate.