Re: [PATCH spice-gtk 3/4] build: Do additional changes to Meson distribution

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

 



On 5/20/19 10:39 AM, Frediano Ziglio wrote:
- copy missing recorder files;
- generate THANKS file.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
  Makefile.am          |  1 +
  build-aux/meson-dist | 28 ++++++++++++++++++++++++++++
  meson.build          |  2 +-
  3 files changed, 30 insertions(+), 1 deletion(-)
  create mode 100755 build-aux/meson-dist

diff --git a/Makefile.am b/Makefile.am
index 3c607c9a..6ba8c028 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,7 @@ EXTRA_DIST =					\
  	meson_options.txt			\
  	po/meson.build				\
  	build-aux/git-version-gen		\
+	build-aux/meson-dist			\
  	gtk-doc.make				\
  	.version				\
  	$(NULL)
diff --git a/build-aux/meson-dist b/build-aux/meson-dist
new file mode 100755
index 00000000..9a18ff2d
--- /dev/null
+++ b/build-aux/meson-dist
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e
+set -o pipefail
+
+if test "$1" = ""; then
+    echo "Version not provided" >&2
+    exit 1
+fi
+if ! test -d "$2"; then
+    echo "Source directory not provided" >&2
+    exit 1
+fi
+
+# generate tarball version
+echo "$1" > "$MESON_DIST_ROOT/.tarball-version"
+
+# add missing recorder files
+(cd "$2" && ls -1 subprojects/spice-common/common/recorder/recorder.[ch] \
+    subprojects/spice-common/common/recorder/recorder_ring.[ch] | \
+    tar cf - -T -) | (cd "$MESON_DIST_ROOT" && exec tar xf -)

What happens when recorder is disabled and this scripts exits with
an error ?

Uri.

+
+# generate THANKS file
+{
+	  echo "The spice-gtk team would like to thank the following contributors:"
+	  echo
+	  (cd "$2" && exec git log --format='%aN <%aE>') | sort -u
+} > "$MESON_DIST_ROOT/THANKS"
diff --git a/meson.build b/meson.build
index 8c6288f3..58961551 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project('spice-gtk', 'c',
           license : 'LGPLv2.1',
           meson_version : '>= 0.49')
-meson.add_dist_script('sh', '-c', 'echo @0@>"$MESON_DIST_ROOT/.tarball-version"'.format(meson.project_version()))
+meson.add_dist_script('build-aux/meson-dist', meson.project_version(), meson.source_root())
#
  # global C defines


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]