[buoh/appstream-news] Generate NEWS from AppStream



commit 7ee49bbd9b0c386ca31695f9cf5b401a0c89785a
Author: Jan Tojnar <jtojnar gmail com>
Date:   Wed Jan 23 17:07:45 2019 +0100

    Generate NEWS from AppStream

 NEWS                   | 102 -------------------------------------------------
 build-aux/dist-news.py |  10 +++++
 meson.build            |   9 +++++
 3 files changed, 19 insertions(+), 102 deletions(-)
---
diff --git a/build-aux/dist-news.py b/build-aux/dist-news.py
new file mode 100644
index 0000000..7be7483
--- /dev/null
+++ b/build-aux/dist-news.py
@@ -0,0 +1,10 @@
+import subprocess
+import sys
+
+if len(sys.argv) < 2:
+  sys.exit("usage: dist-news.py <appstream_util>")
+
+appstream_util = sys.argv[1]
+
+print('Generating NEWS fileā€¦')
+subprocess.call([appstream_util, 'appdata-to-news', 'data/org.gnome.buoh.appdata.xml.in'])
diff --git a/meson.build b/meson.build
index 544e9a1..42f083e 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,7 @@ project(
   default_options: [
     'b_ndebug=if-release',
   ],
+  meson_version: '>= 0.50.0',
 )
 
 gnome = import('gnome')
@@ -42,6 +43,14 @@ buoh_deps = [
   libxml2,
 ]
 
+if appstream_util.found()
+  meson.add_dist_script(
+    python3.find_python().path(),
+    join_paths(meson.source_root(), 'build-aux', 'dist-news.py'),
+    appstream_util,
+  )
+endif
+
 # Post-install scripts
 meson.add_install_script(
   python3.find_python().path(),


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