# Makefile for debian packaging

PKG = axyl-lucene

ifndef CHECK
export CHECK = yes
all: build-dep debian tarball
else
all: debian tarball
endif

clean:
	rm -f build-stamp*
	rm -f debian/files
	rm -f debian/*debhelper
	rm -f debian/*.substvars
	rm -rf debian/$(PKG)
	touch build-stamp

build-dep:
	./build-dep.sh
	$(MAKE)

repository: debian
	./build-repository.sh

debian:	build-stamp-debian

tarball: build-stamp-tarball

build-stamp-debian: build-stamp
	./build-debian.sh
	touch build-stamp-debian

build-stamp-tarball: build-stamp-debian
	./build-tarball.sh
	touch build-stamp-tarball

.PHONY: clean build-dep debian tarball repository
