File: rules

package info (click to toggle)
xbuffy 3.3.bl.3.dfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 1,204 kB
  • ctags: 1,497
  • sloc: ansic: 2,900; sh: 175; makefile: 147
file content (95 lines) | stat: -rwxr-xr-x 2,170 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

ifeq ($(DEB_HOST_ARCH_OS), linux)
	led = --enable-led
else
	led =
endif


ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

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

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
	hostoptions = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
else
	hostoptions = --build=$(DEB_BUILD_GNU_TYPE)
endif

CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

CFLAGS += -Wall
LDFLAGS += -Wl,-z,defs

config.status: configure.in Makefile.in
	dh_testdir
	autoheader
	autoconf
	./configure --prefix=/usr --sysconfdir=/etc --enable-nntp $(led) \
		--mandir=/usr/share/man \
		--x-includes="" --x-libraries="" \
		$(hostoptions) \
		CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' \
	|| ( echo configure failed with $$? ; echo BEGIN config.log: ; \
	     cat config.log ; echo "END config.log" ; exit 1 )

build: build-arch-stamp
build-arch: build-arch-stamp
build-indep:
build-arch-stamp: config.status
	dh_testdir
	$(MAKE)
	touch build-arch-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-arch-stamp
	if [ -e config.status ] ; then $(MAKE) distclean ; fi
	test ! -e config.status
	test ! -e Makefile
	if [ -e config.h.in ] ; then rm configure config.h.in ; fi
	test ! -e configure
	test ! -e config.h.in
	dh_clean

binary-indep:
# We have nothing to do.

binary-arch: build-arch-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	$(MAKE) install DESTDIR=$(CURDIR)/debian/xbuffy

	dh_install
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installchangelogs CHANGES
	dh_installman
	dh_strip
	dh_compress
	dh_fixperms

	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 clean