File: rules

package info (click to toggle)
libquantum 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,128 kB
  • sloc: sh: 7,711; ansic: 3,262; makefile: 243
file content (43 lines) | stat: -rwxr-xr-x 1,434 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
#!/usr/bin/make -f

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS

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

%:
	dh $@ --parallel

override_dh_auto_configure:
	[ -f config.guess.orig ] || mv -f config.guess config.guess.orig
	[ -f config.sub.orig ] || mv -f config.sub config.sub.orig
	ln -sf /usr/share/misc/config.guess config.guess
	ln -sf /usr/share/misc/config.sub config.sub
	CFLAGS="$(CFLAGS)" ./configure \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
		--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info

override_dh_auto_clean:
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	[ ! -f config.guess.orig ] || mv -f config.guess.orig config.guess
	[ ! -f config.sub.orig ] || mv -f config.sub.orig config.sub
	rm -f build-stamp configure-stamp

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/

override_dh_installchangelogs:
	dh_installchangelogs CHANGES

.PHONY: override_dh_strip
override_dh_strip:
	dh_strip

get-orig-source:
	uscan --noconf --verbose --force-download --rename --download-current-version --destdir=..