#
# Conditional build:
-# _with_systemlibs - use system libraries instead of modified ones
-# (modified can give little better results)
+%bcond_with systemlibs # use system libraries instead of modified ones
+# (modified can give little better results)
#
Summary: Optimizer for png files
Summary(pl): Optymalizator plików png
Name: pngcrush
Version: 1.5.10
Release: 2
-License: GPL
+License: BSD-like (see README.txt)
Group: Applications/Graphics
Source0: http://dl.sourceforge.net/pmt/%{name}-%{version}.tar.bz2
# Source0-md5: a659cc4d9f7cf57bbc979193a054704f
URL: http://pmt.sf.net/pngcrush/
-%if 0%{?_with_systemlibs:1}
+%if %{with systemlibs}
BuildRequires: libpng-devel
BuildRequires: zlib-devel
%endif
%prep
%setup -q
-%if 0%{?_with_systemlibs:1}
+%if %{with systemlibs}
# workaround for Makefile and #include "png.h"
echo '#include <png.h>' > png.h
%endif
%{__make} -f Makefile.gcc \
CC="%{__cc}" \
CFLAGS="%{rpmcflags} -Wall" \
-%if 0%{?_with_systemlibs:1}
+%if %{with systemlibs}
OBJS="pngcrush.o" \
LDFLAGS="%{rpmldflags} -lpng -lz"
%endif