Steve Kondik | d91ddb5 | 2015-11-14 23:56:10 +0100 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | # a wrapper for curl which provides wget syntax, for compatibility |
| 4 | include $(CLEAR_VARS) |
| 5 | LOCAL_MODULE := wget |
| 6 | LOCAL_SRC_FILES := bin/wget |
| 7 | LOCAL_MODULE_TAGS := optional |
| 8 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 9 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
| 10 | include $(BUILD_PREBUILT) |
Rashed Abdel-Tawab | 0d2fa55 | 2018-09-06 08:48:26 -0700 | [diff] [blame] | 11 | |
| 12 | ################################ |
Bruno Martins | da2c750 | 2019-09-13 16:11:04 +0100 | [diff] [blame] | 13 | # Copies the APN list file into $(TARGET_COPY_OUT_PRODUCT)/etc for the product as apns-conf.xml. |
Rashed Abdel-Tawab | 0d2fa55 | 2018-09-06 08:48:26 -0700 | [diff] [blame] | 14 | # In the case where $(CUSTOM_APNS_FILE) is defined, the content of $(CUSTOM_APNS_FILE) |
| 15 | # is added or replaced to the $(DEFAULT_APNS_FILE). |
| 16 | include $(CLEAR_VARS) |
| 17 | |
| 18 | LOCAL_MODULE := apns-conf.xml |
| 19 | LOCAL_MODULE_CLASS := ETC |
| 20 | |
| 21 | DEFAULT_APNS_FILE := vendor/lineage/prebuilt/common/etc/apns-conf.xml |
| 22 | |
| 23 | ifdef CUSTOM_APNS_FILE |
| 24 | CUSTOM_APNS_SCRIPT := vendor/lineage/tools/custom_apns.py |
| 25 | FINAL_APNS_FILE := $(local-generated-sources-dir)/apns-conf.xml |
| 26 | |
| 27 | $(FINAL_APNS_FILE): PRIVATE_SCRIPT := $(CUSTOM_APNS_SCRIPT) |
| 28 | $(FINAL_APNS_FILE): PRIVATE_CUSTOM_APNS_FILE := $(CUSTOM_APNS_FILE) |
| 29 | $(FINAL_APNS_FILE): $(CUSTOM_APNS_SCRIPT) $(DEFAULT_APNS_FILE) |
| 30 | rm -f $@ |
| 31 | python $(PRIVATE_SCRIPT) $@ $(PRIVATE_CUSTOM_APNS_FILE) |
| 32 | else |
| 33 | FINAL_APNS_FILE := $(DEFAULT_APNS_FILE) |
| 34 | endif |
| 35 | |
| 36 | LOCAL_PREBUILT_MODULE_FILE := $(FINAL_APNS_FILE) |
| 37 | |
Bruno Martins | da2c750 | 2019-09-13 16:11:04 +0100 | [diff] [blame] | 38 | LOCAL_PRODUCT_MODULE := true |
| 39 | |
Rashed Abdel-Tawab | 0d2fa55 | 2018-09-06 08:48:26 -0700 | [diff] [blame] | 40 | include $(BUILD_PREBUILT) |