diff options
author | Sergey Sizonov <s.sizonov@samsung.com> | 2016-12-08 08:56:59 +0300 |
---|---|---|
committer | Sergey Sizonov <s.sizonov@samsung.com> | 2016-12-08 13:57:20 +0300 |
commit | ff052995d889467e2973c1244ad65759bc308e15 (patch) | |
tree | f0fe6f6bfa59aff108c81eb370e9a13aae729af7 | |
parent | 1e3ede9f8af4931dc5ca29e8194ed6e7345657c1 (diff) | |
download | libtbm-sandbox/srk/android.tar.gz libtbm-sandbox/srk/android.tar.bz2 libtbm-sandbox/srk/android.zip |
[toa] gbs build for Androidsandbox/srk/android
Now we able to build this package by gbs and use it on Android platform.
Change-Id: Ie7d1300b085152423adc75b92d89a8955f94f887
Signed-off-by: Sergey Sizonov <s.sizonov@samsung.com>
-rwxr-xr-x | android/how_to_deploy.txt | 58 | ||||
-rw-r--r-- | android/libtbm-2.0.0.spec | 40 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | packaging/libtbm.spec | 13 |
4 files changed, 7 insertions, 108 deletions
diff --git a/android/how_to_deploy.txt b/android/how_to_deploy.txt deleted file mode 100755 index 8d06675..0000000 --- a/android/how_to_deploy.txt +++ /dev/null @@ -1,58 +0,0 @@ -This guide for the development under the Android. - -> - host promt -@ - chroot system promt -$ - target promt - -- All commans are executed on the host unless otherwise specified. -- Some files you may find on ownCloud -- Public/ToA . - -1. Create bootstrap: https://debian.pro/440 (Russian) - > cd <directory you wanna use as your new system root directory.> - > sudo debootstrap trusty . http://mirror.yandex.ru/ubuntu - -2. Make some preparations to your new system: - - mount host's proc fs to your new system /proc - (you may make this mount permanently by adding an entry to /etc/fstab on the host) - -3. Login in created system: - > sudo chroot <directory you've placed bootstrap in> - - http://la2ha.ru/dev-seo-diy/unix/setting_locale_failed (Russian) - -4. Create an user you will use under the devopment (on your new system). -5. Fix the problem with sudoers file (on your new system) -- http://unixforum.org/index.php?showtopic=135020 . (Russian) -6. Install make, autoconf, libtool, texinfo and pkg-config packages (on your new system). -7. Install android-tools-adb packages(amd64) (on your new system) -- http://packages.ubuntu.com/ru/trusty/devel/android-tools-adb . -8. Download Android ndk -- https://developer.android.com/ndk/downloads/index.html . - -9. Extract a standalone android toolchain: -- https://developer.android.com/ndk/guides/standalone_toolchain.html - > cd <directory you've unpacked Android ndk into> - > build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.9 --platform=android-22 --install-dir=<directory on your chroot system, this how_to considers you've chosen ~/bin/android_toolchain> - -10. Add a path to the android toolchain to your system PATH env variable (on your new system): - @ echo "PATH=${HOME}/bin/android_toolchain/bin:${PATH}" >> ~/.bashrc - -11. Add a path to the ~/bin to your system PATH env variable (on your new system): - @ echo "PATH=${HOME}/bin/:${PATH}" >> ~/.bashrc - -12. Prepare rpm (on your new system): - @ sudo apt-get install rpm - @ mkdir -p ~/redhat/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} - @ echo "%_topdir /home/$USER/redhat" >> ~/.rpmmacros - -Now you have the prepared environment to build for the Android. - -What to do next is your choise... - -Suggested steps are: - - download a sources for a project you want to build for the Android. - - create .spec file: - - set a prefix variable to /usr/local, if your project use an autotools, - to avoid a cluttering your chroot's root [by default prefix is /usr/local]. - - run rpmbuild --target armv7l -bb <.spec file> . - - if you want to install the build results to a target add an option '--noclean' (you will be able - to copy the results to a target easy). - - install rpm packages to your chroot system: sudo rpm -ivh --nodeps --ignorearch <.rpm to install> . - - a next build will be able to use a resulst of the current build. - - copy the build results to a target: adb push ~/redhat/BUILDROOT/<name of project.arm> <wherever you want> . - - do not forget to remove an unnecessary files: *.la, *.h, *.pc and so on.
\ No newline at end of file diff --git a/android/libtbm-2.0.0.spec b/android/libtbm-2.0.0.spec deleted file mode 100644 index 4df2317..0000000 --- a/android/libtbm-2.0.0.spec +++ /dev/null @@ -1,40 +0,0 @@ -Name: libtbm -Version: 2.0.0 -Release: 1 -License: MIT -Summary: The library for Tizen Buffer Manager -Group: System/Libraries -Source0: %{name}-%{version}.tar.gz - -%description -Description: %{summary} - -%prep -# our %{name}-%{version}.tar.gz archive hasn't top-level directory, -# so we create it -%setup -q -c %{name}-%{version} - -%build -BUFMGR_MODULE_DIR=/usr/local/lib/bufmgr - -PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \ -./autogen.sh --build=x86_64-unknown-linux-gnu \ - --host=arm-linux-androideabi \ - --enable-android-support \ - --with-bufmgr-module-path=${BUFMGR_MODULE_DIR} \ - CFLAGS="${CFLAGS} -Wall -Werror" \ - LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" - -make %{?_smp_mflags} - -%install -rm -rf %{buildroot} - -%make_install - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root,-) -/usr/local/* diff --git a/configure.ac b/configure.ac index 0558f88..4d9fc07 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,10 @@ AC_ARG_ENABLE([android-support], AS_HELP_STRING([--enable-android-support], [to AM_CONDITIONAL([ANDROID_SUPPORT], [test "x$enable_android_support" != "xno"]) +if test "x$enable_android_support" != "xno"; then + AC_MSG_WARN("Library is being built to be deployed on Android platform.") +fi + # set the dir for the tbm module DEFAULT_BUFMGR_MODULE_PATH="${libdir}/bufmgr" AC_ARG_WITH(bufmgr-module-path, AS_HELP_STRING([--with-bufmgr-module-path=PATH], [tbm bufmgr module dir]), diff --git a/packaging/libtbm.spec b/packaging/libtbm.spec index c971fc3..b6dad9f 100644 --- a/packaging/libtbm.spec +++ b/packaging/libtbm.spec @@ -1,6 +1,3 @@ -%bcond_with x -%bcond_with wayland - Name: libtbm Version: 2.0.0 Release: 1 @@ -39,13 +36,9 @@ cp %{SOURCE1001} . %build -%if %{with wayland} -%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND \ - CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" -%else -%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11 \ - CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" -%endif +%reconfigure --prefix=%{_prefix} \ + --enable-android-support \ + CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" make %{?_smp_mflags} |