]> git.pld-linux.org Git - packages/libmng.git/blobdiff - libmng.spec
- updated for 1.0.9
[packages/libmng.git] / libmng.spec
index e558112dfdc5cdc5a20bc1f1660b17a6d13eb2c3..da40976cee0fbadf6eababdd16b6e6c1d12fc54e 100644 (file)
@@ -1,16 +1,19 @@
+#
+# Conditional build:
+%bcond_without sdl     # don't build SDL-based contribs
+#
 Summary:       A library of functions for manipulating MNG format files
 Summary(pl):   Biblioteka do obróbki plików w formacie MNG
 Summary(uk):   â¦Â̦ÏÔÅËÁ ÆÕÎËæʠÄÌÑ ÒÏÂÏÔÉ Ú ÆÁÊÌÁÍÉ Õ ÆÏÒÍÁÔ¦ MNG
 Summary(ru):   âÉÂÌÉÏÔÅËÁ ÆÕÎËÃÉÊ ÄÌÑ ÒÁÂÏÔÙ Ó ÆÁÊÌÁÍÉ × ÆÏÒÍÁÔÅ MNG
 Name:          libmng
-Version:       1.0.7
-Release:       2
+Version:       1.0.9
+Release:       1
 License:       BSD-like
 Group:         Libraries
 Source0:       http://dl.sourceforge.net/libmng/%{name}-%{version}.tar.gz
-# Source0-md5: 863002cf13a60ccfd8be641b62e3cc58
+# Source0-md5: ff1205ef70855a75c098ea09690413c6
 Patch0:                %{name}-automake.patch
-Patch1:                %{name}-gtk2.patch
 URL:           http://www.libmng.com/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -19,11 +22,12 @@ BuildRequires:      libjpeg-devel
 BuildRequires: libtool
 BuildRequires: zlib-devel
 # for contribs
-BuildRequires: SDL-devel
-BuildRequires: gtk+2-devel >= 2.0.0
+%{?with_sdl:BuildRequires:     SDL-devel}
+BuildRequires: gtk+2-devel >= 1:2.0.0
 BuildRequires: motif-devel >= 2.0
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: pkgconfig
 Obsoletes:     libmng1
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 libmng - library for reading, writing, displaying and examing
@@ -153,7 +157,6 @@ mngplay - przegl
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 cp makefiles/{Makefile.am,configure.in} .
@@ -185,9 +188,11 @@ cp doc/man/makefiles/Makefile.am doc/man
        CFLAGS="%{rpmcflags} -Wall -DMNG_USE_SO -I../../.." \
        LDFLAGS="%{rpmldflags} -L../../../.libs -lmng"
 
+%if %{with sdl}
 %{__cc} -o contrib/gcc/sdl-mngplay/mngplay contrib/gcc/sdl-mngplay/mngplay.c \
        %{rpmldflags} %{rpmcflags} -I. \
         -L.libs -lmng `sdl-config --libs`
+%endif
 
 %{__make} -C contrib/gcc/xmngview compile \
        CC="%{__cc}" \
@@ -201,7 +206,7 @@ install -d $RPM_BUILD_ROOT%{_bindir}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install contrib/gcc/*/{fbmngplay,gmngview,mngtree,mngplay,xmngview} \
+install contrib/gcc/*/{fbmngplay,gmngview,mngtree%{?with_sdl:,mngplay},xmngview} \
        $RPM_BUILD_ROOT%{_bindir}
 
 %clean
@@ -241,6 +246,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/xmngview
 
+%if %{with sdl}
 %files progs-sdl
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/mngplay
+%endif
This page took 0.033899 seconds and 4 git commands to generate.