MD5SUM = md5sum
SED = sed
-SPECFILE = kernel-2.6-planetlab.spec
+SPECFILE = kernel-2.6.spec
+
+# Thierry - when called from within the build, PWD is /build
+PWD=$(shell pwd)
# get nevr from specfile.
ifndef NAME
sources: $(SOURCEFILES) $(TARGETS)
$(SOURCEFILES): #FORCE
- @if [ ! -e "$@" ] ; then $(CLIENT) $(get_sources_url) ; fi
+ @if [ ! -e "$@" ] ; then echo "$(CLIENT) $(get_sources_url)" ; $(CLIENT) $(get_sources_url) ; fi
@if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi
@if test "$$(md5sum $@ | awk '{print $$1}')" != "$(get_sources_md5)" ; then \
echo "md5sum of the downloaded $@ does not match the one from 'sources' file" ; \
TARGET ?= $(shell uname -m)
rpm: sources
rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
+
+clean:
+ rm -f *.rpm