File: rules

package info (click to toggle)
libxcb 1.6-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,336 kB
  • ctags: 533
  • sloc: sh: 10,134; ansic: 2,314; python: 852; makefile: 373; perl: 85
file content (88 lines) | stat: -rwxr-xr-x 2,006 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
#!/usr/bin/make -f

CFLAGS = -g
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
# XXX make check fails with -j, so disable for now
#ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
#	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
#	MAKEFLAGS += -j$(NUMJOBS)
#endif

DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)

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

configure:
	autoreconf -vfi

$(DEB_BUILDDIR)/config.status: configure
	mkdir -p $(DEB_BUILDDIR)
	cd $(DEB_BUILDDIR) && \
	../configure \
		$(confflags) \
		--prefix=/usr \
		CFLAGS="$(CFLAGS)"

override_dh_auto_configure: $(DEB_BUILDDIR)/config.status

check:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C $(DEB_BUILDDIR) check
endif

override_dh_auto_test: check

.PHONY: build
build:
	dh $@

build-stamp:
	$(MAKE) -C $(DEB_BUILDDIR)
	>$@

override_dh_auto_build: build-stamp

.PHONY: install
install: build-stamp
	$(MAKE) -C $(DEB_BUILDDIR) install DESTDIR=$(CURDIR)/debian/tmp

override_dh_auto_install: install

override_dh_strip:
	set -e; \
	for pkg in $$(grep-dctrl -n -F Section libs -s Package < debian/control); do \
		dh_strip -p $$pkg --dbg-package=$${pkg}-dbg; \
	done
	dh_strip -s --remaining-packages

override_dh_makeshlibs:
	dh_makeshlibs -plibxcb1 --add-udeb=libxcb1-udeb -- -c4
	dh_makeshlibs -Nlibxcb1 -- -c4

.PHONY: binary binary-arch binary-indep
binary: binary-arch
binary-arch: debian/copyright
	dh $@

binary-indep:

debian/copyright: debian/copyright.debian COPYING
	cat $+ > $@

clean:
	dh $@
	-rm -f debian/copyright
	rm -f aclocal.m4 configure install-sh missing
	rm -f config.guess config.sub depcomp ltmain.sh src/config.h.in
	rm -f $$(find -name Makefile.in)
	rm -rf $(DEB_BUILDDIR)
	rm -f build-stamp