cvsdist 32b7b0
# Makefile for source rpm: elfutils
cvsdist 32b7b0
# $Id$
cvsdist 32b7b0
NAME := elfutils
roland 9136b0
SPECFILE = elfutils.spec
cvsdist 32b7b0
cvsdist 32b7b0
include ../common/Makefile.common
roland 5fa386
roland 7fc6b9
MONOTONE = monotone
roland c579df
roland c579df
elfutils-portability.patch: elfutils-$(VERSION).tar.gz
roland c579df
	@rm -rf elfutils-master elfutils-portable
roland 7fc6b9
	$(MONOTONE) checkout -b com.redhat.elfutils elfutils-master
roland 7fc6b9
	$(MONOTONE) checkout -b com.redhat.elfutils.portable elfutils-portable
roland 7fc6b9
	cd elfutils-master; autoreconf; rm -rf autom4te.cache MT
roland 7fc6b9
	cd elfutils-portable; autoreconf; rm -rf autom4te.cache MT
roland c579df
	diff -rpu elfutils-master elfutils-portable | \
roland 570047
	filterdiff --remove-timestamps --strip=1 --addprefix=elfutils/ > $@.new
roland 5fa386
	mv $@.new $@
roland a0b693
roland a0b693
elfutils-portable.spec: elfutils.spec
roland a0b693
	(echo '%define _with_compat 1'; cat $<) > $@.new
roland a0b693
	mv -f $@.new $@
roland a0b693
roland 7d6f19
portable-vr = $(VERSION)-0.$(RELEASE)
roland 7d6f19
portable.srpm = elfutils-$(portable-vr).src.rpm
roland e96d24
$(portable.srpm): elfutils-portable.spec elfutils-portability.patch \
roland e96d24
		  elfutils-$(VERSION).tar.gz
roland a0b693
	$(RPM_WITH_DIRS) --nodeps -bs $<
roland 7d6f19
roland 3025be
portable-srpm: $(portable.srpm)
roland 3025be
roland 7d6f19
portable-dist = 3.0E-scratch
roland 7d6f19
portable-beehive = $(redhat)/dist/$(portable-dist)/elfutils/$(portable-vr)
roland 7d6f19
roland 7d6f19
ifeq (,$(wildcard /mnt/redhat/dist/.))
roland 7d6f19
redhat = datadump.devel.redhat.com::redhat
roland 7d6f19
rsync-to = devserv.devel.redhat.com:dist/elfutils/devel/systemtap-dist/
roland 7d6f19
beehive-dep =
roland 7d6f19
else
roland 7d6f19
redhat = /mnt/redhat
roland 7d6f19
$(portable-beehive): $(portable.srpm)
roland 7d6f19
	$(BHC_CLIENT) $(BHC_FLAGS) dist-$(portable-dist) $<
roland 7d6f19
rsync-to = $(public)
roland 7d6f19
beehive-dep = $(portable-beehive)
roland 7d6f19
portable-build: $(portable-beehive)
roland 7d6f19
endif
roland 7d6f19
roland 7d6f19
dist-files = README.elfutils systemtap-elfutils.repo \
roland 7d6f19
	     elfutils-$(VERSION).tar.gz elfutils-portability.patch
roland 7d6f19
rsync-files = --exclude=tests $(portable-beehive)/
roland 7d6f19
public = sources.redhat.com:/sourceware/ftp/anonftp/pub/systemtap/elfutils/
roland 7d6f19
roland 7d6f19
RSYNC = RSYNC_RSH=ssh rsync
roland 7d6f19
roland 7d6f19
systemtap-dist: $(beehive-dep) $(dist-files)
roland 7d6f19
	@mkdir -p $@
roland f212e3
	$(RSYNC) -a --delete --progress -v $(rsync-files) systemtap-dist/
roland 7d6f19
	ln $(dist-files) systemtap-dist/
roland 7d6f19
roland 7d6f19
systemtap-dist-createrepo: systemtap-dist
roland 7d6f19
ifneq ($(wildcard /usr/bin/createrepo),)
roland 7d6f19
	createrepo -q $<
roland 7d6f19
endif
roland 7d6f19
roland 7d6f19
systemtap-sync: systemtap-dist-createrepo
roland f212e3
	$(RSYNC) -az --delete --progress -v systemtap-dist/ $(rsync-to)