Making some build and installation tricks

Change-Id: I49fb84615212762faf0c543ce142185bb216a8fc
diff --git a/wscript b/wscript
index 03fb3cf..3ee0110 100644
--- a/wscript
+++ b/wscript
@@ -5,7 +5,7 @@
 from waflib import Logs, Utils, Task, TaskGen
 
 def options(opt):
-    opt.load('compiler_c compiler_cxx qt4')
+    opt.load('compiler_c compiler_cxx qt4 gnu_dirs')
     opt.load('sparkle xcode', tooldir='waf-tools')
 
     grp = opt.add_option_group ('NDNx Control Center options')
@@ -50,8 +50,11 @@
         conf.load('sparkle')
     else:
         conf.load('qt4')
+        conf.load('gnu_dirs')
         conf.find_program('xsltproc', mandatory=True)
         conf.define('XSLTPROC', conf.env['XSLTPROC'])
+
+        conf.define('RESOURCES_DIR', Utils.subst_vars("${DATAROOTDIR}/ndnx-control-center", conf.env))
         
         if Utils.unversioned_sys_platform () == "darwin":
             conf.define('OSX_BUILD', 1)
@@ -74,6 +77,15 @@
             mac_frameworks = "osx/Frameworks/Sparkle.framework",
             )
     else:
+        bld (features = "subst",
+             source = bld.path.ant_glob(['linux/**/*.in']),
+             target = [node.change_ext('', '.in') for node in bld.path.ant_glob(['linux/**/*.in'])],
+             BINARY = "NDNx Control Center",
+             install_path = "${DATAROOTDIR}/ndnx-control-center"
+            )
+        bld.install_files("${DATAROOTDIR}/ndnx-control-center",
+                          bld.path.ant_glob(['linux/Resources/*']))
+
         bld (
             target = "NDNx Control Center",
             features=['qt4', 'cxxprogram', 'cxx'],