diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2020-03-06 15:01:50 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2020-03-09 19:00:42 +0000 |
commit | e3dcbcb72f688558f64a480216ce1963fb2d3f48 (patch) | |
tree | b75067ddd6b5a5d13f56b54e4d47fd009153afe0 | |
parent | 33946522aae8127f258411291f0e84b0d5a15426 (diff) |
Package SPEC file into Meson distribution file
Put final SPEC file in GIT repository directly to avoid having
to bump Meson version to use distribution script. To avoid
having incoherent version numbers check the versions from CI.
Remove 'c' as project language, project don't need to compile
any files.
Meson however needs C compiler even if is not used so add to package
requirements.
Update CI to build RPM from package directly.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
-rw-r--r-- | .gitlab-ci.yml | 14 | ||||
-rw-r--r-- | meson.build | 11 | ||||
-rw-r--r-- | spice-protocol.spec (renamed from spice-protocol.spec.in) | 3 |
3 files changed, 13 insertions, 15 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 098aab0..12c18d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: fedora:latest variables: - DEPS_COMMON: git libtool make redhat-rpm-config + DEPS_COMMON: git gcc redhat-rpm-config meson ninja-build gtk-doc glib2-devel gettext gettext-devel bzip2 rpmlint rpm-build @@ -10,9 +10,15 @@ before_script: fedora: script: + # build project and distribution - meson --buildtype=release build-default - ninja -C build-default - ninja -C build-default dist - - rpmlint -o "NetworkEnabled False" build-default/spice-protocol.spec - - mkdir -p ~/rpmbuild/SOURCES && cp build-default/meson-dist/spice-protocol*.tar.xz ~/rpmbuild/SOURCES/ - - rpmbuild -ba build-default/spice-protocol.spec + # check SPEC file + - rpmlint -o "NetworkEnabled False" spice-protocol.spec + # check the SPEC version and project (in meson.build) are the same + - "VER_SPEC=$(sed '/^Version:/!d; s/.*: \\+//' < spice-protocol.spec)" + - "VER_PROJECT=$(sed '/version/ { s/.*'\\''\\(.*\\)'\\''.*/\\1/; q }; d' < meson.build)" + - "test \"x$VER_SPEC\" = \"x$VER_PROJECT\"" + # build RPM from tarball generate + - rpmbuild -ta build-default/meson-dist/spice-protocol*.tar.xz diff --git a/meson.build b/meson.build index 9d52a01..135a703 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ # # project definition # -project('spice-protocol', 'c', +project('spice-protocol', version : '0.14.2', license : 'BSD', meson_version : '>= 0.41.0') @@ -23,12 +23,3 @@ pkgconfig.generate(name : meson.project_name(), subdirs : 'spice-1', install_dir : pkgconfig_dir, variables : 'datadir=@0@'.format(join_paths('${prefix}', datadir))) - -# -# spice-protocol.spec -# -config_data = configuration_data() -config_data.set ('VERSION', meson.project_version()) -configure_file(input : 'spice-protocol.spec.in', - output : 'spice-protocol.spec', - configuration : config_data) diff --git a/spice-protocol.spec.in b/spice-protocol.spec index 300b576..dfd1345 100644 --- a/spice-protocol.spec.in +++ b/spice-protocol.spec @@ -1,5 +1,5 @@ Name: spice-protocol -Version: @VERSION@ +Version: 0.14.2 Release: 1%{?dist} Summary: Spice protocol header files Group: Development/Libraries @@ -8,6 +8,7 @@ License: BSD and LGPLv2+ URL: https://www.spice-space.org Source0: https://www.spice-space.org/download/releases/%{name}-%{version}.tar.xz BuildArch: noarch +BuildRequires: meson gcc %description Header files describing the spice protocol |