mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-21 13:34:06 +03:00
meson: generate and distribute spec files and AUTHORS
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
c3669c8675
commit
932a5b5499
@ -93,7 +93,7 @@ Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
|
||||
#contributorslist#
|
||||
@contributorslist@
|
||||
|
||||
The libvirt logo was designed by Diana Fong
|
||||
|
||||
|
19
Makefile.am
19
Makefile.am
@ -31,24 +31,5 @@ rpm: clean
|
||||
srpm: clean
|
||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ts $(distdir).tar.xz)
|
||||
|
||||
dist-hook: gen-AUTHORS
|
||||
|
||||
.PHONY: gen-AUTHORS
|
||||
gen-AUTHORS:
|
||||
$(AM_V_GEN)\
|
||||
if test -d $(srcdir)/.git; then \
|
||||
( \
|
||||
cd $(srcdir) && \
|
||||
git log --pretty=format:'%aN <%aE>' | sort -u \
|
||||
) > all.list && \
|
||||
sort -u $(srcdir)/AUTHORS.in > maint.list && \
|
||||
comm -23 all.list maint.list > contrib.list && \
|
||||
contrib="`cat contrib.list`" && \
|
||||
perl -p -e "s/#contributorslist#// and print '$$contrib'" \
|
||||
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
|
||||
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS && \
|
||||
rm -f all.list maint.list contrib.list; \
|
||||
fi
|
||||
|
||||
ci-%:
|
||||
$(MAKE) -C $(srcdir)/ci/ $@
|
||||
|
@ -108,6 +108,5 @@ AC_CONFIG_FILES([run],
|
||||
AC_CONFIG_FILES([\
|
||||
Makefile \
|
||||
.color_coded \
|
||||
.ycm_extra_conf.py \
|
||||
libvirt.spec mingw-libvirt.spec])
|
||||
.ycm_extra_conf.py])
|
||||
AC_OUTPUT
|
||||
|
48
meson.build
48
meson.build
@ -2263,6 +2263,54 @@ foreach file : pkgconfig_files
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
||||
# generate dist files
|
||||
|
||||
if git
|
||||
spec_files = [
|
||||
'libvirt.spec.in',
|
||||
'mingw-libvirt.spec.in',
|
||||
]
|
||||
|
||||
spec_conf = configuration_data()
|
||||
spec_conf.set('VERSION', meson.project_version())
|
||||
|
||||
foreach file : spec_files
|
||||
configure_file(
|
||||
input: file,
|
||||
output: '@BASENAME@',
|
||||
configuration: spec_conf,
|
||||
)
|
||||
endforeach
|
||||
|
||||
authors = run_command(python3_prog, meson_gen_authors_prog.path(), env: runutf8)
|
||||
authors_file = 'AUTHORS.in'
|
||||
|
||||
authors_conf = configuration_data()
|
||||
authors_conf.set('contributorslist', authors.stdout())
|
||||
|
||||
configure_file(
|
||||
input: authors_file,
|
||||
output: '@BASENAME@',
|
||||
configuration: authors_conf,
|
||||
)
|
||||
|
||||
# Using return values from configure_file in add_dist_script is possible since 0.55.0
|
||||
dist_files = [
|
||||
'libvirt.spec',
|
||||
'mingw-libvirt.spec',
|
||||
'AUTHORS',
|
||||
]
|
||||
|
||||
foreach file : dist_files
|
||||
meson.add_dist_script(
|
||||
meson_python_prog.path(), python3_prog.path(), meson_dist_prog.path(),
|
||||
meson.build_root(), file
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
|
||||
# generate meson-config.h file
|
||||
configure_file(output: 'meson-config.h', configuration: conf)
|
||||
|
||||
|
14
scripts/meson-dist.py
Executable file
14
scripts/meson-dist.py
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
meson_build_root = sys.argv[1]
|
||||
file_name = sys.argv[2]
|
||||
|
||||
meson_dist_root = os.environ['MESON_DIST_ROOT']
|
||||
|
||||
os.system('cp {0} {1}'.format(
|
||||
os.path.join(meson_build_root, file_name),
|
||||
os.path.join(meson_dist_root, file_name)
|
||||
))
|
8
scripts/meson-gen-authors.py
Executable file
8
scripts/meson-gen-authors.py
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
meson_source_root = os.environ['MESON_SOURCE_ROOT']
|
||||
|
||||
os.chdir(meson_source_root)
|
||||
os.system('git log --pretty=format:"%aN <%aE>" | sort -u')
|
@ -18,6 +18,8 @@ scripts = [
|
||||
'header-ifdef.py',
|
||||
'hvsupport.py',
|
||||
'hyperv_wmi_generator.py',
|
||||
'meson-dist.py',
|
||||
'meson-gen-authors.py',
|
||||
'meson-gen-def.py',
|
||||
'meson-gen-sym.py',
|
||||
'meson-html-gen.py',
|
||||
|
Loading…
Reference in New Issue
Block a user