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