Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb40424' into 'master'
Add support for aarch64.

See merge request !1
  • Loading branch information
Matti Kosola committed Dec 11, 2017
2 parents 0d1dc2e + f5f0998 commit e4eab51
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rpm/baselibs.conf
@@ -1 +1 @@
arch i486 targets armv7l:inject armv7hl:inject mipsel:inject
arch i486 targets aarch64:inject armv7l:inject armv7hl:inject mipsel:inject
2 changes: 1 addition & 1 deletion rpm/precheckin.sh
@@ -1,5 +1,5 @@
#!/bin/sh
ARCHS="armv7l armv7hl mipsel"
ARCHS="aarch64 armv7l armv7hl mipsel"

echo -n "arch i486 targets " > baselibs.conf
for x in $ARCHS; do
Expand Down
2 changes: 2 additions & 0 deletions rpm/sb2-tools-qt5-aarch64-rpmlintrc
@@ -0,0 +1,2 @@
from Config import *
addFilter(".*")
105 changes: 105 additions & 0 deletions rpm/sb2-tools-qt5-aarch64.spec
@@ -0,0 +1,105 @@
%define __strip /bin/true
%define architecture_target aarch64
%define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm
%define packages_in_tools qt5-qmake qt5-tools qt5-qtcore qt5-qtxml systemd-libs libgcrypt libgpg-error
Name: sb2-tools-qt5-aarch64
Version: 1.0
Release: 1
Source0: %{name}-%{version}.tar.bz2
Source1: baselibs.conf
Source2: precheckin.sh
Source100: sb2-tools-qt5-aarch64-rpmlintrc

# no auto requirements - they're generated
AutoReqProv: 0
BuildRequires: rpm grep tar patchelf sed fakeroot
BuildRequires: %packages_in_tools
ExclusiveArch: %{ix86}

License: BSD
Group: Development/Tools
Summary: SB2 cross tools for qt5

%description
This is a package providing %packages_in_tools for SB2 tools directory
It is not intended to be used in a normal system!


%package dependency
Summary: Dependency for sb2 host side
Group: Development/Tools

%description dependency
This is a package providing %packages_in_tools SB2 tools directory
It is not intended to be used in a normal system!

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

%build

%install

#set +x -e
mkdir -p %buildroot
rpm -ql %packages_in_tools > filestoinclude1
cat > filestoignore << EOF
/usr/share/man
/usr/share/doc
EOF
grep -vf filestoignore filestoinclude1 | sort | uniq > filestoinclude2
cat filestoinclude2
tar --no-recursion -T filestoinclude2 -cpf - | ( cd %buildroot && fakeroot tar -xvpf - )

shellquote()
{
for arg; do
arg=${arg//\\/\\\\}
# arg=${arg//\$/\$} # already needs quoting ;(
# arg=${arg/\"/\\\"} # dito
# arg=${arg//\`/\`} # dito
arg=${arg//\\ |/\|}
arg=${arg//\\|/|}
echo "$arg"
done
}

echo "Creating baselibs_new.conf"
echo ""
rm -rRf /tmp/baselibs_new.conf || true
shellquote "arch i486 targets aarch64:inject" >> /tmp/baselibs_new.conf
shellquote "%{name}" >> /tmp/baselibs_new.conf
shellquote " targettype x86 block!" >> /tmp/baselibs_new.conf
shellquote " targettype 32bit block!" >> /tmp/baselibs_new.conf
shellquote " targettype inject autoreqprov off" >> /tmp/baselibs_new.conf
shellquote " targettype inject extension -inject" >> /tmp/baselibs_new.conf
shellquote " targettype inject +/" >> /tmp/baselibs_new.conf
shellquote " targettype inject -%{_mandir}" >> /tmp/baselibs_new.conf
shellquote " targettype inject -%{_docdir}" >> /tmp/baselibs_new.conf
shellquote " targettype inject config -/sb2-config$" >> /tmp/baselibs_new.conf

shellquote "arch i486 targets aarch64:inject" >> /tmp/baselibs_new.conf
shellquote "%{name}-dependency" >> /tmp/baselibs_new.conf
shellquote " targettype x86 block!" >> /tmp/baselibs_new.conf
shellquote " targettype 32bit block!" >> /tmp/baselibs_new.conf
shellquote " targettype inject autoreqprov off" >> /tmp/baselibs_new.conf
shellquote " targettype inject extension -inject" >> /tmp/baselibs_new.conf
shellquote " targettype inject +/" >> /tmp/baselibs_new.conf
shellquote " targettype inject -%{_mandir}" >> /tmp/baselibs_new.conf
shellquote " targettype inject -%{_docdir}" >> /tmp/baselibs_new.conf
shellquote " targettype inject config -/sb2-config$" >> /tmp/baselibs_new.conf

cat /tmp/baselibs_new.conf > %{_sourcedir}/baselibs.conf
mkdir -p %buildroot/etc
touch %buildroot/etc/sb2-tools-qt5-template

%clean
rm -rf $RPM_BUILD_ROOT

%files dependency
%defattr(-,root,root)
/etc/sb2-tools-qt5-template

%files -f filestoinclude2
%defattr(-,root,root)

0 comments on commit e4eab51

Please sign in to comment.