[Kimchi-devel] [PATCH][Wok 2/2] Change configuration files

Ramon Medeiros ramonn at linux.vnet.ibm.com
Fri Aug 12 16:55:39 UTC 2016


Change configure.ac to receive parameter "--with-js-rpms" and set
Makefile to apply changes when configured by automake.

Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
 configure.ac         | 11 +++++++++++
 ui/libs/Makefile.am  | 10 +++++++++-
 ui/pages/Makefile.am |  9 +++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c7a2787..bfc8b59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,17 @@ AC_ARG_WITH(
 )
 AM_CONDITIONAL([WITH_SPICE], [test "x$with_spice_html5" = xyes])
 
+AC_ARG_WITH(
+    [js-rpms],
+    [AS_HELP_STRING([--with-js-rpms],
+                    [Build Kimchi with js libraries from rpms @<:@default=no@:>@])],
+    [with_js_rpms="yes"],
+    [with_js_rpms="no"])
+
+AM_CONDITIONAL([WITH_JS_RPMS], [test "x$with_js_rpms" == xyes ])
+AM_CONDITIONAL([WITH_JS_RPMS_FEDORA], [test "x$with_js_rpms" = xyes && -f /etc/redhat_release])
+AM_CONDITIONAL([WITH_JS_RPMS_UBUNTU], [test "x$with_js_rpms" = xyes && -f /etc/debian_version])
+
 AC_CONFIG_FILES([
     po/Makefile.in
     po/gen-pot
diff --git a/ui/libs/Makefile.am b/ui/libs/Makefile.am
index 9732499..8614320 100644
--- a/ui/libs/Makefile.am
+++ b/ui/libs/Makefile.am
@@ -17,4 +17,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead jquery-containsNC lodash datatables moment
+SUBDIRS = bootstrap-select jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable jquery-containsNC datatables
+
+if WITH_JS_RPMS_FEDORA
+SUBDIRS += bootstrap jquery-ui
+else if WITH_JS_RPMS_UBUNTU
+SUBDIRS += es5-shim typeahead lodash moment
+else
+SUBDIRS += bootstrap jquery-ui es5-shim typeahead lodash moment jquery
+endif
diff --git a/ui/pages/Makefile.am b/ui/pages/Makefile.am
index dde6026..d08909b 100644
--- a/ui/pages/Makefile.am
+++ b/ui/pages/Makefile.am
@@ -17,6 +17,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if WITH_JS_RPMS_FEDORA
+sh -c 'cp login.html.tmpl.fedora login.html.tmpl'
+sh -c 'cp wok-ui.html.tmpl.fedora wok-ui.html.tmpl'
+endif
+if WITH_JS_RPMS_UBUNTU
+sh -c 'cp login.html.tmpl.ubuntu login.html.tmpl'
+sh -c 'cp wok-ui.html.tmpl.ubuntu wok-ui.html.tmpl'
+endif
+
 SUBDIRS = help tabs
 
 htmldir = $(datadir)/wok/ui/pages
-- 
2.5.5




More information about the Kimchi-devel mailing list