[babl] add docs. fix install libs. Seems finished.~



commit a8964251bd81a3a57c28cfb08eaf7521685c6fe4
Author: Félix Piédallu <felix piedallu me>
Date:   Thu Nov 23 21:43:16 2017 +0100

    add docs. fix install libs. Seems finished.~

 babl/meson.build          |    3 ++
 docs/graphics/meson.build |   30 +++++++++++++++++++++
 docs/meson.build          |   62 +++++++++++++++++++++++++++++++++++++++++++++
 extensions/meson.build    |    3 +-
 meson.build               |   14 ++++------
 5 files changed, 103 insertions(+), 9 deletions(-)
---
diff --git a/babl/meson.build b/babl/meson.build
index 64bffdf..5d783eb 100644
--- a/babl/meson.build
+++ b/babl/meson.build
@@ -71,6 +71,7 @@ babl_headers = [
   'babl-macros.h',
   'babl-types.h',
   'babl.h',
+  babl_version_h,
 ]
 
 install_headers(babl_headers,
@@ -84,4 +85,6 @@ babl = library('babl',
   cpp_args: [ '-DLIBDIR="' + get_option('libdir') + '"', ],
   link_with: [ babl_base, ],
   dependencies: [ math, thread, dl, ],
+  install: true,
+  version: so_version,
 )
diff --git a/docs/graphics/meson.build b/docs/graphics/meson.build
new file mode 100644
index 0000000..5b1715a
--- /dev/null
+++ b/docs/graphics/meson.build
@@ -0,0 +1,30 @@
+
+graphic_files = [
+  'babl-16x16',
+  'babl-48x48',
+  'babl-a4poster',
+]
+
+graphic_files_install = [
+  files('index.html'),
+]
+
+foreach file : graphic_files
+  sizeinfo = (
+    file.contains('a4poster')
+    ? [ '-w', '256', ]
+    : []
+  )
+
+  graphic_files_install += custom_target(file,
+    input : [ file + '.svg' ],
+    output: [ file + '.png' ],
+    command: [
+      rsvg_convert,
+      sizeinfo,
+      '-o', '@OUTPUT@',
+      '@INPUT@',
+    ],
+    install: false,
+  )
+endforeach
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..b1c04f6
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,62 @@
+subdir('graphics')
+
+host    = 'pippin.gimp.org'
+location= 'public_html/babl'
+scptarget = host + ':' + location + '/'
+
+
+# The patterns used for html creation in the babl build system
+# is very small, and should probably be documented in a tutorial.
+
+index_static_html = configure_file(
+  input : 'index-static.html.in',
+  output: 'index-static.html',
+  configuration: conf,
+)
+
+index_html = custom_target('index.html',
+  input : [
+    index_static_html,
+    '../AUTHORS',
+    '../TODO',
+    '../NEWS',
+  ],
+  output: [ 'index.html', ],
+  command: [
+
+  ],
+)
+
+# push_web_root = custom_target('push_web_root',
+#   input : [
+#     index_html,
+#     index_static_html,
+#     'babl.css',
+#   ],
+#   output: [ 'push_web_root' ],
+#   command: [
+#     'scp',
+#     '@INPUT@',
+#     scptarget,
+#   ],
+# )
+# push_web_graphics = custom_target('push_web_graphics',
+#   input : [
+#     graphic_files_install,
+#   ],
+#   output: [ 'push_web_graphics' ],
+#   command: [
+#     'scp',
+#     '@INPUT@',
+#     scptarget + 'graphics/',
+#   ],
+# )
+#
+# web = custom_target('web',
+#   input: [
+#     push_web_root,
+#     push_web_graphics
+#   ],
+#   output: [],
+#   command: [],
+# )
\ No newline at end of file
diff --git a/extensions/meson.build b/extensions/meson.build
index 547c059..bfbbcc2 100644
--- a/extensions/meson.build
+++ b/extensions/meson.build
@@ -33,7 +33,8 @@ foreach extension_name : extension_names
     link_with: [ babl, ],
     dependencies: [ math, thread, ],
     name_prefix: '',
-    install: false,
+    install: true,
+    install_dir: join_paths(get_option('libdir'), lib_name),
   )
 endforeach
 
diff --git a/meson.build b/meson.build
index 075c8df..6b2aa5d 100644
--- a/meson.build
+++ b/meson.build
@@ -49,16 +49,17 @@ lt_current_minus_age = lt_current - lt_age
 
 api_version = '@0@.@1@'.format(major_version, minor_version)
 lib_version = '@0@:@1@:@2@'.format(lt_current, lt_revision, lt_age)
-lib_name    = meson.project_name() + '-' + meson.project_version()
+so_version  = '@0@.@1@.@2@'.format(lt_current_minus_age, lt_current, interface_age)
+lib_name    = meson.project_name() + '-' + api_version
 
 stability_version_number = (major_version != 0 ? minor_version : micro_version)
 stable = (stability_version_number % 2 == 0)
 
 conf.set10('BABL_UNSTABLE', not stable)
 
-conf.set_quoted('BABL_MAJOR_VERSION',    '@0@'.format(major_version))
-conf.set_quoted('BABL_MINOR_VERSION',    '@0@'.format(minor_version))
-conf.set_quoted('BABL_MICRO_VERSION',    '@0@'.format(micro_version))
+conf.set       ('BABL_MAJOR_VERSION',    '@0@'.format(major_version))
+conf.set       ('BABL_MINOR_VERSION',    '@0@'.format(minor_version))
+conf.set       ('BABL_MICRO_VERSION',    '@0@'.format(micro_version))
 conf.set_quoted('BABL_INTERFACE_AGE',    '@0@'.format(interface_age))
 conf.set_quoted('BABL_BINARY_AGE',       '@0@'.format(binary_age))
 conf.set_quoted('BABL_VERSION',          '@0@'.format(version))
@@ -69,9 +70,6 @@ conf.set_quoted('BABL_LIBRARY_VERSION',  '@0@'.format(lib_version))
 conf.set_quoted('BABL_CURRENT_MINUS_AGE','@0@'.format(lt_current_minus_age))
 conf.set_quoted('BABL_LIBRARY',          '@0@'.format(lib_name))
 
-conf.set_quoted('WEBSITE_HOST',     'pippin.gimp.org')
-conf.set_quoted('WEBSITE_LOCATION', 'public_html/babl')
-
 ################################################################################
 # Host system detection
 
@@ -252,7 +250,7 @@ subdir('extensions')
 subdir('tests')
 subdir('tools')
 if get_option('with-docs')
-  # subdir('docs')
+  subdir('docs')
 endif
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]