1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/usr/bin/make -f
PACKAGE = colortest-python
PKGDIR = $(shell pwd)/debian/$(PACKAGE)
BINDIR = $(PKGDIR)/usr/bin
ORIG = terminal-colors
URL = http://zhar.net/projects/shell/$(ORIG)
DIR = ../tmp
SAVE = $(DIR)/$(ORIG)
get-orig-source:
install -d -m 755 $(DIR)
rm -f $(SAVE)
wget -q -O $(SAVE) http://zhar.net/projects/shell/terminal-colors
@cmp $(SAVE) $(ORIG); \
status=$$? ; \
if [ "$$status" = "1" ] ; then \
echo "New upstream release downloaded: $(SAVE)"; \
ver=$$(python $(SAVE) --version | awk '{print $$1}') ; \
rm -vrf $(DIR)/$(PACKAGE)-$$ver && \
mkdir -v $(DIR)/$(PACKAGE)-$$ver && \
cp -v $(SAVE) $(DIR)/$(PACKAGE)-$$ver && \
(cd $(DIR) && tar -zcvf $(PACKAGE)-$$ver.tar.gz $(PACKAGE)-$$ver ); \
echo "Done $(DIR)/$(PACKAGE)-$$ver.tar.gz"; \
else \
echo "Up to date"; \
fi
man:
$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) makeman
override_dh_auto_install: man
install -m 755 -D $(ORIG) $(BINDIR)/$(PACKAGE)
%:
dh $@ --with python2
.PHONY: man get-orig-source build build-indep build-arch
# End of file
|