File: rules

package info (click to toggle)
tomahawk 0.7.1-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 484 kB
  • sloc: python: 1,921; makefile: 153; sh: 3
file content (38 lines) | stat: -rwxr-xr-x 2,010 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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME=tomahawk
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir};touch {build_dir}/tests/__init__.py; touch {build_dir}/tests/internal/__init__.py; cd {build_dir}
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS={build_dir}/tests/internal

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

override_dh_python3:
	dh_python3
	mv -f $(CURDIR)/debian/python3-tomahawk/usr/bin/tomahawk $(CURDIR)/debian/python3-tomahawk/usr/bin/tomahawk3
	mv -f $(CURDIR)/debian/python3-tomahawk/usr/bin/tomahawk-rsync $(CURDIR)/debian/python3-tomahawk/usr/bin/tomahawk-rsync3
	find $(CURDIR)/debian -name tests | xargs rm -rf

override_dh_clean:
	dh_clean
	rm -f $(CURDIR)/requirements*.txt

convert_manpage_tomahawk3:
	sed 's/\"tomahawk\"/\"tomahawk3\"/g' $(CURDIR)/man/man1/tomahawk.1 > $(CURDIR)/debian/tomahawk3.1
	sed -i 's/\"TOMAHAWK\"/\"TOMAHAWK3\"/g' $(CURDIR)/debian/tomahawk3.1
	sed -i 's/tomahawk /tomahawk3 /g' $(CURDIR)/debian/tomahawk3.1
	sed -i 's/\\fBtomahawk/\\fBtomahawk3/g' $(CURDIR)/debian/tomahawk3.1
	sed -i 's/\\fItomahawk\\f/\\fItomahawk3\\f/g' $(CURDIR)/debian/tomahawk3.1
	sed -i 's/\\fItomahawk\\-rsync/\\fItomahawk\\-rsync3/g' $(CURDIR)/debian/tomahawk3.1
	sed 's/\"tomahawk\"/\"tomahawk3\"/g' $(CURDIR)/man/man1/tomahawk-rsync.1 > $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/\"TOMAHAWK-RSYNC\"/\"TOMAHAWK-RSYNC3\"/g' $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/tomahawk-rsync /tomahawk-rsync3 /g' $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/tomahawk\\-rsync /tomahawk\\-rsync3 /g' $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/\\fBtomahawk\\-rsync/\\fBtomahawk\\-rsync3/g' $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/\\fItomahawk(1)\\f/\\fItomahawk3(1)\\f/g' $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/\\fItomahawk\\f/\\fItomahawk3\\f/g' $(CURDIR)/debian/tomahawk-rsync3.1
	sed -i 's/\\fItomahawk\\-rsync/\\fItomahawk\\-rsync3/g' $(CURDIR)/debian/tomahawk-rsync3.1