From 7e96a0d5773e64d0f4640c494bc80e3b4efeb6b3 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Fri, 13 Jun 2014 20:45:27 +0200 Subject: [PATCH] - new --- SDL2_image.spec | 148 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 SDL2_image.spec diff --git a/SDL2_image.spec b/SDL2_image.spec new file mode 100644 index 0000000..692d797 --- /dev/null +++ b/SDL2_image.spec @@ -0,0 +1,148 @@ +Summary: Simple DirectMedia Layer 2 - Sample Image Loading Library +Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków dla SDL2 +Summary(pt_BR.UTF-8): Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens +Name: SDL2_image +Version: 2.0.0 +Release: 1 +License: Zlib-like +Group: Libraries +Source0: http://www.libsdl.org/projects/SDL_image/release/%{name}-%{version}.tar.gz +# Source0-md5: fb399c8386fb3248f1b33cfe81bdf92b +URL: http://www.libsdl.org/projects/SDL_image/ +BuildRequires: SDL2-devel >= 2.0.0 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libjpeg-devel >= 8 +BuildRequires: libpng-devel >= 2:1.5.0 +BuildRequires: libtiff-devel >= 4 +BuildRequires: libtool >= 2:2 +BuildRequires: libwebp-devel >= 0.1.3 +BuildRequires: pkgconfig >= 1:0.9.0 +Requires: SDL2 >= 2.0.0 +Suggests: libjpeg >= 8 +%if "%(pkg-config --exists libpng16 2>/dev/null ; echo $?)" == "0" +Suggests: libpng >= 2:1.6.0 +%else +Suggests: libpng >= 2:1.5.0 +%endif +Suggests: libtiff >= 4 +Suggests: libwebp >= 0.1.3 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +# NOTE: libraries dlopened by sonames detected at build time: +# libjpeg.so.8 +# libpng16.so.16/libpng15.so.15/... +# libtiff.so.5 +# libwebp.so.5 + +%description +This is a simple library to load images of various formats as SDL2 +surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX, +PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats. + +%description -l pl.UTF-8 +Jest to prosta biblioteka służąca do ładowania różnego formatu +obrazków jako powierzchni SDL2. W chwili obecnej biblioteka obsługuje +następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM), +TGA, TIFF, WebP, XCF oraz XPM. + +%description -l pt_BR.UTF-8 +Simple DirectMedia Layer 2 - Biblioteca exemplo para carga de Imagens. + +%package devel +Summary: Header files and more to develop SDL2_image applications +Summary(pl.UTF-8): Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image +Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações SDL2 +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: SDL2-devel >= 2.0.0 + +%description devel +Header files and more to develop SDL2_image applications. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe do rozwijania aplikacji używających SDL2_image. + +%description devel -l pt_BR.UTF-8 +Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações +SDL2. + +%package static +Summary: Static SDL2_image libraries +Summary(pl.UTF-8): Statyczne biblioteki SDL2_image +Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento de aplicações SDL2 +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Statis SDL2_image libraries. + +%description static -l pl.UTF-8 +Statyczne biblioteki SDL2_image. + +%description static -l pt_BR.UTF-8 +Bibliotecas estáticas para desenvolvimento de aplicações SDL2. + +%prep +%setup -q + +%build +%{__libtoolize} +%{__aclocal} +%{__autoconf} +%{__automake} +%configure \ + --enable-bmp \ + --enable-gif \ + --enable-jpg \ + --enable-jpg-shared \ + --enable-lbm \ + --enable-pcx \ + --enable-png \ + --enable-png-shared \ + --enable-pnm \ + --enable-tga \ + --enable-tif \ + --enable-tif-shared \ + --enable-webp \ + --enable-webp-shared \ + --enable-xcf \ + --enable-xpm \ + --enable-xv + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_bindir} + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +install .libs/showimage $RPM_BUILD_ROOT%{_bindir}/sdl2show + +# obsoleted by pkg-config +%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc CHANGES.txt COPYING.txt README.txt +%attr(755,root,root) %{_bindir}/sdl2show +%attr(755,root,root) %{_libdir}/libSDL2_image-2.0.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libSDL2_image-2.0.so.0 + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libSDL2_image.so +%{_includedir}/SDL2/SDL_image.h +%{_pkgconfigdir}/SDL2_image.pc + +%files static +%defattr(644,root,root,755) +%{_libdir}/libSDL2_image.a -- 2.44.0