Jim Meyering
2008-Sep-12 16:00 UTC
[Ovirt-devel] [PATCH appliance] restore envvar-controlled RPM_FLAGS additions
* Makefile.am: Restore the code to append to RPM_FLAGS. These were mistakenly removed by the previous commit. --- Thanks to Perry Myers for spotting this. Testing it now... Makefile.am | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/Makefile.am b/Makefile.am index b59086a..8fbba56 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,3 +35,20 @@ pkg_name = $(PACKAGE_NAME) tar: dist mkdir -p rpm-build/BUILDROOT cp version $(distdir).tar.gz rpm-build + +# FEDORA_URL env var can be set to the root of a fedora mirror +# OVIRT_URL env var can be set to the root of an ovirt.org mirror +# SKIP_COMPRESS_IMAGE env var an be set to 1 to skip qcow compression +# that contains the install tree + +ifdef SKIP_COMPRESS_IMAGE +RPM_FLAGS += --define "skip_compress_image 1" +endif + +ifdef FEDORA_URL +RPM_FLAGS += --define "fedora_url $(FEDORA_URL)" +endif + +ifdef OVIRT_URL +RPM_FLAGS += --define "ovirt_url $(OVIRT_URL)" +endif -- 1.6.0.1.308.gede4c
Jim Meyering
2008-Sep-12 20:39 UTC
[Ovirt-devel] [PATCH appliance] restore envvar-controlled RPM_FLAGS additions
Jim Meyering <jim at meyering.net> wrote:> * Makefile.am: Restore the code to append to RPM_FLAGS. > These were mistakenly removed by the previous commit. > --- > Thanks to Perry Myers for spotting this. > Testing it now...That test didn't work at all. GNU make-style "ifdef" doesn't work with automake. The following does it in equivalent shell code just prior to running rpmbuild. I verified that "make ... build" passes, but haven't tried setting any of those variables.>From 33840f85f5f739dcffa3b387951ee02fd501188b Mon Sep 17 00:00:00 2001From: Jim Meyering <meyering at redhat.com> Date: Fri, 12 Sep 2008 22:35:46 +0200 Subject: [PATCH appliance] restore envvar-controlled rpm option additions: FEDORA_URL, OVIRT_URL, SKIP_COMPRESS_IMAGE --- release.mk | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/release.mk b/release.mk index 7d9ddd0..d63d53c 100644 --- a/release.mk +++ b/release.mk @@ -1,5 +1,5 @@ # Release/version-related Makefile variables and rules. -# It expects the including Makefile to define the "pkg_name" +# It expects the including Makefile to define the "pkg_name" # variable, as well as a file named "version" in the current directory. srcdir ?= . @@ -43,8 +43,20 @@ setversion: new-rpms: bumprelease rpms +# FEDORA_URL env var can be set to the root of a fedora mirror +# OVIRT_URL env var can be set to the root of an ovirt.org mirror +# SKIP_COMPRESS_IMAGE env var an be set to 1 to skip qcow compression +# that contains the install tree + rpms: tar - rpmbuild $(RPM_FLAGS) -ba $(SPEC_FILE) + v=; \ + test 'x$(SKIP_COMPRESS_IMAGE)' != x \ + && v="--define 'skip_compress_image 1'"; \ + test 'x$(FEDORA_URL)' != x \ + && v="$$v --define 'fedora_url $(FEDORA_URL)'"; \ + test 'x$(OVIRT_URL)' != x \ + && v="$$v --define 'ovirt_url $(OVIRT_URL)'"; \ + rpmbuild $(RPM_FLAGS) $$v -ba $(SPEC_FILE) publish: rpms rm -f $(OVIRT_CACHE_DIR)/ovirt/$(pkg_name)* -- 1.6.0.1.308.gede4c