File: rules

package info (click to toggle)
python-linux-procfs 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 196 kB
  • sloc: python: 793; makefile: 45; sh: 30
file content (34 lines) | stat: -rwxr-xr-x 1,050 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=linux-procfs

override_dh_auto_build:
	dh_auto_build
	a2x -d manpage -f manpage pflags.8.asciidoc
	
	# renaming pflags to avoid conflict between python and python3 versions
	cp -p pflags.8 pflags2.8
	cp -p pflags.8 pflags3.8
	cp -p pflags pflags2
	cp -p pflags pflags3
	sed -i -e 's/python3/python/' pflags2

override_dh_auto_install:
	dh_auto_install

	# Removing original binaries as now we have renamed versions
	# to avoid conflicts between python2 and python3
	# We'll put the original back with update-alternatives in postinst
	rm -f debian/python-linux-procfs/usr/bin/pflags
	rm -f debian/python3-linux-procfs/usr/bin/pflags

clean:
	dh_auto_clean --buildsystem pybuild # Cleans pybuild stuff
	dh_clean                            # Cleans asciidoc/pflags stuff
	rm -rf python_linux_procfs.egg-info # Cleans egg-info dir which
	                                    #   used underscores

%:
	dh $@ --buildsystem pybuild --with python2,python3