Skip to content

Commit

Permalink
[android-tools-hadk] Remove components provided by android-tools. JB#…
Browse files Browse the repository at this point in the history
…55609

Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
  • Loading branch information
Thaodan committed Mar 22, 2024
1 parent 0d36bba commit be39cbf
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 666 deletions.
1 change: 0 additions & 1 deletion core
Submodule core deleted from 2b5b91
1 change: 0 additions & 1 deletion extras
Submodule extras deleted from 8e9fa7
49 changes: 0 additions & 49 deletions rpm/0001-Add-vendors.patch

This file was deleted.

55 changes: 0 additions & 55 deletions rpm/0001-Ignore-selinux.patch

This file was deleted.

25 changes: 0 additions & 25 deletions rpm/0001-Include-sys-sysmacros.h.patch

This file was deleted.

41 changes: 0 additions & 41 deletions rpm/0001-Use-mmap-for-fastboot-data.patch

This file was deleted.

116 changes: 0 additions & 116 deletions rpm/0001-mkbootimg-add-dt-parameter.patch

This file was deleted.

45 changes: 2 additions & 43 deletions rpm/android-tools-hadk.spec
Expand Up @@ -5,32 +5,11 @@ Version: 5.1.1_r38
Release: 1
License: Apache 2.0
Source0: android-tools-hadk-%{version}.tar.gz
Source2: fastboot.mk
Source3: mkbootimg.mk
Patch0: 0001-Ignore-selinux.patch
Patch1: 0001-Add-vendors.patch
Patch2: 0001-Use-mmap-for-fastboot-data.patch
Patch3: 0001-mkbootimg-add-dt-parameter.patch
Patch4: 0001-Include-sys-sysmacros.h.patch

BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
Recommends: android-tools-mkbootimg

%description
android-tools for HADK

The upstream tarball is based of these upstream Android git repos:
git clone https://android.googlesource.com/platform/system/core
git clone https://android.googlesource.com/platform/system/extras

with unneeded files removed.

%package bootimg
Summary: Tools for bootimg

%description bootimg
Tools for bootimg.

%package -n sudo-for-abuild
Summary: Install this to allow OBS abuild user to use sudo in build
Requires: %{name} = %{version}-%{release}
Expand All @@ -40,40 +19,20 @@ Requires: sudo
Allow abuild user to execute sudo in an OBS build root.

%prep
%setup -q
%patch0 -p1 -d extras
%patch1 -p1 -d core
%patch2 -p1 -d core
%patch3 -p1 -d core
%patch4 -p1 -d core
%autosetup

%build
make -f %{SOURCE2} -C core/fastboot
make -f %{SOURCE3} -C core/mkbootimg

%install
rm -rf %{buildroot}
install -D -m 755 core/fastboot/fastboot %{buildroot}%{_bindir}/fastboot
sed -e 's/@VERSION@/%{version}/' mer-android-chroot > %{buildroot}%{_bindir}/ubu-chroot
chmod 755 %{buildroot}%{_bindir}/ubu-chroot
install -D -m 755 mer-ubusdk-bash-setup %{buildroot}%{_datadir}/ubu-chroot/mer-ubusdk-bash-setup
# For android-tools-hadk-bootimg
install -D -m 755 core/mkbootimg/mkbootimg %{buildroot}%{_bindir}/mkbootimg
install -D -m 755 split_bootimg.pl %{buildroot}%{_bindir}/split_bootimg
# For sudo-for-abuild
install -D -m 755 sudoers.abuild %{buildroot}%{_sysconfdir}/sudoers.d/abuild

%files
%defattr(-,root,root,-)
%{_bindir}/fastboot
%{_bindir}/ubu-chroot
%{_datadir}/ubu-chroot/*

%files bootimg
%defattr(-,root,root,-)
%{_bindir}/split_bootimg
%{_bindir}/mkbootimg

%files -n sudo-for-abuild
%defattr(-,root,root,-)
%{_sysconfdir}/sudoers.d/abuild

0 comments on commit be39cbf

Please sign in to comment.