From 7cfd09252fd0a921e39f7ae43409f262db19b07c Mon Sep 17 00:00:00 2001
From: j1nx
Date: Wed, 1 Sep 2021 19:44:10 +0200
Subject: [PATCH] Add mycroft-skill-osm
---
buildroot-external/Config.in | 1 +
.../configs/rpi4_64-gui_defconfig | 1 +
.../package/mycroft-skill-osm/Config.in | 6 ++++++
.../mycroft-skill-osm/mycroft-skill-osm.mk | 20 +++++++++++++++++++
4 files changed, 28 insertions(+)
create mode 100644 buildroot-external/package/mycroft-skill-osm/Config.in
create mode 100644 buildroot-external/package/mycroft-skill-osm/mycroft-skill-osm.mk
diff --git a/buildroot-external/Config.in b/buildroot-external/Config.in
index a049efb2..62b27674 100644
--- a/buildroot-external/Config.in
+++ b/buildroot-external/Config.in
@@ -224,6 +224,7 @@ menu "Mycroft A.I. Skills"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-joke/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-naptime/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-news/Config.in"
+ source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-osm/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-common-play/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-enclosure/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-homescreen/Config.in"
diff --git a/buildroot-external/configs/rpi4_64-gui_defconfig b/buildroot-external/configs/rpi4_64-gui_defconfig
index 480a80bf..a80e4b8c 100644
--- a/buildroot-external/configs/rpi4_64-gui_defconfig
+++ b/buildroot-external/configs/rpi4_64-gui_defconfig
@@ -695,6 +695,7 @@ BR2_PACKAGE_MYCROFT_SKILL_IP=y
BR2_PACKAGE_MYCROFT_SKILL_JOKE=y
BR2_PACKAGE_MYCROFT_SKILL_NAPTIME=y
BR2_PACKAGE_MYCROFT_SKILL_NEWS=y
+BR2_PACKAGE_MYCROFT_SKILL_OSM=y
BR2_PACKAGE_MYCROFT_SKILL_OVOS_COMMON_PLAY=y
BR2_PACKAGE_MYCROFT_SKILL_OVOS_ENCLOSURE=y
BR2_PACKAGE_MYCROFT_SKILL_OVOS_HOMESCREEN=y
diff --git a/buildroot-external/package/mycroft-skill-osm/Config.in b/buildroot-external/package/mycroft-skill-osm/Config.in
new file mode 100644
index 00000000..b075a0ec
--- /dev/null
+++ b/buildroot-external/package/mycroft-skill-osm/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_MYCROFT_SKILL_OSM
+ bool "mycroft-skill-osm"
+ help
+ OpenVoiceOS Skill Manager GUI Installer Skill
+
+ https://github.com/OpenVoiceOS/skill-osm
diff --git a/buildroot-external/package/mycroft-skill-osm/mycroft-skill-osm.mk b/buildroot-external/package/mycroft-skill-osm/mycroft-skill-osm.mk
new file mode 100644
index 00000000..84e41942
--- /dev/null
+++ b/buildroot-external/package/mycroft-skill-osm/mycroft-skill-osm.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# mycroft-skill-osm
+#
+################################################################################
+
+MYCROFT_SKILL_OSM_VERSION = eaf8356e48afd6299136fe5b6fdc43665043443a
+MYCROFT_SKILL_OSM_SITE = git://github.com/OpenVoiceOS/skill-osm
+MYCROFT_SKILL_OSM_SITE_METHOD = git
+MYCROFT_SKILL_OSM_DIRLOCATION = home/mycroft/.local/share/mycroft/skills
+MYCROFT_SKILL_OSM_DIRNAME = skill-osm.openvoiceos
+
+define MYCROFT_SKILL_OSM_INSTALL_TARGET_CMDS
+ mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_OSM_DIRLOCATION)/$(MYCROFT_SKILL_OSM_DIRNAME)
+ cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_OSM_DIRLOCATION)/$(MYCROFT_SKILL_OSM_DIRNAME)
+ cp -dpfr $(MYCROFT_SKILL_OSM_DL_DIR)/git/.git* \
+ $(TARGET_DIR)/$(MYCROFT_SKILL_OSM_DIRLOCATION)/$(MYCROFT_SKILL_OSM_DIRNAME)
+endef
+
+$(eval $(generic-package))