File: rules

package info (click to toggle)
starpy 1.0.1.0.git.20151124-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 416 kB
  • ctags: 554
  • sloc: python: 2,966; makefile: 17
file content (23 lines) | stat: -rwxr-xr-x 774 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/make -f

DEBVERSION:=$(shell dpkg-parsechangelog | sed -n -e 's/Version: //p')
DEB_SRC_VERSION:=$(shell echo $(DEBVERSION) | sed -e 's/-[^-]\+$$//')
UPVERSION:=$(shell echo $(DEB_SRC_VERSION) | sed -e 's/[.~]dfsg//' -e 's/~\(\(rc\|beta\)[0-9]\)/-\1/')

FILENAME := starpy_$(DEB_SRC_VERSION).orig.tar.gz
URL := https://github.com/downloads/asterisk-org/starpy/starpy-$(UPVERSION).tar.gz

%:
	dh $@ --with python2

print-version:
	@@echo "Debian version:          $(DEBVERSION)"
	@@echo "Upstream version:        $(UPVERSION)"

get-orig-source:
	@@dh_testdir
	@@[ -d ../tarballs/. ] || mkdir -p ../tarballs
	@@if [ ! -f ../tarballs/$(FILENAME) ]; then \
		echo Downloading $(FILENAME) from $(URL) ...; \
		wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL); \
	fi