build: Do additional changes to Meson distribution

- copy missing recorder files;
- generate THANKS file.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-05-17 12:26:03 +01:00
parent 20157e329d
commit eaaa4f32fa
3 changed files with 30 additions and 1 deletions

View File

@ -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)

28
build-aux/meson-dist Executable file
View File

@ -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 -)
# 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"

View File

@ -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