File: rules

package info (click to toggle)
python-cups 1.9.73-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 464 kB
  • ctags: 385
  • sloc: ansic: 8,863; python: 325; makefile: 59
file content (30 lines) | stat: -rwxr-xr-x 891 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
#!/usr/bin/make -f

# Stolen from cdbs, we need this.
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')

# Used during building to set the version
export CFLAGS=-DVERSION=\"$(DEB_UPSTREAM_VERSION)\"

%:
	dh $@ --buildsystem=python_distutils --with=python2,python3

override_dh_install:
	dh_install --list-missing

override_dh_auto_build:
	dh_auto_build
	set -ex; for python in $(shell py3versions -r); do \
            $$python setup.py build; \
	done;

override_dh_auto_install:
	dh_auto_install
	set -ex; for python in $(shell py3versions -r); do \
            $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
	done;

override_dh_installchangelogs:
	dh_installchangelogs -k NEWS