111 lines
3.9 KiB
RPMSpec
111 lines
3.9 KiB
RPMSpec
Name: android-tools
|
|
Version: 4.0.3_r1
|
|
Release: 3mamba
|
|
Summary: Android platform tools
|
|
Group: System/Tools
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://source.android.com
|
|
# git clone https://android.googlesource.com/platform/system/core
|
|
# cd core
|
|
# git archive --format=tar --prefix=android-tools-$(git tag -l | grep tools | sed "s,android-sdk-\([^-]*\)-tools\(.*\),\1\2,")/ \
|
|
# $(git tag -l | grep tools) \
|
|
# adb cpio fastboot include/cutils include/mincrypt include/private include/zipfile libcutils libmincrypt libzipfile mkbootimg | \
|
|
# xz > $(rpm --eval %_sourcedir)/android-tools-$(git tag -l | grep tools | sed "s,android-sdk-\([^-]*\)-tools\(.*\),\1\2,").tar.xz
|
|
Source: android-tools-%{version}.tar.xz
|
|
# Source created with (very big download):
|
|
# mkdir android-src-system; cd android-src-system
|
|
# repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1
|
|
# repo sync
|
|
# (only /system directory is archivced)
|
|
#Source: android-src-system-%{version}.tar.xz
|
|
Source1: 51-android.rules
|
|
Source2: core-Makefile
|
|
Source3: adb-Makefile
|
|
Source4: fastboot-Makefile
|
|
License: Apache License 2.0, BSD
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libz-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
Android platform tools ported to GNU/Linux for Android based devices management.
|
|
|
|
The Android Debug Bridge (ADB) is used to:
|
|
* keep track of all Android devices and emulators instances connected to or running on a given host developer machine
|
|
* implement various control commands (e.g. "adb shell", "adb pull", etc.) for the benefit of clients (command-line users, or helper programs like DDMS). These commands are what is called a 'service' in ADB.
|
|
|
|
Fastboot is used to manipulate the flash partitions of the Android phone.
|
|
It can also boot the phone using a kernel image or root filesystem image which reside on the host machine rather than in the phone flash.
|
|
In order to use it, it is important to understand the flash partition layout for the phone.
|
|
The fastboot program works in conjunction with firmware on the phone to read and write the flash partitions.
|
|
It needs the same USB device setup between the host and the target phone as adb.
|
|
|
|
%package -n mkbootimg
|
|
Summary: A tool for creating kernel bootable images for the Android boot loader
|
|
Group: System/Kernel and Hardware
|
|
|
|
%description -n mkbootimg
|
|
mkbootims is a command line tool useful for creating kernel bootable images for the Android boot loader.
|
|
This package also includes mkbootfs.
|
|
|
|
%prep
|
|
%setup -q
|
|
cp -p %{S:2} Makefile
|
|
cp -p %{S:3} adb/Makefile
|
|
cp -p %{S:4} fastboot/Makefile
|
|
|
|
%build
|
|
%make
|
|
|
|
(cd libmincrypt
|
|
%{_host}-gcc -c *.c -I../include
|
|
%{_host}-ar rcs libmincrypt.a *.o)
|
|
|
|
(cd mkbootimg
|
|
%{_host}-gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a)
|
|
|
|
(cd cpio
|
|
%{_host}-gcc mkbootfs.c -o mkbootfs -I../include)
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%makeinstall
|
|
|
|
install -D -m0644 %{S:1} \
|
|
%{buildroot}%{_sysconfdir}/udev/rules.d/51-android.rules
|
|
|
|
install -D -m0755 mkbootimg/mkbootimg \
|
|
%{buildroot}%{_bindir}/mkbootimg
|
|
install -D -m0755 cpio/mkbootfs \
|
|
%{buildroot}%{_bindir}/mkbootfs
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_bindir}/adb
|
|
%{_bindir}/fastboot
|
|
%{_sysconfdir}/udev/rules.d/51-android.rules
|
|
%doc adb/*.TXT adb/NOTICE adb/*.txt
|
|
|
|
%files -n mkbootimg
|
|
%defattr(-,root,root)
|
|
%{_bindir}/mkbootimg
|
|
%{_bindir}/mkbootfs
|
|
|
|
%changelog
|
|
* Fri Jun 01 2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.0.3_r1-3mamba
|
|
- fixed android udev rules
|
|
|
|
* Wed May 30 2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.0.3_r1-2mamba
|
|
- added main package
|
|
- fixed license
|
|
|
|
* Tue Feb 21 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.3_r1-1mamba
|
|
- package created by autospec
|