Did stuff
This commit is contained in:
parent
650663be78
commit
568d10dc92
4 changed files with 114 additions and 27 deletions
55
meson.build
55
meson.build
|
|
@ -18,12 +18,11 @@ install_data(
|
|||
git = find_program('git')
|
||||
gitres = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(srcdir), 'rev-parse', 'HEAD'],
|
||||
check=True
|
||||
['--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD']
|
||||
)
|
||||
commit = gitres.stdout().strip()
|
||||
|
||||
archive_name = meson.project_name() + '-' + gitrev
|
||||
archive_name = meson.project_name() + '-' + commit
|
||||
full_archive_name = archive_name + '.tar.gz'
|
||||
archive = custom_target(
|
||||
'tarball',
|
||||
|
|
@ -52,31 +51,33 @@ rpmdirs_target = custom_target(
|
|||
|
||||
rpmbuild = find_program('rpmbuild', required: false)
|
||||
|
||||
srpm_target = custom_target(
|
||||
'srpm',
|
||||
command: [
|
||||
rpmbuild, '-bs',
|
||||
spec_file,
|
||||
'--define', '_sourcedir ' + meson.build_root(),
|
||||
'--define', '_topdir ' + rpmdirs_target.full_path(),
|
||||
'--define', 'commit ' + commit
|
||||
],
|
||||
output: 'srpms',
|
||||
depends: [archive]
|
||||
)
|
||||
if rpmbuild.found()
|
||||
srpm_target = custom_target(
|
||||
'srpm',
|
||||
command: [
|
||||
rpmbuild, '-bs',
|
||||
'koji-osbuild.spec',
|
||||
'--define', '_sourcedir ' + meson.build_root(),
|
||||
'--define', '_topdir ' + rpmdirs_target.full_path(),
|
||||
'--define', 'commit ' + commit
|
||||
],
|
||||
output: 'srpms',
|
||||
depends: [archive]
|
||||
)
|
||||
|
||||
rpm_target = custom_target(
|
||||
'rpm',
|
||||
command: [
|
||||
rpmbuild, '-ba',
|
||||
spec_file,
|
||||
'--define', '_sourcedir ' + meson.build_root(),
|
||||
'--define', '_topdir ' + rpmdirs_target.full_path(),
|
||||
'--define', 'commit ' + commit
|
||||
],
|
||||
output: 'rpms',
|
||||
depends: [archive]
|
||||
)
|
||||
rpm_target = custom_target(
|
||||
'rpm',
|
||||
command: [
|
||||
rpmbuild, '-ba',
|
||||
'koji-osbuild.spec',
|
||||
'--define', '_sourcedir ' + meson.build_root(),
|
||||
'--define', '_topdir ' + rpmdirs_target.full_path(),
|
||||
'--define', 'commit ' + commit
|
||||
],
|
||||
output: 'rpms',
|
||||
depends: [archive]
|
||||
)
|
||||
endif
|
||||
|
||||
msg = ['',
|
||||
'hub plugins path: @0@'.format(hub_plugins_path),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue