7485d5c
# Makefile for source rpm: frysk
0857fc7
# $Id: Makefile,v 1.6 2009/11/25 23:16:30 notting Exp $
7485d5c
NAME := frysk
7485d5c
SPECFILE = $(firstword $(wildcard *.spec))
7485d5c
7485d5c
define find-makefile-common
b38b55a
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
7485d5c
endef
7485d5c
7485d5c
MAKEFILE_COMMON := $(shell $(find-makefile-common))
7485d5c
7485d5c
ifeq ($(MAKEFILE_COMMON),)
7485d5c
# attempt a checkout
7485d5c
define checkout-makefile-common
7485d5c
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
7485d5c
endef
7485d5c
7485d5c
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
7485d5c
endif
7485d5c
7485d5c
include $(MAKEFILE_COMMON)
0857fc7

e889a8b
force-tag: $(SPECFILE) $(COMMON_DIR)/branches
e889a8b
	@$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)"
0857fc7
0857fc7
# Make mock usable.   The only standard target is mockbuild which
0857fc7
# doesn't do what you typically want.
0857fc7
0857fc7
mock-help help-mock:
0857fc7
	@echo "Mock targets"
0857fc7
	@echo "  mock-local mock-build: Build from scratch using mock; keep the results"
0857fc7
	@echo "  mock-shell: Start a chrooted shell in the build-chroot"
0857fc7
	@echo "  mock-init: Initialize a new clean build-chroot"
0857fc7
	@echo "  mock-clean: Purge the build-chroot" 
0857fc7
	@echo "  mock-update: Run yum update in the build-chroot"
0857fc7
	@echo "  mock-orphanskill: Kill any stray processes from the build"
0857fc7
	@echo "  mock-install PACKAGE=rpm: Install PACKAGE"
0857fc7
	@echo "  mock-installdeps PACKAGE=rpm: Install dependencies for PACKAGE"
0857fc7
	@echo "Use MOCKARGS= for extra arguments"
0857fc7
.PHONY:: mock-help help-mock
0857fc7
0857fc7
# -prep -compile -install -compile-short -install-short
0857fc7
mock-local mock-build: srpm
0857fc7
	mock --no-cleanup-after $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) --rebuild $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
0857fc7
.PHONY:: mock-local mock-build
0857fc7
0857fc7
mock-init mock-clean mock-shell mock-update mock-orphanskill:
0857fc7
	mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) --`expr $@ : 'mock-\(.*\)'`
0857fc7
.PHONY:: mock-init mock-clean mock-shell mock-update mock-orphanskill
0857fc7
0857fc7
mock-install mock-installdeps:
0857fc7
	if test x"$(PACKAGE)" = x ; then echo Supply PACKAGE ; exit 1 ; fi
0857fc7
	mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) --`expr $@ : 'mock-\(.*\)'` $(PACKAGE)
0857fc7
.PHONY:: mock-install mock-installdeps