File: rules

package info (click to toggle)
reportbug 7.5.3~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,160 kB
  • sloc: python: 8,640; sh: 51; makefile: 44; lisp: 31
file content (26 lines) | stat: -rwxr-xr-x 844 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

REPORTBUG_VERSION := $(shell python3 -c "import reportbug; print(reportbug.VERSION_NUMBER)")

%:
	dh $@ --with=python3

override_dh_auto_build:
	# Test if versions are synchronized (only if releasing); this will bomb if not synced
	if [ "$(DEB_DISTRIBUTION)" != "UNRELEASED" -a "$(REPORTBUG_VERSION)" != "$(DEB_VERSION)" ] ; \
	then \
		echo 'Please update VERSION_NUMBER variable in reportbug/__init__.py'; exit 1 ; \
	fi

	python3 setup.py build

override_dh_auto_install:
	python3 setup.py install --root $(CURDIR)/debian/reportbug --install-layout=deb
	mv $(CURDIR)/debian/reportbug/usr/lib $(CURDIR)/debian/python3-reportbug/usr
	chmod 0755 $(CURDIR)/debian/reportbug/usr/bin/*
	cp -p conf/reportbug.conf $(CURDIR)/debian/reportbug/etc

override_dh_installman:
	dh_installman man/*