File: rules

package info (click to toggle)
scgi 1.13-1.1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 292 kB
  • ctags: 308
  • sloc: ansic: 1,379; python: 395; makefile: 71
file content (77 lines) | stat: -rwxr-xr-x 1,389 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
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f

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

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif


# sanitize path to avoid using locally installed versions
export PATH=/bin:/usr/bin

PYVERS=$(shell pyversions -vs)

APACHE2_SCGI=debian/libapache2-mod-scgi

build: build-apache $(PYVERS:%=build-python%)

build-arch build-indep: build

build-apache:
	(cd apache2 && $(MAKE) all)


build-python%:
	python$* setup.py build


clean:
	dh_testdir
	dh_testroot
	rm -rf build scgi/*.pyc
	-(cd apache2 && $(MAKE) clean)
	dh_clean


install: build $(PYVERS:%=install-python%)
	dh_testdir
	dh_testroot
	#dh_clean -k
	dh_installdirs
	dh_installdocs
	dh_installexamples -ppython-scgi
	dh_installman
	dh_installchangelogs CHANGES.txt
	dh_apache2

install-python%:
	python$* setup.py install --root $(CURDIR)/debian/python-scgi --install-layout=deb


# Build architecture-independent files
binary-indep: build install


# Build architecture-dependent files
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_link
	dh_strip
	dh_compress
	dh_python2
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install