Dan Pasanen | 91f7620 | 2017-07-06 08:21:30 -0500 | [diff] [blame] | 1 | ADDONSU_PREBUILTS_PATH := vendor/lineage/addonsu/ |
Gabriele M | 5b33c6c | 2017-01-22 22:50:02 +0100 | [diff] [blame] | 2 | |
| 3 | ADDONSU_INSTALL_OUT := $(PRODUCT_OUT)/addonsu-install/ |
Michael Bestas | d67ef78 | 2017-04-28 23:55:07 +0300 | [diff] [blame] | 4 | ADDONSU_INSTALL_TARGET := $(PRODUCT_OUT)/addonsu-$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_ARCH).zip |
Gabriele M | 5b33c6c | 2017-01-22 22:50:02 +0100 | [diff] [blame] | 5 | |
| 6 | $(ADDONSU_INSTALL_TARGET): $(ALL_MODULES.updater.BUILT) \ |
| 7 | $(ALL_MODULES.su.BUILT) $(ALL_MODULES.su.PATH)/superuser.rc |
| 8 | $(hide) rm -rf $@ $(ADDONSU_INSTALL_OUT) |
| 9 | $(hide) mkdir -p $(ADDONSU_INSTALL_OUT)/META-INF/com/google/android/ |
| 10 | $(hide) mkdir -p $(ADDONSU_INSTALL_OUT)/system/xbin |
| 11 | $(hide) mkdir -p $(ADDONSU_INSTALL_OUT)/system/addon.d |
| 12 | $(hide) mkdir -p $(ADDONSU_INSTALL_OUT)/system/etc/init |
| 13 | $(hide) cp $(ALL_MODULES.su.BUILT) $(ADDONSU_INSTALL_OUT)/system/xbin/ |
| 14 | $(hide) cp $(ALL_MODULES.su.PATH)/superuser.rc $(ADDONSU_INSTALL_OUT)/system/etc/init/ |
| 15 | $(hide) cp $(ALL_MODULES.updater.BUILT) $(ADDONSU_INSTALL_OUT)/META-INF/com/google/android/update-binary |
| 16 | $(hide) cp $(ADDONSU_PREBUILTS_PATH)/51-addonsu.sh $(ADDONSU_INSTALL_OUT)/system/addon.d/ |
| 17 | $(hide) cp $(ADDONSU_PREBUILTS_PATH)/mount-system.sh $(ADDONSU_INSTALL_OUT)/ |
| 18 | $(hide) cp $(ADDONSU_PREBUILTS_PATH)/updater-script-install $(ADDONSU_INSTALL_OUT)/META-INF/com/google/android/updater-script |
| 19 | $(hide) (cd $(ADDONSU_INSTALL_OUT) && zip -qr $@ *) |
| 20 | |
| 21 | .PHONY: addonsu |
| 22 | addonsu: $(ADDONSU_INSTALL_TARGET) |
| 23 | @echo "Done: $(ADDONSU_INSTALL_TARGET)" |
| 24 | |
| 25 | |
| 26 | ADDONSU_REMOVE_OUT := $(PRODUCT_OUT)/addonsu-remove/ |
Michael Bestas | d67ef78 | 2017-04-28 23:55:07 +0300 | [diff] [blame] | 27 | ADDONSU_REMOVE_TARGET := $(PRODUCT_OUT)/addonsu-remove-$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_ARCH).zip |
Gabriele M | 5b33c6c | 2017-01-22 22:50:02 +0100 | [diff] [blame] | 28 | |
| 29 | $(ADDONSU_REMOVE_TARGET): $(ALL_MODULES.updater.BUILT) |
| 30 | $(hide) rm -rf $@ $(ADDONSU_REMOVE_OUT) |
| 31 | $(hide) mkdir -p $(ADDONSU_REMOVE_OUT)/META-INF/com/google/android/ |
| 32 | $(hide) cp $(ALL_MODULES.updater.BUILT) $(ADDONSU_REMOVE_OUT)/META-INF/com/google/android/update-binary |
| 33 | $(hide) cp $(ADDONSU_PREBUILTS_PATH)/mount-system.sh $(ADDONSU_REMOVE_OUT)/ |
| 34 | $(hide) cp $(ADDONSU_PREBUILTS_PATH)/updater-script-remove $(ADDONSU_REMOVE_OUT)/META-INF/com/google/android/updater-script |
| 35 | $(hide) (cd $(ADDONSU_REMOVE_OUT) && zip -qr $@ *) |
| 36 | |
| 37 | .PHONY: addonsu-remove |
| 38 | addonsu-remove: $(ADDONSU_REMOVE_TARGET) |
| 39 | @echo "Done: $(ADDONSU_REMOVE_TARGET)" |