File: rules

package info (click to toggle)
python-omniorb 3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 3,128 kB
  • ctags: 3,321
  • sloc: cpp: 13,969; python: 8,883; sh: 2,576; xml: 107; makefile: 95; ansic: 35
file content (121 lines) | stat: -rwxr-xr-x 2,924 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/make -f

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

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

# CFLAGS is not honoured by the omniORB build system.
CC  ?= gcc
CXX ?= g++

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CC  += -O2
  CXX += -O2
endif

PYVERS := $(shell pyversions -vr debian/control)

CONFIGURE = \
	CC="$(CC)" CXX="$(CXX)" ../configure $(confflags) \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--with-omniorb=/usr \
		--with-openssl=/usr

autotools-update-stamp:
	cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub bin/scripts
	touch $@

build-%/config.status: autotools-update-stamp
	dh_testdir
	-mkdir build-$*
	cd build-$* && $(CONFIGURE) PYTHON=/usr/bin/python$*

dbg-build-%/config.status: autotools-update-stamp
	dh_testdir
	-mkdir build-dbg-$*
	cd build-dbg-$* && $(CONFIGURE) PYTHON=/usr/bin/python$*-dbg

build: build-arch build-indep
build-arch:	build-stamp
build-indep: build-stamp
build-stamp: $(PYVERS:%=build-stamp-%) $(PYVERS:%=build-dbg-stamp-%)
	touch $@

build-stamp-%: build-%/config.status
	dh_testdir
	$(MAKE) -C build-$*
	touch $@

build-dbg-stamp-%: dbg-build-%/config.status
	dh_testdir
	$(MAKE) -C build-dbg-$*
	touch $@

clean:
	dh_testdir
	dh_testroot
	-rm -rf build*
	-rm -f *-stamp
	find . -name "*.pyc" -delete
	-rm bin/scripts/config.guess bin/scripts/config.sub
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	set -e; \
	for v in $(PYVERS); do \
	  $(MAKE) -C build-dbg-$$v install DESTDIR=$(CURDIR)/debian/tmp; \
	  $(MAKE) -C build-$$v install DESTDIR=$(CURDIR)/debian/tmp; \
	done
	find . -name "*.pyc" -exec rm {} \;
	dh_install --sourcedir=debian/tmp --list-missing

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installexamples -i
	dh_installchangelogs update.log -i
	dh_python2 -i
	dh_link -i
	dh_compress -i -X.pdf
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installchangelogs update.log -a
	dh_python2 -a
	dh_strip -ppython-omniorb --dbg-package=python-omniorb-dbg
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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