[PATCH spice-protocol v4 3/5] build-sys: Provide spec file during build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having the RPM spec file produced by the build is helpful in
different situation. Different tools like mock or code
scanners accept source RPMs as input.
Providing this file allows easily build of the source RPM (and
binaries) using a simple command like

  $ rpmbuild -ta spice-protocol-XXXX.tar.bz2

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
--
Changes since v3:
- add gitlab ci from Victor
---
 .gitlab-ci.yml         | 4 +++-
 Makefile.am            | 1 +
 configure.ac           | 1 +
 spice-protocol.spec.in | 3 ++-
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b3fad64..a20776e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,7 +3,7 @@ image: fedora:latest
 variables:
   DEPS_COMMON: git libtool make python3 python3-six redhat-rpm-config
                python3-pyparsing meson ninja-build gtk-doc glib2-devel
-               gettext gettext-devel bzip2
+               gettext gettext-devel bzip2 rpmlint rpm-build python-unversioned-command
 
 before_script:
 - dnf install -y $DEPS_COMMON
@@ -14,6 +14,8 @@ fedora-autotools:
     - ./autogen.sh
     - make
     - make distcheck
+    - rpmlint -o "NetworkEnabled False" spice-protocol.spec
+    - rpmbuild -ta spice-protocol-*.tar.bz2
 
 fedora-meson:
   script:
diff --git a/Makefile.am b/Makefile.am
index db2d5ba..c5b9787 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,7 @@ MAINTAINERCLEANFILES =						\
 EXTRA_DIST =							\
 	README.md						\
 	CHANGELOG.md						\
+	spice-protocol.spec					\
 	meson.build
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index bc3e33f..2adcb7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,4 +18,5 @@ AC_OUTPUT([
 Makefile
 spice-protocol.pc
 spice/Makefile
+spice-protocol.spec
 ])
diff --git a/spice-protocol.spec.in b/spice-protocol.spec.in
index e240637..49724c6 100644
--- a/spice-protocol.spec.in
+++ b/spice-protocol.spec.in
@@ -1,7 +1,8 @@
 Name:           spice-protocol
-Version:        0.14.0
+Version:        @VERSION@
 Release:        1%{?dist}
 Summary:        Spice protocol header files
+Group:          Development/Libraries
 # Main headers are BSD, controller / foreign menu are LGPL
 License:        BSD and LGPLv2+
 URL:            https://www.spice-space.org
-- 
2.21.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]