File: rules

package info (click to toggle)
con-duct 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 584 kB
  • sloc: python: 4,324; sh: 22; makefile: 18
file content (24 lines) | stat: -rwxr-xr-x 779 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
24
#! /usr/bin/make -f

export PYBUILD_NAME=con-duct
export PYBUILD_BEFORE_TEST=chmod +x {dir}/test/data/spawn_children.sh

export VERSION:=(shell dpkg-parsechangelog -S Version | sed 's/-[^-]*$//')

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

override_dh_installman: build/duct.1
	dh_installman

build/duct.1:
	: # Generate a manpage using help2man
	mkdir -p build
	cp -p src/con_duct/__main__.py build/duct
	sed -i "s|^__version__ *= *version(\"con-duct\")|__version__ = \"$VERSION\"|" build/duct
	help2man --no-info --no-discard-stderr \
		-n "lightweight wrapper that collects execution data for a command" \
		./build/duct >| build/duct.1
	rm -f build/duct
	: # Verify that manpage generated nicely -- no Errors reported
	grep -q 'ImportError:' build/duct.1 && exit 1 || :