# If you have several packages files:
# PACKAGES=/somewhere/Packages-main,/somewhere/Packages-contrib,/somewhere/Packages-nonfree
PACKAGES=/somewhere/Packages
TARBALL=/var/tmp/lists.tar
DIRECTORIES=master2files new_root_home/profiles new_root_home/tasks
TARGETS=../new_root_home/profiles ../new_root_home/tasks
FILESPRODUCED=../new_root_home/profiles/* ../new_root_home/tasks/*

architecture=$(shell dpkg --print-architecture)

all: build

build: master
	slice master
	./master2files ${architecture} ${PACKAGES}
	touch build

tarball:
	(cd ..; \
	tar cvf ${TARBALL} ${DIRECTORIES}; \
	gzip -9 -f -v ${TARBALL})

clean:
	-rm -f master.*
	-rm -f build
	-rm -f ${FILESPRODUCED}
	-rmdir ${TARGETS}











