From f4422e9cf4b03b313169e53ebfdda3e52073cc94 Mon Sep 17 00:00:00 2001 From: chme Date: Sat, 26 May 2018 08:52:45 +0200 Subject: [PATCH] [MAKEFILE/misc] Add option to disable inclusion of default webinterface --- configure.ac | 7 ++++++ htdocs/Makefile.am | 55 +++++++++++++++++++++++++++++++--------------- src/misc.c | 3 +++ 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index 2a33808f..1a836256 100644 --- a/configure.ac +++ b/configure.ac @@ -377,6 +377,13 @@ FORK_ARG_DISABLE([Apple TV device verification], [verification], [RAOP_VERIFICAT ]) AM_CONDITIONAL([COND_RAOP_VERIFICATION], [[test "x$enable_verification" = "xyes"]]) +dnl Include default webinterface +FORK_ARG_DISABLE([Include default web interface], [webinterface], [WEBINTERFACE], + [AS_IF([[test "x$with_libwebsockets" = "xno"]], + [AC_MSG_ERROR([[Default web interface requires libwebsockets]])]) + ]) +AM_CONDITIONAL([COND_WEBINTERFACE], [[test "x$enable_webinterface" = "xyes"]]) + dnl Defining users and groups AC_ARG_WITH([daapd_user], [AS_HELP_STRING([--with-daapd-user=USER], diff --git a/htdocs/Makefile.am b/htdocs/Makefile.am index 87e1312e..4ff00e20 100644 --- a/htdocs/Makefile.am +++ b/htdocs/Makefile.am @@ -1,7 +1,6 @@ -htdocsdir = $(datadir)/forked-daapd/htdocs -dist_htdocs_DATA = \ - admin.html \ +if COND_WEBINTERFACE +WEBINTERFACE_SRC = \ index.html \ favicon.ico \ android-chrome-96x96.png \ @@ -13,11 +12,39 @@ dist_htdocs_DATA = \ safari-pinned-tab.svg \ site.webmanifest +WEBINTERFACE_CSS_SRC = \ + css/app.css \ + css/app.css.map + +WEBINTERFACE_FONTS_SRC = \ + fonts/materialdesignicons-webfont.13621ea.ttf \ + fonts/materialdesignicons-webfont.5cdddea.woff2 \ + fonts/materialdesignicons-webfont.1bd36f0.woff \ + fonts/materialdesignicons-webfont.dbcb3fe.eot + +WEBINTERFACE_JS_SRC = \ + js/app.js \ + js/app.js.map \ + js/manifest.js \ + js/manifest.js.map \ + js/vendor.js \ + js/vendor.js.map + +WEBINTERFACE_IMG_SRC = \ + img/materialdesignicons-webfont.55a80a2.svg +endif + + +htdocsdir = $(datadir)/forked-daapd/htdocs + +dist_htdocs_DATA = \ + $(WEBINTERFACE_SRC) \ + admin.html + htdocscssdir = $(datadir)/forked-daapd/htdocs/css dist_htdocscss_DATA = \ - css/app.css \ - css/app.css.map \ + $(WEBINTERFACE_CSS_SRC) \ css/bulma.min.css \ css/font-awesome.min.css \ css/forked-daapd.css @@ -25,10 +52,7 @@ dist_htdocscss_DATA = \ htdocsfontsdir = $(datadir)/forked-daapd/htdocs/fonts dist_htdocsfonts_DATA = \ - fonts/materialdesignicons-webfont.13621ea.ttf \ - fonts/materialdesignicons-webfont.5cdddea.woff2 \ - fonts/materialdesignicons-webfont.1bd36f0.woff \ - fonts/materialdesignicons-webfont.dbcb3fe.eot \ + $(WEBINTERFACE_FONTS_SRC) \ fonts/FontAwesome.otf\ fonts/fontawesome-webfont.eot \ fonts/fontawesome-webfont.svg \ @@ -36,20 +60,15 @@ dist_htdocsfonts_DATA = \ fonts/fontawesome-webfont.woff \ fonts/fontawesome-webfont.woff2 -htdocsimgdir = $(datadir)/forked-daapd/htdocs//img +htdocsimgdir = $(datadir)/forked-daapd/htdocs/img dist_htdocsimg_DATA = \ - img/materialdesignicons-webfont.55a80a2.svg + $(WEBINTERFACE_IMG_SRC) -htdocsjsdir = $(datadir)/forked-daapd/htdocs//js +htdocsjsdir = $(datadir)/forked-daapd/htdocs/js dist_htdocsjs_DATA = \ - js/app.js \ - js/app.js.map \ - js/manifest.js \ - js/manifest.js.map \ - js/vendor.js \ - js/vendor.js.map \ + $(WEBINTERFACE_JS_SRC) \ js/axios.js \ js/axios.map \ js/axios.min.js \ diff --git a/src/misc.c b/src/misc.c index f046d372..5bfed5d8 100644 --- a/src/misc.c +++ b/src/misc.c @@ -80,6 +80,9 @@ static char *buildopts[] = #endif #ifdef HAVE_LIBPULSE "Pulseaudio", +#endif +#ifdef WEBINTERFACE + "Webinterface", #endif NULL };