File: rules

package info (click to toggle)
alglib 4.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,032 kB
  • sloc: cpp: 462,897; sh: 449; makefile: 16
file content (28 lines) | stat: -rwxr-xr-x 985 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

ifneq (,$(findstring $(DEB_HOST_ARCH), i386 mipsel hurd-i386 kfreebsd-i386 ))
    export DEB_CFLAGS_MAINT_APPEND = -ffloat-store
    export DEB_CXXFLAGS_MAINT_APPEND = -ffloat-store
endif

%:
	dh $@

# Derive upstream version from debian/changelog (e.g. 4.7.0 from 4.7.0-1~exp1)
UPSTREAM_VERSION := $(shell dpkg-parsechangelog -SVersion | sed -E 's/^[0-9]+://; s/-[^-]+$$//')
# Drop trailing .0 for SOVERSION (e.g. 4.7 from 4.7.0)
UPSTREAM_SOVERSION := $(shell echo "$(UPSTREAM_VERSION)" | sed -E 's/\.0$$//')

override_dh_auto_configure:
	dh_auto_configure -- -DVERSION="$(UPSTREAM_VERSION)" -DSOVERSION="$(UPSTREAM_SOVERSION)"

# Disable auto test for the mips platform, because it fails sometimes
# on weak machiens with timouts
disable_auto_test_archs = mips
ifneq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs)))
override_dh_auto_test:
endif