File: rules

package info (click to toggle)
libtommath 1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,248 kB
  • ctags: 1,707
  • sloc: ansic: 15,034; perl: 400; makefile: 278; sh: 169; asm: 30
file content (43 lines) | stat: -rwxr-xr-x 1,116 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

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  IGNORE_SPEED=yes
  export IGNORE_SPEED
endif

# https://wiki.debian.org/HardeningWalkthrough#Selecting_security_hardening_options
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

# see https://wiki.debian.org/Multiarch/Implementation
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export LIBPATH = /usr/lib/$(DEB_HOST_MULTIARCH)

%:
	dh $@

build: build-arch build-indep

build-arch:
	$(MAKE) -f makefile.shared

build-indep:
	$(MAKE) manual docs DESTDIR=$(CURDIR)/debian/tmp

override_dh_auto_install:
	$(MAKE) -f makefile.shared INSTALL_GROUP=root DESTDIR=$(CURDIR)/debian/tmp install

# Override if not processing -docs
ifeq (,$(findstring libtommath-docs, $(shell dh_listpackages)))
override_dh_install:
	dh_install --sourcedir=debian/tmp
endif

override_dh_clean:
	dh_clean tommath.out

override_dh_installchangelogs:
	dh_installchangelogs changes.txt