Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android-tools-hadk] Remove components provided by android-tools #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion core
Submodule core deleted from 2b5b91
1 change: 0 additions & 1 deletion extras
Submodule extras deleted from 8e9fa7
13 changes: 11 additions & 2 deletions mer-android-chroot
Expand Up @@ -216,8 +216,8 @@ prepare_mountpoints() {
mount --rbind / ${uburoot}/parentroot/
fi

mkdir -p ${uburoot}/lib/modules/`uname -r`
mount_bind /lib/modules/`uname -r`
mkdir -p ${uburoot}/lib/modules/$(uname -r)
mount_bind /lib/modules/$(uname -r)

}
umount_spare() {
Expand All @@ -226,6 +226,15 @@ umount_spare() {
umount ${uburoot}/dev/pts || :
umount ${uburoot}/dev/shm ${uburoot}/run/shm || :
umount ${uburoot}/var/run/dbus || :
umount ${uburoot}/sys || :
umount ${uburoot}/dev || :
umount ${uburoot}/proc || :

if [[ $bind_mount_home == yes ]] ; then
if mountpoint -q ${uburoot}/$HOMEDIR ; then
umount ${uburoot}/$HOMEDIR
fi
fi
}

prepare_user() {
Expand Down
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.

46 changes: 3 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,21 @@ 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
install -dm755 %{buildroot}%{_bindir}
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