# Makefile for source rpm: tidyp
NAME := tidyp
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ../../../common ../../../../common ; do if [ -f $$d/trunk/Makefile.common ] ; then if [ -f $$d/trunk/.svn -a -w $$/Makefile.common ] ; then cd $$d/trunk ; svn update --quiet ; fi ; echo "$$d/trunk/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

# Need -r epel for RHEL builds, -r base for Fedora builds
BUILD_OPTIONS = -r base
FROM_DIST = fc12
DIST_REGEX = '^(fc[0-9]*|branched|rawhide)\.'

include $(MAKEFILE_COMMON)

build :: srpm
	mb -r epel --from=rhel4 --regex=rhel -- $(MOCK_OPTIONS) $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm