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 similarity index 99% rename from spice-protocol.spec.in rename to 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