File cross-mips64-gmp.spec of Package cross-gmp

%define cross_arch mips64
Name:           cross-%{cross_arch}-gmp
Version:        6.1.0
Release:        0
Summary:        Foo
License:        GPL-3.0+
Group:          foo
Source0:        gmp-%{version}.tar.bz2
Source2:        cross-gmp-rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cross-%{cross_arch}-binutils
BuildRequires:  cross-%{cross_arch}-gcc
BuildRequires:  cross-%{cross_arch}-glibc-devel
Requires:       libgmp10
Provides:       cross-%{cross_arch}-gmp-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 gmp-%{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}%{cross_libdir}/*.la
rm -rf %{buildroot}%{sysroot}%{_infodir}

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

%changelog