File: rules

package info (click to toggle)
zfec 1.4.24-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 948 kB
  • ctags: 1,140
  • sloc: python: 8,051; ansic: 856; haskell: 229; makefile: 53; sh: 22
file content (65 lines) | stat: -rwxr-xr-x 1,229 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/make -f
#export DH_VERBOSE=1

PACKAGE_NAME=python-zfec
MODULE_NAME=zfec

PYVERS=$(shell pyversions -vr)
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog \
	| sed -rne 's,^Version: ([^-]+).*,\1,p')

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O0
else
  CFLAGS += -O2
endif
export CFLAGS

clean:
	dh_testdir
	dh_testroot
	rm -rf dist build build-stamp build-ext-*
	find . -name '*\.py[co]' -delete
	dh_clean install-stamp install-ext-*

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: $(PYVERS:%=build-ext-%)
	touch $@
build-ext-%:
	dh_testdir
	python$* setup.py build
	touch $@

install: install-stamp
install-stamp: build-stamp $(PYVERS:%=install-ext-%)
	touch $@
install-ext-%:
	python$* setup.py install \
		--install-layout=deb \
		--root $(CURDIR)/debian/$(PACKAGE_NAME) \
		--single-version-externally-managed
	touch $@

binary-indep:

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_python2
	dh_strip
	dh_compress -X.py
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: clean binary-indep binary-arch binary