WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-API] [PATCH 1 of 4] Query rpm to find build directories

To: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 1 of 4] Query rpm to find build directories
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 18 Nov 2010 10:50:15 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 18 Nov 2010 02:57:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1290077414@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1290077414@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.5.2
# HG changeset patch
# User root@xxxxxxxxxxxxxxxxxxxxx
# Date 1290004595 18000
# Node ID cdd93d37eb6036e9901ecc0cd1f949901ff1aea4
# Parent  3be1829b46b70a8ae4b2013fc20b71a76f3b55ee
Query rpm to find build directories.

Allows user with ~/.rpmmacros to build e.g.
$ cat ~/.rpmmacros
%_topdir        /data/rpmbuild
%_tmppath       /data/tmp

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 3be1829b46b7 -r cdd93d37eb60 Makefile.in
--- a/Makefile.in       Tue Oct 12 12:15:54 2010 +0100
+++ b/Makefile.in       Wed Nov 17 09:36:35 2010 -0500
@@ -211,8 +211,8 @@ cleanxen:
        $(MAKE) -C xsrpc clean
        $(MAKE) -C eventchn clean
 
-RPM_SPECSDIR=/usr/src/redhat/SPECS
-RPM_SOURCEDIR=/usr/src/redhat/SOURCES
+RPM_SPECSDIR=$(shell rpm --eval='%_specdir')
+RPM_SOURCEDIR=$(shell rpm --eval='%_sourcedir')
 XEN_RELEASE=xcp0.2
 
 $(RPM_SPECSDIR)/xapi-libs.spec: xapi.spec.in
diff -r 3be1829b46b7 -r cdd93d37eb60 Makefile.xcp
--- a/Makefile.xcp      Tue Oct 12 12:15:54 2010 +0100
+++ b/Makefile.xcp      Wed Nov 17 09:36:35 2010 -0500
@@ -6,9 +6,9 @@ MY_OUTPUT_DIR ?= $(CURDIR)/output
 MY_OBJ_DIR ?= $(CURDIR)/obj
 REPO ?= $(CURDIR)
 
-RPM_SPECSDIR?=/usr/src/redhat/SPECS
-RPM_SRPMSDIR?=/usr/src/redhat/SRPMS
-RPM_SOURCEDIR?=/usr/src/redhat/SOURCES
+RPM_SPECSDIR?=$(shell rpm --eval='%_specdir')
+RPM_SRPMSDIR?=$(shell rpm --eval='%_srcrpmdir')
+RPM_SOURCEDIR?=$(shell rpm --eval='%_sourcedir')
 XEN_RELEASE?=unknown
 endif
 

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>