package/janus-gateway: add an option to remove the HTML demos
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>
Mon, 31 Aug 2020 15:32:41 +0000 (17:32 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 6 Sep 2020 14:31:23 +0000 (16:31 +0200)
janus-gateway comes with an example website to test its features.
Since the bump to 0.10.3, this website takes 1.8MiB uncompressed on
the target, among which is a 1MiB video sample which does not compress
well.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/janus-gateway/Config.in
package/janus-gateway/janus-gateway.mk

index 434ea30152ddb6bdff43778117abb66993746325..5d711fe746f3f9eae6157af3378c87cd489b220e 100644 (file)
@@ -18,6 +18,12 @@ menuconfig BR2_PACKAGE_JANUS_GATEWAY
 
 if BR2_PACKAGE_JANUS_GATEWAY
 
+config BR2_PACKAGE_JANUS_GATEWAY_DEMOS
+       bool "HTML demos"
+       help
+         Install the demonstration website, as featured on
+         https://janus.conf.meetecho.com/
+
 comment "plugins"
 
 config BR2_PACKAGE_JANUS_GATEWAY_AUDIO_BRIDGE
index 444c396b97ad4c5edc0405df1a4a840ab20fca54..bdf8d7a1e0066ca1e3bc503f3fabaf1e9a79fcbb 100644 (file)
@@ -22,6 +22,13 @@ JANUS_GATEWAY_CONF_OPTS = \
        --disable-data-channels \
        --disable-sample-event-handler
 
+ifeq ($(BR2_PACKAGE_JANUS_GATEWAY_DEMOS),)
+define JANUS_GATEWAY_REMOVE_DEMOS
+       $(RM) -fr $(TARGET_DIR)/usr/share/janus/demos/
+endef
+JANUS_GATEWAY_POST_INSTALL_TARGET_HOOKS += JANUS_GATEWAY_REMOVE_DEMOS
+endif
+
 ifeq ($(BR2_PACKAGE_JANUS_GATEWAY_AUDIO_BRIDGE),y)
 JANUS_GATEWAY_DEPENDENCIES += opus
 JANUS_GATEWAY_CONF_OPTS += --enable-plugin-audiobridge