File cross-which.spec.in of Package cross-which

Name:           cross-%{cross_arch}-which
Version:        2.21
Release:        0
Summary:        Foo
License:        GPL-3.0+
Group:          foo
Source0:        which-%{version}.tar.gz
Source2:        cross-which-rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cross-%{cross_arch}-binutils
BuildRequires:  cross-%{cross_arch}-gcc
BuildRequires:  cross-%{cross_arch}-glibc-devel

%description
Foo

%define gcc_target_arch %{cross_arch}-suse-linux

%define sysroot %{_prefix}/%{gcc_target_arch}/sys-root

%define cross_lib lib
%if "%{cross_arch}" == "mips64"
%define cross_lib lib64
%endif
%define cross_libdir %{_prefix}/%{cross_lib}

%prep
%setup -q -n which-%{version}

%build
./configure \
	--host=%{gcc_target_arch} \
	--prefix=%{_prefix} \
	--libdir=%{cross_libdir} \

make %{?_smp_mflags}

%install
export NO_BRP_CHECK_RPATH=true
export NO_BRP_STRIP_DEBUG=true
export NO_DEBUGINFO_STRIP_DEBUG=true
make %{?_smp_mflags} install \
     DESTDIR=%{buildroot}%{sysroot}
rm -f %{buildroot}%{sysroot}%{_infodir}/dir

%files
%defattr(-,root,root)
%dir %{sysroot}
%dir %{sysroot}%{_prefix}
%{sysroot}%{_prefix}/

%changelog