diff options
author | wsnipex <wsnipex@a1.net> | 2023-03-16 13:25:24 +0100 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2023-03-18 17:30:48 +0100 |
commit | 9c6b2fab403804f2fec9cae4c3039043b1c30542 (patch) | |
tree | 0367f17cc90923d299f5d452df36d9f87ed71478 /tools | |
parent | 066070f1c94994d69ee8381d4e6e4b89b38bac40 (diff) |
webos: move packaging to cmake
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/Toolchain.cmake.in | 4 | ||||
-rw-r--r-- | tools/webOS/packaging/Makefile | 129 | ||||
-rw-r--r-- | tools/webOS/packaging/appinfo.json.in | 6 | ||||
-rwxr-xr-x | tools/webOS/packaging/kodi.sh.in | 16 |
4 files changed, 7 insertions, 148 deletions
diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in index 76f479cf39..8122832a3e 100644 --- a/tools/depends/target/Toolchain.cmake.in +++ b/tools/depends/target/Toolchain.cmake.in @@ -14,6 +14,10 @@ if(OS STREQUAL linux) set(CORE_SYSTEM_NAME linux) set(CORE_PLATFORM_NAME @target_platform@) set(APP_RENDER_SYSTEM @app_rendersystem@ CACHE STRING "Render system to use: \"gl\" or \"gles\"") + if(PLATFORM STREQUAL webos) + set(TOOLCHAIN @use_toolchain@) + set(HOST @use_host@) + endif() elseif(OS STREQUAL android) set(CMAKE_SYSTEM_NAME Android) set(CORE_SYSTEM_NAME android) diff --git a/tools/webOS/packaging/Makefile b/tools/webOS/packaging/Makefile deleted file mode 100644 index 5a0c39061d..0000000000 --- a/tools/webOS/packaging/Makefile +++ /dev/null @@ -1,129 +0,0 @@ -include ../../depends/Makefile.include - -APP_BUILD_DIR:=$(shell cd $(PREFIX)/../..; pwd) -APP_PACKAGE_DIR:=$(shell cd $(PREFIX)/../../..; pwd)/ipk-build -APP_PACKAGE_LIB_DIR:=$(APP_PACKAGE_DIR)/$(notdir $(abspath $(PREFIX)/..))/$(notdir $(abspath $(PREFIX)))/lib -APP_PACKAGE_LIBEXEC_DIR:=$(APP_PACKAGE_DIR)/$(notdir $(abspath $(PREFIX)/..))/$(notdir $(abspath $(PREFIX)))/libexec -APP_LIB_DIR:=$(shell cd $(PREFIX)/lib; pwd)/ -APP_LIBEXEC_DIR:=$(shell cd $(PREFIX)/libexec; pwd)/ -APP_IPK_DIR:=$(shell cd $(PREFIX)/../../..; pwd) -APP_PACKAGE:=$(shell awk '/APP_PACKAGE/ {print tolower($$2)}' $(VERSION.TXT)) -VERSION_CODE:=$(shell awk '/VERSION_CODE/ {print tolower($$2)}' $(VERSION.TXT)) -COMPANY_NAME:=$(shell awk '/COMPANY_NAME/ {print tolower($$2)}' $(VERSION.TXT)) -IPK:=$(APP_PACKAGE)_$(VERSION_CODE)_all.ipk -ICON80:=icon.png -ICON130:=largeIcon.png -KEYBOARD:=keyboard.xml -MAIN_APP:=kodi-$(TARGET_PLATFORM) - -COMPACT_IPK=compact-$(IPK) -COMPACT_PACKAGE_DIR=$(shell cd $(PREFIX)/../../..; pwd)/compact-build - -ifneq ($(SDK_PATH),) - LIBSTDC_DIR:=$(shell cd $(SDK_PATH)/../; pwd)/target/usr/lib - LIBCRYPT_DIR:=$(shell cd $(SDK_PATH)/../; pwd)/target/lib -endif - -.PHONY: all -all: clean libs $(IPK) - -ipk: clean libs $(IPK) -compact-ipk: clean compact-clean $(COMPACT_IPK) - -$(APP_PACKAGE_DIR): - mkdir -p $(APP_PACKAGE_DIR) - -$(APP_PACKAGE_DIR)/appinfo.json: appinfo.json.in Makefile | $(APP_PACKAGE_DIR) - sed -e 's|@APP_PACKAGE@|$(APP_PACKAGE)|g' \ - -e 's|@VERSION_CODE@|$(VERSION_CODE)|g' \ - -e 's|@COMPANY_NAME@|$(COMPANY_NAME)|g' \ - -e 's|@APP_NAME@|$(APP_NAME)|g' < '$<' > '$@' - -$(APP_PACKAGE_DIR)/kodi.sh: kodi.sh.in Makefile | $(APP_DIR) - sed -e 's|@PREFIX@|$(PREFIX)|g' \ - -e 's|@MAIN_APP@|$(MAIN_APP)|g' < '$<' > '$@' - chmod +x $(APP_PACKAGE_DIR)/kodi.sh - -$(APP_PACKAGE_DIR)/$(ICON80): $(ICON80) | $(APP_PACKAGE_DIR) - cp -t '$(APP_PACKAGE_DIR)' -- '$<' - -$(APP_PACKAGE_DIR)/$(ICON130): $(ICON130) | $(APP_PACKAGE_DIR) - cp -t '$(APP_PACKAGE_DIR)' -- '$<' - -$(APP_PACKAGE_DIR)/.kodi/userdata/keymaps/$(KEYBOARD): $(KEYBOARD) | $(APP_PACKAGE_DIR) - mkdir -p $(APP_PACKAGE_DIR)/.kodi/userdata/keymaps - cp -t '$(APP_PACKAGE_DIR)/.kodi/userdata/keymaps' -- '$<' - -$(IPK): $(APP_PACKAGE_DIR)/.kodi/userdata/keymaps/$(KEYBOARD) \ - $(APP_PACKAGE_DIR)/appinfo.json $(APP_PACKAGE_DIR)/kodi.sh \ - $(APP_PACKAGE_DIR)/$(ICON80) $(APP_PACKAGE_DIR)/$(ICON130) | $(APP_PACKAGE_DIR) - cp $(APP_BUILD_DIR)/$(MAIN_APP) $(APP_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/addons $(APP_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/media $(APP_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/system $(APP_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/userdata $(APP_PACKAGE_DIR) - ares-package \ - -o '$(APP_IPK_DIR)' \ - '$(APP_PACKAGE_DIR)' - -$(COMPACT_IPK): $(APP_PACKAGE_DIR)/.kodi/userdata/keymaps/$(KEYBOARD) \ - $(APP_PACKAGE_DIR)/appinfo.json $(APP_PACKAGE_DIR)/kodi.sh \ - $(APP_PACKAGE_DIR)/$(ICON80) $(APP_PACKAGE_DIR)/$(ICON130) | $(APP_PACKAGE_DIR) - mkdir -p $(COMPACT_PACKAGE_DIR) - mkdir -p $(COMPACT_PACKAGE_DIR)/.kodi/userdata/keymaps - cp $(APP_PACKAGE_DIR)/.kodi/userdata/keymaps/$(KEYBOARD) $(COMPACT_PACKAGE_DIR)/.kodi/userdata/keymaps/$(KEYBOARD) - cp $(APP_PACKAGE_DIR)/appinfo.json $(COMPACT_PACKAGE_DIR)/appinfo.json - cp $(APP_PACKAGE_DIR)/kodi.sh $(COMPACT_PACKAGE_DIR)/kodi.sh - cp $(APP_PACKAGE_DIR)/$(ICON80) $(COMPACT_PACKAGE_DIR)/$(ICON80) - cp $(APP_PACKAGE_DIR)/$(ICON130) $(COMPACT_PACKAGE_DIR)/$(ICON130) - cp -R $(APP_BUILD_DIR)/addons $(COMPACT_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/media $(COMPACT_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/system $(COMPACT_PACKAGE_DIR) - cp -R $(APP_BUILD_DIR)/userdata $(COMPACT_PACKAGE_DIR) - cp $(APP_BUILD_DIR)/$(MAIN_APP) $(COMPACT_PACKAGE_DIR) - ares-package \ - -o '$(APP_IPK_DIR)' \ - '$(COMPACT_PACKAGE_DIR)' - -.PHONY: libs -libs: - mkdir -p $(APP_PACKAGE_LIB_DIR) - cp -R $(APP_LIB_DIR)* $(APP_PACKAGE_LIB_DIR) - mkdir -p $(APP_PACKAGE_LIBEXEC_DIR) - cp -R $(APP_LIBEXEC_DIR)* $(APP_PACKAGE_LIBEXEC_DIR) -ifneq ($(LIBSTDC_DIR),) - cp -P $(LIBSTDC_DIR)/libstdc++.so* $(APP_PACKAGE_LIB_DIR) - rm $(APP_PACKAGE_LIB_DIR)/libstdc++.so.6.0.30-gdb.py -endif -ifneq ($(LIBCRYPT_DIR),) - cp -P $(LIBCRYPT_DIR)/libcrypt* $(APP_PACKAGE_LIB_DIR) -endif - rm -f $(APP_PACKAGE_LIB_DIR)/*.a - rm -f $(APP_PACKAGE_LIB_DIR)/*.la - rm -f $(APP_PACKAGE_LIB_DIR)/libEGL.so* - rm -f $(APP_PACKAGE_LIB_DIR)/libGLESv2.so* - rm -f $(APP_PACKAGE_LIB_DIR)/libasound.* - rm -f $(APP_PACKAGE_LIB_DIR)/libwayland-client.so* - rm -f $(APP_PACKAGE_LIB_DIR)/libwayland-server.so* - rm -f $(APP_PACKAGE_LIB_DIR)/libwayland-egl.so* - -.PHONY: install -install: - ares-install '$(APP_IPK_DIR)/$(IPK)' - -.PHONY: launch -launch: - ares-launch '$(APP_PACKAGE)' - -.PHONY: uninstall -uninstall: - ares-install --remove '$(APP_PACKAGE)' - -.PHONY: clean -clean: - rm -f -- '$(IPK)' - rm -rf -- '$(APP_PACKAGE_DIR)' - -.PHONY: compact-clean -compact-clean: - rm -rf -- '$(COMPACT_PACKAGE_DIR)' diff --git a/tools/webOS/packaging/appinfo.json.in b/tools/webOS/packaging/appinfo.json.in index 8a66b536cb..a1673d59b4 100644 --- a/tools/webOS/packaging/appinfo.json.in +++ b/tools/webOS/packaging/appinfo.json.in @@ -1,12 +1,12 @@ { "id": "@APP_PACKAGE@", - "version": "@VERSION_CODE@", + "version": "@APP_VERSION_CODE@", "vendor": "@COMPANY_NAME@", "type": "native", - "main": "kodi.sh", + "main": "@APP_BINARY@", "title": "@APP_NAME@", "icon": "icon.png", "largeIcon": "largeIcon.png", - "noSplashOnLaunch": true, + "splashBackground": "media/splash.jpg", "spinnerOnLaunch": false } diff --git a/tools/webOS/packaging/kodi.sh.in b/tools/webOS/packaging/kodi.sh.in deleted file mode 100755 index 695b2e1064..0000000000 --- a/tools/webOS/packaging/kodi.sh.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@PREFIX@/lib -export WAYLAND_DISPLAY=wayland-0 -if [[ -z "${GST_PLUGIN_SCANNER_1_0}" ]]; then - export GST_PLUGIN_SCANNER_1_0='@PREFIX@/libexec/gstreamer-1.0/gst-plugin-scanner' -else - if [ ! -d "${GST_PLUGIN_SCANNER_1_0}" ]; then - export GST_PLUGIN_SCANNER_1_0='@PREFIX@/libexec/gstreamer-1.0/gst-plugin-scanner' - fi -fi -if [ ! -d @PREFIX@/share/X11 ]; then - mkdir -p @PREFIX@/share/X11; - ln -s /usr/share/X11/xkb @PREFIX@/share/X11 -fi -./@MAIN_APP@ |