Skip to content

Instantly share code, notes, and snippets.

@lbt
Created September 7, 2012 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbt/3664340 to your computer and use it in GitHub Desktop.
Save lbt/3664340 to your computer and use it in GitHub Desktop.
# spec file for cross-chroot accelerator
#
# Copyright (c) 2010 Jan-Simon Möller (jsmoeller@linuxfoundation.org)
#
Name: cross-sysroot
ExclusiveArch: %ix86
AutoReqProv: 0
AutoReqProv: off
Version: 0.0.1
Release: 1
License: GPL v2 or later
Group: Development/Tools/Building
Summary: This provides the sysroot file structure
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: none
BuildRequires: -rpmlint-Factory -rpmlint-mini -post-build-checks tar
%description
Needed for cross-build on x86 side to host the %{_my_port_arch} cross sysroot
%prep
%build
%install
#rpm -ql filesystem is too much.
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/etc
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/dev
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/proc
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/sys
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/bin
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/lib
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/sbin
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/usr/bin
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/usr/lib
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/usr/sbin
mkdir -p %buildroot/opt/cross/%{_my_port_arch}-%{_vendor}-linux-@GNU@/sys-root/usr/include
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/opt/cross
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment