File: rules

package info (click to toggle)
reportbug 6.6.3%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 1,380 kB
  • sloc: python: 8,496; sh: 51; makefile: 40; lisp: 31
file content (31 lines) | stat: -rwxr-xr-x 1,144 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | sed 's/^Version: \([^+]*\).*/\1/')
DISTRO := $(shell dpkg-parsechangelog | egrep '^Distribution:' | sed 's/^Distribution: \([^+]*\).*/\1/')
REPORTBUG_VERSION := $(shell python -c "import reportbug; print reportbug.VERSION_NUMBER")

%:
	dh $@ --with=python2

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

	python setup.py build

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

	cp -p debian/desktop $(CURDIR)/debian/reportbug/usr/share/applications/reportbug.desktop

override_dh_installman:
	dh_installman man/*