File: rules

package info (click to toggle)
python-schema-salad 2.2.20170111180227-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,168 kB
  • ctags: 213
  • sloc: python: 2,991; makefile: 138
file content (28 lines) | stat: -rwxr-xr-x 865 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

DH_VERBOSE := 1

DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')

export PYBUILD_NAME=schema-salad
export PYBUILD_DISABLE=test

%:
	dh $@ --with python2 --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. help2man --no-info \
		   --version-string=${VERSION} \
		   --no-discard-stderr \
		--name="Schema Annotations for Linked Avro Data (SALAD)" \
		python2\ -m\ schema_salad > debian/schema-salad-tool.1
	sed -i 's/python2 -m schema_salad/schema-salad-tool/g' \
		debian/schema-salad-tool.1
	sed -i 's/__main__.py/schema-salad-tool/g' debian/schema-salad-tool.1
	sed -i 's/PYTHON/SCHEMA-SALAD-TOOL/g' debian/schema-salad-tool.1
	find . -name "*.coverage" -delete

override_dh_auto_clean:
	rm -f debian/*.1