File: rules

package info (click to toggle)
osc 1.12.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,536 kB
  • sloc: python: 32,700; sh: 1,845; xml: 157; makefile: 36; csh: 14
file content (40 lines) | stat: -rwxr-xr-x 1,076 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/make -f

export HOME=$(CURDIR)/debian/fake-home
export XDG_STATE_HOME =  $(HOME)/.local/state

%:
	dh $@ --with python3,bash-completion --buildsystem=pybuild

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_clean:
	# Exclude testsuite data
	dh_clean --exclude=foo.orig

execute_after_dh_auto_build:
	# This symlink is required to run the tests
	for d in .pybuild/*/build; do ln -srv doc $$d; done
	# build man page
	PYTHONPATH=. argparse-manpage \
		--output=osc.1 \
		--format=single-commands-section \
		--module=osc.commandline \
		--function=get_parser \
		--project-name=osc \
		--prog=osc \
		--description="openSUSE build service command-line tool" \
		--author="Contributors to the osc project." \
		--url="https://github.com/openSUSE/osc/"

ifneq ($(FAKEROOTKEY),)
override_dh_auto_test:
	mkdir -p $(XDG_STATE_HOME)
	LD_PRELOAD= dh_auto_test
endif

execute_before_dh_auto_install:
	# Remove symlinks to avoid installing files into
	# /usr/lib/python3/dist-packages/doc/ (#1081339)
	for d in .pybuild/*/build; do unlink $$d/doc; done