Skip to contentSkip to conversation

package/janus-gateway: add an option to remove the HTML demos

PATCH New Nicolas Cavallari 2 participants 2 messages Aug 31, 2020 – Sep 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/janus-gateway: add an option to remove the HTML demos

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.

This adds an default-y option to keep the website after installation. If unset, the website is manually deleted from the target as there is no configure option to not install it.

---

Not to mention that the video is said to have been downloaded from www2.iis.fraunhofer.de, but its terms and conditions do not seems to allow redistribution:
https://www.iis.fraunhofer.de/en/imprint.html

---
 package/janus-gateway/Config.in        | 7 +++++++
 package/janus-gateway/janus-gateway.mk | 7 +++++++
 2 files changed, 14 insertions(+)
package/janus-gateway/Config.in +7 -0
index 434ea30152..91cdda266e 100644
@@ -18,6 +18,13 @@ menuconfig BR2_PACKAGE_JANUS_GATEWAY
 
 if BR2_PACKAGE_JANUS_GATEWAY
 
+config BR2_PACKAGE_JANUS_GATEWAY_DEMOS
+	bool "HTML demos"
+	default y
+	help
+	  Install the demonstration website, as featured on
+	  https://janus.conf.meetecho.com/
+
 comment "plugins"
 
 config BR2_PACKAGE_JANUS_GATEWAY_AUDIO_BRIDGE
package/janus-gateway/janus-gateway.mk +7 -0
index 444c396b97..f0acca8b25 100644
@@ -22,6 +22,13 @@ JANUS_GATEWAY_CONF_OPTS = \
 	--disable-data-channels \
 	--disable-sample-event-handler
 
+ifneq ($(BR2_PACKAGE_JANUS_GATEWAY_DEMOS),y)
+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
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 package/janus-gateway: add an option to remove the HTML demos

Quoted 8 lines · On Mon, 31 Aug 2020 17:32:41 +0200 Nicolas Cavallari…

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.

This adds an default-y option to keep the website after installation. If unset, the website is manually deleted from the target as there is no configure option to not install it.

I understand that you used a "default y" to keep backward compatibility. However, in this case, I believe backward compatibility does not win over "good out of the box experience". Indeed, by default, we try to be minimal, and having an example/demo website with a 1MB video sample installed by default is not really "minimal". So I've dropped the "default y" and applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com