2013-02-28 16:37:27 +11:00

60 lines
1.3 KiB
INI

#
# Expat 2.xx Version 1.
#
# This configuration file configure's, make's and install's expat.
#
%if %{release} == %{nil}
%define release 1
%endif
Name: expat-%{expat_version}-%{_host}-%{release}
Summary: Expat XML Parser v%{expat_version} for target %{_target} on host %{_host}
Version: %{expat_version}
Release: %{release}
URL: http://expat.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: http://downloads.sourceforge.net/project/expat/expat/%{expat_version}/expat-%{expat_version}.tar.gz
#
# Prepare the source code.
#
%prep
%setup -q -c -n %{name}-%{version}
cd expat-%{expat_version}
%{?patch0:%patch0 -p1}
cd ..
%build
export PATH="%{_bindir}:${PATH}"
cd expat-%{expat_version}
%if "%{_build}" != "%{_host}"
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
%endif
CFLAGS="$SB_OPT_FLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
--verbose \
--prefix=%{_prefix} --bindir=%{_bindir} \
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
%{__make} %{?_smp_mflags} all
cd ..
%install
export PATH="%{_bindir}:${PATH}"
rm -rf $SB_BUILD_ROOT
cd expat-%{expat_version}
%{__make} DESTDIR=$SB_BUILD_ROOT install
cd ..