VERSION = $(shell dpkg-parsechangelog | sed -n 's/^Version: //p') DIST = $(shell dpkg-parsechangelog | sed -n 's/^Distribution: //p') REDMINE = https://redmine.auf.org PROJECT = modeles-openoffice HEADERS = #HEADERS = --header='Pragma: no-cache' all: build .download_stamp: mkdir -p downloads cd downloads ; \ wget -O- $(HEADERS) $(REDMINE)/projects/$(PROJECT)/files \ | sed -n '/class="filename"/s/^.*href="\([^"]*\)".*$$/\1/p' \ | while read path ; do wget -N $(HEADERS) $(REDMINE)$$path ; done touch .download_stamp build: .download_stamp install: cd downloads ; for file in * ; do \ install -m 0644 $$file $(DESTDIR)/usr/share/modeles-openoffice/AuF/ \ ; done clean: mrproper: rm -rf .download_stamp downloads test: debuild -I.git -I*.ex -b -us -uc && sudo debi release: debuild -I.git -I*.ex -tc && debrelease --dput $(DIST)-test