# Build an RPM for igaelic
# 
# Copyright (C) 2002 Alastair McKinstry, <mckinstry@computer.org>
# Released under the GPL; see file COPYING for details.
#
#

VERSION=0.5
TARFILE=igaelic_${VERSION}.orig.tar.gz


ifndef RPM_SOURCE_DIR
RPM_SOURCE_DIR=/usr/src/rpm/SOURCES
endif


rpm: igaelic.spec ../../${TARFILE}
	cp ../../${TARFILE} ${RPM_SOURCE_DIR}
	rpm -ba -vv igaelic.spec

clean:
	rm -f *~ *# *.log *.spec

igaelic.spec: igaelic.spec.sed
	sed 's/@VERSION@/${VERSION}/' < $< > $@

# if the Debian-style tarfile doesn't exist, build it
../../${TARFILE}:
	( cd ../.. ; tar zcpf ${TARFILE} igaelic-${VERSION} )
