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

Name:           cross-%{cross_arch}-aaa_base
Version:        13.2+git20151221.244f2a3
Release:        0
Summary:        Foo
License:        GPL-2.0+
Group:          foo
Source0:        aaa_base-%{version}.tar.xz
Source2:        cross-aaa_base-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 aaa_base-%{version}

%build
make %{?_smp_mflags} \
	CC="%{gcc_target_arch}-gcc" \

%install
export NO_BRP_CHECK_RPATH=true
export NO_BRP_STRIP_DEBUG=true
export NO_DEBUGINFO_STRIP_DEBUG=true
mkdir -p %{buildroot}%{sysroot}
make %{?_smp_mflags} install \
     DESTDIR=%{buildroot}%{sysroot}

mkdir -p %{buildroot}%{sysroot}/usr/lib/sysctl.d
case "%{cross_arch}" in
    s390*) ;;
    *) rm -f %{buildroot}%{sysroot}/usr/lib/sysctl.d/50-default-s390.conf ;;
esac
install -d -m 755 %{buildroot}%{sysroot}/usr/lib/initscripts/legacy-actions

%files
%defattr(-,root,root)
%{sysroot}/
%dir %{sysroot}/usr/lib/initscripts
%dir %{sysroot}/usr/lib/initscripts/legacy-actions

%changelog