pa: Merge makefiles and rewrite dependency updater
There is no reason for the makefiles to be split up as they have been. They are not long enough to be hard to oversee in a single file and, arguably, are even easier to manage in a single file. Additionally, the dependency updater has been rewritten to be a bit more flexible with its inputs and outputs. The usage stays exactly the same. Conflicts: configs/pa_extras.mk configs/system.mk main.mk prebuilt/app/Android.mk Change-Id: Ie26c3b89721d03825fa3116ab5fe0cae76ec55ab
This commit is contained in:
parent
3e51f9ca93
commit
ad7d85cb00
10
build.sh
10
build.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# PA5 build helper script
|
||||
# PA build helper script
|
||||
|
||||
# red = errors, cyan = warnings, green = confirmations, blue = informational
|
||||
# plain for generic text, bold for titles, reset flag at each end of line
|
||||
|
@ -67,10 +67,10 @@ if [ "$(update-alternatives --list javac | wc -l)" -gt 1 ]; then
|
|||
fi
|
||||
|
||||
# Grab the build version
|
||||
VERSION_MAJOR=$(cat $DIR_ROOT/vendor/pa/vendor.mk | grep 'ROM_VERSION_MAJOR := *' | sed 's/ROM_VERSION_MAJOR := //g')
|
||||
VERSION_MINOR=$(cat $DIR_ROOT/vendor/pa/vendor.mk | grep 'ROM_VERSION_MINOR := *' | sed 's/ROM_VERSION_MINOR := //g')
|
||||
VERSION_MAINTENANCE=$(cat $DIR_ROOT/vendor/pa/vendor.mk | grep 'ROM_VERSION_MAINTENANCE := *' | sed 's/ROM_VERSION_MAINTENANCE := //g')
|
||||
VERSION_TAG=$(cat $DIR_ROOT/vendor/pa/vendor.mk | grep 'ROM_VERSION_TAG := *' | sed 's/ROM_VERSION_TAG := //g')
|
||||
VERSION_MAJOR=$(cat $DIR_ROOT/vendor/pa/main.mk | grep 'ROM_VERSION_MAJOR := *' | sed 's/ROM_VERSION_MAJOR := //g')
|
||||
VERSION_MINOR=$(cat $DIR_ROOT/vendor/pa/main.mk | grep 'ROM_VERSION_MINOR := *' | sed 's/ROM_VERSION_MINOR := //g')
|
||||
VERSION_MAINTENANCE=$(cat $DIR_ROOT/vendor/pa/main.mk | grep 'ROM_VERSION_MAINTENANCE := *' | sed 's/ROM_VERSION_MAINTENANCE := //g')
|
||||
VERSION_TAG=$(cat $DIR_ROOT/vendor/pa/main.mk | grep 'ROM_VERSION_TAG := *' | sed 's/ROM_VERSION_TAG := //g')
|
||||
|
||||
if [ -n "$TAG" ]; then
|
||||
VERSION=$VERSION_MAJOR.$VERSION_MINOR$VERSION_MAINTENANCE-$VERSION_TAG
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright (C) 2013 ParanoidAndroid Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Google property overides
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
keyguard.no_require_sim=true \
|
||||
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
|
||||
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
|
||||
ro.com.google.clientidbase=android-google \
|
||||
ro.com.android.wifi-watchlist=GoogleGuest \
|
||||
ro.setupwizard.enterprise_mode=1 \
|
||||
ro.com.android.dateformat=MM-dd-yyyy
|
||||
|
||||
# Override old AOSP defaults, we use (new) Google stock sounds
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.config.ringtone=Titania.ogg \
|
||||
ro.config.notification_sound=Tethys.ogg \
|
||||
ro.config.alarm_alert=Osmium.ogg
|
||||
|
||||
# Enable SIP+VoIP
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
|
||||
|
||||
# Proprietary latinime lib needed for Keyboard swyping
|
||||
#PRODUCT_COPY_FILES += \
|
||||
# vendor/pa/prebuilt/lib/libjni_latinime.so:system/lib/libjni_latinime.so
|
|
@ -1,32 +0,0 @@
|
|||
# Copyright (C) 2014 ParanoidAndroid Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Add PA bootanimation based on device resolution
|
||||
ifneq ($(filter pa_mako pa_grouper pa_tilapia,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/pa/prebuilt/bootanimation/1280x720.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
ifneq ($(filter pa_hammerhead pa_shamu,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/pa/prebuilt/bootanimation/1920x1080.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
# Hack: Use 1920x1080 of stock one till we get size for all of them.
|
||||
ifneq ($(filter pa_deb pa_flo pa_flounder,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/pa/prebuilt/bootanimation/1920x1080.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
ifneq ($(filter pa_manta,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/pa/prebuilt/bootanimation/1920x1080.zip:system/media/bootanimation.zip
|
||||
endif
|
|
@ -1,23 +0,0 @@
|
|||
# Copyright (C) 2014 ParanoidAndroid Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Chromium for Snapdragon
|
||||
PRODUCT_PACKAGES += \
|
||||
SWE_Browser
|
||||
|
||||
# Include ParanoidOTA
|
||||
ifneq ($(NO_OTA_BUILD),true)
|
||||
PRODUCT_PACKAGES += \
|
||||
ParanoidOTA
|
||||
endif
|
|
@ -1,45 +0,0 @@
|
|||
# Copyright (C) 2013 ParanoidAndroid Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Include overlays
|
||||
PRODUCT_PACKAGE_OVERLAYS += vendor/$(VENDOR)/overlay/common
|
||||
PRODUCT_PACKAGE_OVERLAYS += vendor/$(VENDOR)/overlay/$(TARGET_PRODUCT)
|
||||
|
||||
# init.d script support
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/$(VENDOR)/prebuilt/bin/sysinit:system/bin/sysinit
|
||||
|
||||
# userinit support
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/$(VENDOR)/prebuilt/etc/init.d/90userinit:system/etc/init.d/90userinit
|
||||
|
||||
# APN
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/$(VENDOR)/prebuilt/etc/apns-conf.xml:system/etc/apns-conf.xml
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
e2fsck \
|
||||
mke2fs \
|
||||
tune2fs \
|
||||
mount.exfat \
|
||||
fsck.exfat \
|
||||
mkfs.exfat \
|
||||
ntfsfix \
|
||||
ntfs-3g
|
||||
|
||||
# Gapps backup script
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/$(VENDOR)/prebuilt/bin/backuptool.sh:install/bin/backuptool.sh \
|
||||
vendor/$(VENDOR)/prebuilt/bin/backuptool.functions:install/bin/backuptool.functions \
|
||||
vendor/$(VENDOR)/prebuilt/addon.d/50-backuptool.sh:system/addon.d/50-backuptool.sh
|
|
@ -1,7 +0,0 @@
|
|||
VERSION := $(ROM_VERSION_MAJOR).$(ROM_VERSION_MINOR)$(ROM_VERSION_MAINTENANCE)
|
||||
|
||||
export ROM_VERSION := $(VERSION)-$(shell date -u +%Y%m%d)
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.modversion=$(ROM_VERSION) \
|
||||
ro.$(VENDOR).version=$(VERSION)
|
|
@ -1,9 +1,28 @@
|
|||
#!/bin/bash
|
||||
# Script to update all dependencies at once
|
||||
# PA dependency updater script
|
||||
set -e
|
||||
|
||||
# Grep and replace
|
||||
grep -rl $1 products/ | xargs sed -i "s/$1/$2/g"
|
||||
OLD_TAG=$1
|
||||
if [ -n "$OLD_TAG" ]; then OLD_TAG=$(basename $OLD_TAG); fi
|
||||
|
||||
# We're done
|
||||
echo -e "Replaced $1 with $2"
|
||||
NEW_TAG=$2
|
||||
if [ -n "$NEW_TAG" ]; then NEW_TAG=$(basename $NEW_TAG); fi
|
||||
|
||||
if [ -z "$OLD_TAG" ] || [ -z "$NEW_TAG" ]; then
|
||||
echo "usage: $0 <old-tag> <new-tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FOUND_TAG=0
|
||||
|
||||
echo "Replacing '$OLD_TAG' with '$NEW_TAG'.."
|
||||
|
||||
for FILE in $(grep -rl $OLD_TAG products/*/pa.dependencies); do
|
||||
if [ $FOUND_TAG -eq 0 ]; then FOUND_TAG=1; fi
|
||||
echo " in $FILE"
|
||||
sed -i "s/$OLD_TAG/$NEW_TAG/g" "$FILE"
|
||||
done
|
||||
|
||||
if [ $FOUND_TAG -eq 0 ]; then echo " found nothing to replace"; fi
|
||||
|
||||
echo "Done."
|
||||
|
|
95
main.mk
95
main.mk
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2013 ParanoidAndroid Project
|
||||
# Copyright (C) 2015 ParanoidAndroid Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -12,11 +12,92 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
include vendor/pa/vendor.mk
|
||||
include vendor/pa/configs/aosp_fixes.mk
|
||||
include vendor/pa/configs/system.mk
|
||||
include vendor/pa/configs/pa_extras.mk
|
||||
include vendor/pa/configs/bootanimation.mk
|
||||
include vendor/pa/configs/version.mk
|
||||
export VENDOR := pa
|
||||
ROM_VERSION_MAJOR := 6
|
||||
ROM_VERSION_MINOR := 0
|
||||
ROM_VERSION_MAINTENANCE :=
|
||||
ROM_VERSION_TAG :=
|
||||
|
||||
# Include versioning information
|
||||
VERSION := $(ROM_VERSION_MAJOR).$(ROM_VERSION_MINOR)$(ROM_VERSION_MAINTENANCE)
|
||||
export ROM_VERSION := $(VERSION)-$(shell date -u +%Y%m%d)
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.modversion=$(ROM_VERSION) \
|
||||
ro.pa.version=$(VERSION)
|
||||
|
||||
# Override undesired Google defaults
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
keyguard.no_require_sim=true \
|
||||
ro.com.android.dateformat=MM-dd-yyyy \
|
||||
ro.com.android.wifi-watchlist=GoogleGuest \
|
||||
ro.com.google.clientidbase=android-google \
|
||||
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
|
||||
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
|
||||
ro.setupwizard.enterprise_mode=1
|
||||
|
||||
# Override old AOSP default sounds with newer Google stock ones
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.config.alarm_alert=Osmium.ogg \
|
||||
ro.config.notification_sound=Tethys.ogg \
|
||||
ro.config.ringtone=Titania.ogg
|
||||
|
||||
# Enable SIP+VoIP
|
||||
PRODUCT_COPY_FILES += frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
|
||||
|
||||
# Include vendor overlays
|
||||
PRODUCT_PACKAGE_OVERLAYS += vendor/pa/overlay/common
|
||||
PRODUCT_PACKAGE_OVERLAYS += vendor/pa/overlay/$(TARGET_PRODUCT)
|
||||
|
||||
# Include support for init.d scripts
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bin/sysinit:system/bin/sysinit
|
||||
# Include support for userinit
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/etc/init.d/90userinit:system/etc/init.d/90userinit
|
||||
# Include APN information
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/etc/apns-conf.xml:system/etc/apns-conf.xml
|
||||
# Include support for additional filesystems
|
||||
PRODUCT_PACKAGES += \
|
||||
e2fsck \
|
||||
mke2fs \
|
||||
tune2fs \
|
||||
mount.exfat \
|
||||
fsck.exfat \
|
||||
mkfs.exfat \
|
||||
ntfsfix \
|
||||
ntfs-3g
|
||||
# Include support for GApps backup
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/pa/prebuilt/bin/backuptool.functions:install/bin/backuptool.functions \
|
||||
vendor/pa/prebuilt/bin/backuptool.sh:install/bin/backuptool.sh \
|
||||
vendor/pa/prebuilt/addon.d/50-backuptool.sh:system/addon.d/50-backuptool.sh
|
||||
|
||||
# Use pre-built Chromium
|
||||
ifeq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
|
||||
-include prebuilts/chromium/$(TARGET_DEVICE)/chromium_prebuilt.mk
|
||||
endif
|
||||
|
||||
# Build Chromium for Snapdragon
|
||||
PRODUCT_PACKAGES += SWE_Browser
|
||||
# Build ParanoidOTA
|
||||
ifneq ($(NO_OTA_BUILD),true)
|
||||
PRODUCT_PACKAGES += ParanoidOTA
|
||||
endif
|
||||
|
||||
# Include the custom PA bootanimation
|
||||
ifneq ($(filter pa_mako pa_grouper pa_tilapia,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/1280x720.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
ifneq ($(filter pa_hammerhead pa_shamu,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/1920x1080.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
# TODO Use proper sizes instead of defaulting to 1920x1080
|
||||
ifneq ($(filter pa_deb pa_flo pa_flounder,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/1920x1080.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
ifneq ($(filter pa_manta,$(TARGET_PRODUCT)),)
|
||||
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/1920x1080.zip:system/media/bootanimation.zip
|
||||
endif
|
||||
|
||||
include vendor/pa/configs/themes_common.mk
|
||||
|
||||
# Include vendor SEPolicy changes
|
||||
include vendor/pa/sepolicy/sepolicy.mk
|
||||
|
|
|
@ -1,7 +1,2 @@
|
|||
#
|
||||
# This policy configuration will be used by all products that
|
||||
# inherit from vendor
|
||||
#
|
||||
|
||||
BOARD_SEPOLICY_DIRS += \
|
||||
vendor/pa/sepolicy
|
||||
# This policy configuration will be used by all products that inherit from vendor
|
||||
BOARD_SEPOLICY_DIRS += vendor/pa/sepolicy
|
||||
|
|
Loading…
Reference in New Issue