From: Jonathan Ludlam Date: Sat, 23 Oct 2010 20:00:44 +0000 (+0100) Subject: Some fixes to ensure that the SRPM of xapi-libs builds using mock X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;p=xcp%2Fxen-api-libs.git Some fixes to ensure that the SRPM of xapi-libs builds using mock Signed-off-by: Jon Ludlam --- diff --git a/close-and-exec/Makefile b/close-and-exec/Makefile index 0834d71..6760a7c 100644 --- a/close-and-exec/Makefile +++ b/close-and-exec/Makefile @@ -1,4 +1,4 @@ -IPROG=install -m 755 -o root -g root +IPROG=install -m 755 CC = gcc CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml OCAMLC = ocamlc -g diff --git a/forking_executioner/Makefile b/forking_executioner/Makefile index 7b6584e..9856afd 100644 --- a/forking_executioner/Makefile +++ b/forking_executioner/Makefile @@ -1,4 +1,4 @@ -IPROG=install -m 755 -o root -g root +IPROG=install -m 755 CC = gcc CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml OCAMLC = ocamlc -g @@ -6,8 +6,8 @@ OCAMLOPT = ocamlopt LDFLAGS = -cclib -L./ -LIBEXEC = "/opt/xensource/libexec" -INIT_D = "/etc/rc.d/init.d" +LIBEXEC = /opt/xensource/libexec +INIT_D = /etc/rc.d/init.d VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) OCAMLOPTFLAGS = -g -dtypes diff --git a/mk/Makefile b/mk/Makefile index e0b9806..525b27c 100644 --- a/mk/Makefile +++ b/mk/Makefile @@ -21,7 +21,7 @@ build: srpm $(MY_SOURCES)/MANIFEST srpm: mkdir -p $(RPM_SRPMSDIR) $(RPM_SPECSDIR) $(RPM_SOURCESDIR) $(RPM_RPMSDIR) hg archive -p xapi-libs-0 -t tbz2 $(RPM_SOURCESDIR)/xapi-libs-0.tar.bz2 - install -o root -g root ../xapi-libs.spec $(RPM_SPECSDIR) + install ../xapi-libs.spec $(RPM_SPECSDIR) $(RPMBUILD) --target $(DOMAIN0_ARCH_OPTIMIZED) -bs $(RPM_SPECSDIR)/xapi-libs.spec $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) diff --git a/pciutil/Makefile b/pciutil/Makefile index f05b29e..ac88892 100644 --- a/pciutil/Makefile +++ b/pciutil/Makefile @@ -1,4 +1,4 @@ -IPROG=install -m 755 -o root -g root +IPROG=install -m 755 CC = gcc CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml OCAMLC = ocamlc -g diff --git a/sexpr/Makefile b/sexpr/Makefile index 69db4ee..0c56227 100644 --- a/sexpr/Makefile +++ b/sexpr/Makefile @@ -1,4 +1,4 @@ -IPROG=install -m 755 -o root -g root +IPROG=install -m 755 CC = gcc CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml OCAMLC = ocamlc -g diff --git a/stdext/Makefile b/stdext/Makefile index 444bd19..596257e 100644 --- a/stdext/Makefile +++ b/stdext/Makefile @@ -1,4 +1,4 @@ -IPROG=install -m 755 -o root -g root +IPROG=install -m 755 CC = gcc OCAMLLOC := $(shell ocamlc -where) CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -I$(OCAMLLOC) diff --git a/xapi-libs.spec b/xapi-libs.spec index 2d36f48..320351f 100644 --- a/xapi-libs.spec +++ b/xapi-libs.spec @@ -11,6 +11,7 @@ License: LGPL+linking exception URL: http://www.xen.org Source0: xapi-libs-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: ocaml, ocaml-findlib, ocaml-camlp4, ocaml-type-conv, ocaml-getopt, ocaml-xmlm, ocaml-xmlm-devel, autoconf, automake, xen-devel, blktap-devel, e2fsprogs-devel %description The xapi toolstack development libraries and tools. diff --git a/xml-light2/Makefile b/xml-light2/Makefile index ee44646..26e748b 100644 --- a/xml-light2/Makefile +++ b/xml-light2/Makefile @@ -1,4 +1,4 @@ -IPROG=install -m 755 -o root -g root +IPROG=install -m 755 OCAMLPACKS = xmlm CC = gcc