File: rules

package info (click to toggle)
tevent 0.10.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,364 kB
  • sloc: python: 34,079; ansic: 21,389; xml: 812; sh: 209; makefile: 157
file content (56 lines) | stat: -rwxr-xr-x 1,346 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
#!/usr/bin/make -f

# Export CC and PKGCONFIG for waf
-include /usr/share/dpkg/buildtools.mk
export CC
PKG_CONFIG ?= pkg-config
export PKGCONFIG=${PKG_CONFIG}

CFLAGS = -g -Wall

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

LDFLAGS += -Wl,--as-needed

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_auto_configure:
	CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --bundled-libraries=NONE \
		   --disable-rpath --disable-rpath-install --disable-python \
		   --minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)" \
		   --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build:
	$(MAKE) all

get-packaged-orig-source:
	./debian/build-orig.sh

override_dh_auto_clean:
	-./buildtools/bin/waf clean
	rm -rf buildtools/wafsamba/*.pyc \
		buildtools/wafsamba/__pycache__ \
		third_party/waf/wafadmin/*.pyc \
		third_party/waf/wafadmin/Tools/*.pyc \
		third_party/waf/waflib/Tools/__pycache__ \
		third_party/waf/waflib/__pycache__ \
		third_party/waf/waflib/extras/__pycache__
	rm -rf bin
	rm -f .lock-wscript libtevent.a

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(DESTDIR)
	ar cr libtevent.a bin/default/*.o
	cp libtevent.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_makeshlibs:
	dh_makeshlibs -- -c4