File: rules

package info (click to toggle)
ranger 1.9.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,964 kB
  • sloc: python: 13,018; sh: 212; makefile: 158
file content (44 lines) | stat: -rwxr-xr-x 1,414 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/make -f

# Unset the environment variables set by dpkg-buildpackage. (This is
# necessary because distutils is brittle with compiler/linker flags
# set. Specifically, packages using f2py will break without this.)
unexport CPPFLAGS
unexport CFLAGS
unexport CXXFLAGS
unexport FFLAGS
unexport LDFLAGS

export TERM=linux
export HOME=/tmp/

%:
	dh $@ -Smakefile --with python3

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build_scripts
	rm -rf .pytest_cache
	rm -rf .pc
	rm -f install_log.txt
	find tests -regex ".*\.py[co]" -delete

override_dh_auto_build:
	:

override_dh_auto_install:
	python3 setup.py install --root=debian/ranger --install-layout=deb
	# link configuration
	dh_link \
		./usr/lib/python3/dist-packages/ranger/config/commands.py    ./etc/ranger/config/commands.py \
		./usr/lib/python3/dist-packages/ranger/config/rc.conf        ./etc/ranger/config/rc.conf     \
		./usr/lib/python3/dist-packages/ranger/config/rifle.conf     ./etc/ranger/config/rifle.conf  \
		./usr/lib/python3/dist-packages/ranger/data/scope.sh         ./etc/ranger/data/scope.sh      \
		./usr/lib/python3/dist-packages/ranger/data/mime.types       ./etc/ranger/data/mime.types
	# avoid extra-license-file
	rm debian/ranger/usr/share/doc/ranger/CHANGELOG.md
	# tell lintian to not complain
	find debian/ranger -regex ".*/data/scope.sh" -exec chmod u+x {} \;

override_dh_auto_test:
	dh_auto_test -- PYTHON=python3