File: rules

package info (click to toggle)
python-cpuinfo 9.0.0%2Bgit20221119-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 892 kB
  • sloc: python: 11,917; makefile: 74
file content (21 lines) | stat: -rwxr-xr-x 702 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
#!/usr/bin/make -f

export PYBUILD_NAME=cpuinfo
export PYBUILD_DEST_DIR_python3=debian/python3-$(PYBUILD_NAME)
export PYBUILD_DEST_DIR_APP=debian/py-cpuinfo
ifeq ($(PYBUILD_AUTOPKGTEST),1)
# Set things up so that test_cli uses the installed packages.
export PYBUILD_BEFORE_TEST=\
	mkdir -p {build_dir}/cpuinfo && \
	ln -s /usr/bin/py-cpuinfo {build_dir}/cpuinfo/cpuinfo.py
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/cpuinfo
endif

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	# Move the python3 application to the application package.
	mkdir -p $(PYBUILD_DEST_DIR_APP)/usr/bin
	mv $(PYBUILD_DEST_DIR_python3)/usr/bin/cpuinfo $(PYBUILD_DEST_DIR_APP)/usr/bin/py-cpuinfo