File: rules

package info (click to toggle)
python-gpyconf 0.2-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 416 kB
  • ctags: 590
  • sloc: python: 1,980; makefile: 87; sh: 4
file content (23 lines) | stat: -rwxr-xr-x 899 bytes parent folder | download
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

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

SOURCE_PACKAGE = $(shell dpkg-parsechangelog|sed -n '/^Source/{s/Source: \(.*\)/\1/p}')
MAIN_VERSION = $(shell dpkg-parsechangelog|sed -n '/^Version/{s/Version: \(.*\)/\1/p}')
VER = $(shell echo $(MAIN_VERSION)|sed -n 's/\([0-9.]*\)[-+].*/\1/p')

get-orig-source:
	dh_testdir
	mkdir -p ../tarballs
	uscan --force-download --rename --destdir ../tarballs

get-git-source:
	dh_testdir
	rm -rfv .upstream ../$(SOURCE_PACKAGE)_$(VER).orig.tar.bz2
	mkdir .upstream
	mkdir -p ../tarballs
	cd .upstream && git clone git://github.com/jonashaag/gpyconf --depth 1 $(SOURCE_PACKAGE)-$(VER)
	find .upstream -type f | while read F; do chmod -x "$$F"; done
	cd .upstream && tar --exclude .git -jvcf ../../tarballs/$(SOURCE_PACKAGE)_$(VER).orig.tar.bz2 $(SOURCE_PACKAGE)-$(VER)
	rm -rfv .upstream