[Spice-commits] 3 commits - autogen.sh configure.ac .gitlab-ci.yml git.mk Makefile.am meson.build spice/Makefile.am spice-protocol.pc.in spice-protocol.spec spice-protocol.spec.in

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 9 19:01:21 UTC 2020


 .gitlab-ci.yml       |   22 ++--
 Makefile.am          |   31 ------
 autogen.sh           |   19 ----
 configure.ac         |   22 ----
 git.mk               |  227 ---------------------------------------------------
 meson.build          |   11 --
 spice-protocol.pc.in |   10 --
 spice-protocol.spec  |   11 +-
 spice/Makefile.am    |   25 -----
 9 files changed, 18 insertions(+), 360 deletions(-)

New commits:
commit e3dcbcb72f688558f64a480216ce1963fb2d3f48
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Mar 6 15:01:50 2020 +0000

    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 at redhat.com>
    Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

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
commit 33946522aae8127f258411291f0e84b0d5a15426
Author: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Date:   Thu Feb 22 19:27:00 2018 -0300

    Remove autotools files in favor of meson
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index c5b9787..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-NULL =
-ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = spice
-
-pkgconfigdir = $(datadir)/pkgconfig
-pkgconfig_DATA = spice-protocol.pc
-
-MAINTAINERCLEANFILES =						\
-	$(srcdir)/INSTALL					\
-	$(srcdir)/aclocal.m4					\
-	$(srcdir)/autoscan.log					\
-	$(srcdir)/compile					\
-	$(srcdir)/config.guess					\
-	$(srcdir)/config.h.in					\
-	$(srcdir)/config.sub					\
-	$(srcdir)/configure.scan				\
-	$(srcdir)/depcomp					\
-	$(srcdir)/install-sh					\
-	$(srcdir)/ltmain.sh					\
-	$(srcdir)/missing					\
-	$(srcdir)/mkinstalldirs					\
-	`find "$(srcdir)" -type f -name Makefile.in -print`	\
-	$(NULL)
-
-EXTRA_DIST =							\
-	README.md						\
-	CHANGELOG.md						\
-	spice-protocol.spec					\
-	meson.build
-
--include $(top_srcdir)/git.mk
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index de6881d..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-
-set -e # exit on errors
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-
-(
-    cd "$srcdir"
-    autoreconf --verbose --force --install
-)
-
-CONFIGURE_ARGS="--enable-maintainer-mode"
-
-if [ -z "$NOCONFIGURE" ]; then
-    echo "Running configure with $CONFIGURE_ARGS $@"
-    "$srcdir/configure" $CONFIGURE_ARGS "$@"
-fi
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 2719017..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,22 +0,0 @@
-AC_PREREQ([2.57])
-
-m4_define([SPICE_MAJOR], 0)
-m4_define([SPICE_MINOR], 14)
-m4_define([SPICE_MICRO], 2)
-
-AC_INIT(spice-protocol, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice-protocol)
-
-AC_CONFIG_MACRO_DIR([m4])
-AM_CONFIG_HEADER([config.h])
-
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
-
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-AC_OUTPUT([
-Makefile
-spice-protocol.pc
-spice/Makefile
-spice-protocol.spec
-])
diff --git a/git.mk b/git.mk
deleted file mode 100644
index d5bf7b8..0000000
--- a/git.mk
+++ /dev/null
@@ -1,227 +0,0 @@
-# git.mk
-#
-# Copyright 2009, Red Hat, Inc.
-# Copyright 2010,2011 Behdad Esfahbod
-# Written by Behdad Esfahbod
-#
-# Copying and distribution of this file, with or without modification,
-# is permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.
-#
-# The latest version of this file can be downloaded from:
-#   https://raw.github.com/behdad/git.mk/master/git.mk
-# Bugs, etc, should be reported upstream at:
-#   https://github.com/behdad/git.mk
-#
-# To use in your project, import this file in your git repo's toplevel,
-# then do "make -f git.mk".  This modifies all Makefile.am files in
-# your project to -include git.mk.  Remember to add that line to new
-# Makefile.am files you create in your project, or just rerun the
-# "make -f git.mk".
-#
-# This enables automatic .gitignore generation.  If you need to ignore
-# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
-# But think twice before doing that.  If a file has to be in .gitignore,
-# chances are very high that it's a generated file and should be in one
-# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
-#
-# The only case that you need to manually add a file to GITIGNOREFILES is
-# when remove files in one of mostlyclean-local, clean-local, distclean-local,
-# or maintainer-clean-local make targets.
-#
-# Note that for files like editor backup, etc, there are better places to
-# ignore them.  See "man gitignore".
-#
-# If "make maintainer-clean" removes the files but they are not recognized
-# by this script (that is, if "git status" shows untracked files still), send
-# me the output of "git status" as well as your Makefile.am and Makefile for
-# the directories involved and I'll diagnose.
-#
-# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
-# Makefile.am.sample in the git.mk git repo.
-#
-# Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
-# not tarballs.  It serves no useful purpose in tarballs and clutters the
-# build dir.
-#
-# This file knows how to handle autoconf, automake, libtool, gtk-doc,
-# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu.
-#
-# This makefile provides the following targets:
-#
-# - all: "make all" will build all gitignore files.
-# - gitignore: makes all gitignore files in the current dir and subdirs.
-# - .gitignore: make gitignore file for the current dir.
-# - gitignore-recurse: makes all gitignore files in the subdirs.
-#
-# KNOWN ISSUES:
-#
-# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
-#   submodule doesn't find us.  If you have configure.{in,ac} files in
-#   subdirs, add a proxy git.mk file in those dirs that simply does:
-#   "include $(top_srcdir)/../git.mk".  Add more ..'s to your taste.
-#   And add those files to git.  See vte/gnome-pty-helper/git.mk for
-#   example.
-#
-
-git-all: git-mk-install
-
-git-mk-install:
-	@echo Installing git makefile
-	@any_failed=; \
-		find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \
-		if grep 'include .*/git.mk' $$x >/dev/null; then \
-			echo $$x already includes git.mk; \
-		else \
-			failed=; \
-			echo "Updating $$x"; \
-			{ cat $$x; \
-			  echo ''; \
-			  echo '-include $$(top_srcdir)/git.mk'; \
-			} > $$x.tmp || failed=1; \
-			if test x$$failed = x; then \
-				mv $$x.tmp $$x || failed=1; \
-			fi; \
-			if test x$$failed = x; then : else \
-				echo Failed updating $$x; >&2 \
-				any_failed=1; \
-			fi; \
-	fi; done; test -z "$$any_failed"
-
-.PHONY: git-all git-mk-install
-
-
-### .gitignore generation
-
-$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
-	$(AM_V_GEN) \
-	{ \
-		if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
-			for x in \
-				$(DOC_MODULE)-decl-list.txt \
-				$(DOC_MODULE)-decl.txt \
-				tmpl/$(DOC_MODULE)-unused.sgml \
-				"tmpl/*.bak" \
-				xml html \
-			; do echo /$$x; done; \
-		fi; \
-		if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
-			for lc in $(DOC_LINGUAS); do \
-				for x in \
-					$(if $(DOC_MODULE),$(DOC_MODULE).xml) \
-					$(DOC_PAGES) \
-					$(DOC_INCLUDES) \
-				; do echo /$$lc/$$x; done; \
-			done; \
-			for x in \
-				$(_DOC_OMF_ALL) \
-				$(_DOC_DSK_ALL) \
-				$(_DOC_HTML_ALL) \
-				$(_DOC_MOFILES) \
-				$(DOC_H_FILE) \
-				"*/.xml2po.mo" \
-				"*/*.omf.out" \
-			; do echo /$$x; done; \
-		fi; \
-		if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
-			for lc in $(HELP_LINGUAS); do \
-				for x in \
-					$(HELP_FILES) \
-					"$$lc.stamp" \
-					"$$lc.mo" \
-				; do echo /$$lc/$$x; done; \
-			done; \
-		fi; \
-		if test "x$(gsettings_SCHEMAS)" = x; then :; else \
-			for x in \
-				$(gsettings_SCHEMAS:.xml=.valid) \
-				$(gsettings__enum_file) \
-			; do echo /$$x; done; \
-		fi; \
-		if test -f $(srcdir)/po/Makefile.in.in; then \
-			for x in \
-				po/Makefile.in.in \
-				po/Makefile.in \
-				po/Makefile \
-				po/POTFILES \
-				po/stamp-it \
-				po/.intltool-merge-cache \
-				"po/*.gmo" \
-				"po/*.mo" \
-				po/$(GETTEXT_PACKAGE).pot \
-				intltool-extract.in \
-				intltool-merge.in \
-				intltool-update.in \
-			; do echo /$$x; done; \
-		fi; \
-		if test -f $(srcdir)/configure; then \
-			for x in \
-				autom4te.cache \
-				configure \
-				config.h \
-				stamp-h1 \
-				libtool \
-				config.lt \
-			; do echo /$$x; done; \
-		fi; \
-		if test "x$(DEJATOOL)" = x; then :; else \
-			for x in \
-				$(DEJATOOL) \
-			; do echo /$$x.sum; echo /$$x.log; done; \
-			echo /site.exp; \
-		fi; \
-		for x in \
-			.gitignore \
-			$(GITIGNOREFILES) \
-			$(CLEANFILES) \
-			$(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \
-			$(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \
-			$(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \
-			so_locations \
-			.libs _libs \
-			$(MOSTLYCLEANFILES) \
-			"*.$(OBJEXT)" \
-			"*.lo" \
-			$(DISTCLEANFILES) \
-			$(am__CONFIG_DISTCLEAN_FILES) \
-			$(CONFIG_CLEAN_FILES) \
-			TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
-			"*.tab.c" \
-			$(MAINTAINERCLEANFILES) \
-			$(BUILT_SOURCES) \
-			$(DEPDIR) \
-			Makefile \
-			Makefile.in \
-			"*.orig" \
-			"*.rej" \
-			"*.bak" \
-			"*~" \
-			".*.sw[nop]" \
-			".dirstamp" \
-		; do echo /$$x; done; \
-	} | \
-	sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
-	sed 's@/[.]/@/@g' | \
-	LC_ALL=C sort | uniq > $@.tmp && \
-	mv $@.tmp $@;
-
-all: $(srcdir)/.gitignore gitignore-recurse-maybe
-gitignore: $(srcdir)/.gitignore gitignore-recurse
-
-gitignore-recurse-maybe:
-	@for subdir in $(DIST_SUBDIRS); do \
-	  case " $(SUBDIRS) " in \
-	    *" $$subdir "*) :;; \
-	    *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse-maybe || echo "Skipping $$subdir");; \
-	  esac; \
-	done
-gitignore-recurse:
-	@for subdir in $(DIST_SUBDIRS); do \
-	    test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir"); \
-	done
-
-maintainer-clean: gitignore-clean
-gitignore-clean:
-	-rm -f $(srcdir)/.gitignore
-
-.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/spice-protocol.pc.in b/spice-protocol.pc.in
deleted file mode 100644
index f8b2669..0000000
--- a/spice-protocol.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-includedir=@includedir@
-datadir=${prefix}/share
-
-Name: spice-protocol
-Description: SPICE protocol headers
-Version: @VERSION@
-
-Libs:
-Cflags: -I${includedir}/spice-1
diff --git a/spice/Makefile.am b/spice/Makefile.am
deleted file mode 100644
index a626eb8..0000000
--- a/spice/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-NULL =
-
-spice_protocol_includedir = $(includedir)/spice-1/spice
-
-spice_protocol_include_HEADERS =		\
-	barrier.h				\
-	controller_prot.h			\
-	end-packed.h				\
-	enums.h					\
-	foreign_menu_prot.h			\
-	ipc_ring.h				\
-	macros.h				\
-	protocol.h				\
-	qxl_dev.h				\
-	qxl_windows.h				\
-	start-packed.h				\
-	stats.h					\
-	types.h					\
-	vd_agent.h				\
-	stream-device.h				\
-	$(NULL)
-
-EXTRA_DIST = meson.build
-
--include $(top_srcdir)/git.mk
commit bbad3fb944aa09fbc4348263a33a97e33f1c5618
Author: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Date:   Tue Mar 3 09:06:04 2020 -0300

    Update spec file and ci script to use meson as default
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 73178e2..098aab0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,17 +8,11 @@ variables:
 before_script:
 - dnf install -y $DEPS_COMMON
 
-fedora-autotools:
-  script:
-    # Run with default options
-    - ./autogen.sh
-    - make
-    - make distcheck
-    - rpmlint -o "NetworkEnabled False" spice-protocol.spec
-    - rpmbuild -ta spice-protocol-*.tar.bz2
-
-fedora-meson:
+fedora:
   script:
     - 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
diff --git a/spice-protocol.spec.in b/spice-protocol.spec.in
index 49724c6..300b576 100644
--- a/spice-protocol.spec.in
+++ b/spice-protocol.spec.in
@@ -6,7 +6,7 @@ Group:          Development/Libraries
 # Main headers are BSD, controller / foreign menu are LGPL
 License:        BSD and LGPLv2+
 URL:            https://www.spice-space.org
-Source0:        https://www.spice-space.org/download/releases/%{name}-%{version}.tar.bz2
+Source0:        https://www.spice-space.org/download/releases/%{name}-%{version}.tar.xz
 BuildArch:      noarch
 
 %description
@@ -18,11 +18,11 @@ and the para-virtual graphics card QXL.
 %setup -q
 
 %build
-%configure
-make %{?_smp_mflags}
+%meson
+%meson_build
 
 %install
-make DESTDIR=%{buildroot} install
+%meson_install
 
 
 %files


More information about the Spice-commits mailing list