Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (27 sloc) 0.877 kB
ifdef B_BASE
include $(B_BASE)/common.mk
include $(B_BASE)/rpmbuild.mk
REPO=$(call git_loc,xen-api-libs)
else
MY_OUTPUT_DIR ?= $(CURDIR)/output
MY_OBJ_DIR ?= $(CURDIR)/obj
REPO ?= $(CURDIR)
RPM_SPECSDIR?=$(shell rpm --eval='%_specdir')
RPM_SRPMSDIR?=$(shell rpm --eval='%_srcrpmdir')
RPM_SOURCESDIR?=$(shell rpm --eval='%_sourcedir')
RPMBUILD=rpmbuild
endif
.PHONY: xapi-libs.spec
xapi-libs.spec: xapi-libs.spec.in
sed -e 's/@RPM_RELEASE@/$(shell git rev-list HEAD | wc -l)/g' < $< > $@
.PHONY: srpm
srpm: xapi-libs.spec
mkdir -p $(RPM_SOURCESDIR)
git archive --prefix=xapi-libs-0.1/ --format=tar HEAD | bzip2 -z > $(RPM_SOURCESDIR)/xapi-libs-0.1.tar.bz2 # xen-api-libs/Makefile.xcp
mkdir -p $(RPM_SPECSDIR)
cp -f xapi-libs.spec $(RPM_SPECSDIR)/
mkdir -p $(RPM_SRPMSDIR)
$(RPMBUILD) -bs --nodeps xapi-libs.spec
.PHONY: rpm
rpm: srpm
$(RPMBUILD) -bb xapi-libs.spec
Jump to Line
Something went wrong with that request. Please try again.