summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2011-06-09 15:44:26 -0700
committerJean-Baptiste Queru <jbq@google.com>2011-06-09 15:45:14 -0700
commitc6df0e525fd39bb5dc82330c5ed04d0d1c2c20b6 (patch)
tree89cac769db9fd2642f0ae5990bda82ab851db46f
parent4ef116726feff12ee0a9852ffc08aeaff37fae10 (diff)
downloaddevice_common-c6df0e525fd39bb5dc82330c5ed04d0d1c2c20b6.zip
device_common-c6df0e525fd39bb5dc82330c5ed04d0d1c2c20b6.tar.gz
device_common-c6df0e525fd39bb5dc82330c5ed04d0d1c2c20b6.tar.bz2
Add handling of apks
Change-Id: Ic39fc8e2e2fe0b5d5f769866966d5dbb9b78d5c7
-rwxr-xr-xgenerate-blob-scripts.sh84
1 files changed, 84 insertions, 0 deletions
diff --git a/generate-blob-scripts.sh b/generate-blob-scripts.sh
index e469612..027c821 100755
--- a/generate-blob-scripts.sh
+++ b/generate-blob-scripts.sh
@@ -186,6 +186,90 @@ do
echo -n \ \ \ \ vendor/__MANUFACTURER__/__DEVICE__/proprietary/$(basename $FULLPATH):$(echo $FULLPATH | cut -b 2-)
done
echo
+
+ FOUND=false
+ diff $ARCHIVEDIR/$DEVICENAME-without.txt $ARCHIVEDIR/$DEVICENAME-with.txt |
+ grep '\.apk$' |
+ grep '>' |
+ cut -b 3- |
+ while read FULLPATH
+ do
+ if test $FOUND = false
+ then
+ echo
+ echo -n '# All the apks necessary for '
+ echo $DEVICENAME
+ echo 'PRODUCT_PACKAGES += \\'
+ else
+ echo \ \\\\
+ fi
+ FOUND=true
+ echo -n \ \ \ \
+ echo -n $(basename $FULLPATH) | sed 's/\.apk//g'
+ done
+ echo
+
+ echo 'EOF'
+
+ echo -n '(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/'
+ echo 'proprietary/Android.mk'
+
+ echo '# Copyright (C) 2011 The Android Open Source Project'
+ echo '#'
+ echo '# Licensed under the Apache License, Version 2.0 (the "License");'
+ echo '# you may not use this file except in compliance with the License.'
+ echo '# You may obtain a copy of the License at'
+ echo '#'
+ echo '# http://www.apache.org/licenses/LICENSE-2.0'
+ echo '#'
+ echo '# Unless required by applicable law or agreed to in writing, software'
+ echo '# distributed under the License is distributed on an "AS IS" BASIS,'
+ echo '# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.'
+ echo '# See the License for the specific language governing permissions and'
+ echo '# limitations under the License.'
+ echo
+ echo -n '# This file is generated by device/__MANUFACTURER__/__DEVICE__/'
+ echo -n $FILESTYLE
+ echo '-files.sh - DO NOT EDIT'
+
+ FOUND=false
+ diff $ARCHIVEDIR/$DEVICENAME-without.txt $ARCHIVEDIR/$DEVICENAME-with.txt |
+ grep '\.apk$' |
+ grep '>' |
+ cut -b 3- |
+ while read FULLPATH
+ do
+ if test $FOUND = false
+ then
+ echo
+ echo ifeq \(\$\(TARGET_DEVICE\),$DEVICENAME\)
+ echo LOCAL_PATH:=\$\(call my-dir\)
+ echo
+ echo -n '# Makefile rules for apks on '
+ echo $DEVICENAME
+ fi
+ FOUND=true
+ echo
+ echo -n '# '
+ echo $(basename $FULLPATH) | sed 's/\.apk//g'
+ echo
+ echo include \$\(CLEAR_VARS\)
+ echo
+ echo LOCAL_MODULE := $(basename $FULLPATH) | sed 's/\.apk//g'
+ echo LOCAL_SRC_FILES := \$\(LOCAL_MODULE\).apk
+ echo LOCAL_MODULE_CLASS := APPS
+ echo LOCAL_MODULE_TAGS := optional
+ echo LOCAL_CERTIFICATE := PRESIGNED
+ echo LOCAL_MODULE_SUFFIX := \$\(COMMON_ANDROID_PACKAGE_SUFFIX\)
+ echo include \$\(BUILD_PREBUILT\)
+ done
+ if test $FOUND = true
+ then
+ echo
+ echo endif
+ fi
+ echo
+
echo 'EOF'
echo
echo './setup-makefiles.sh'