| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/architecture.mk |
| 4 |
|
| 5 |
ifneq (,$(filter $(DEB_HOST_ARCH), armel x32)) |
| 6 |
PLATFORM = --platform=unknown |
| 7 |
endif |
| 8 |
|
| 9 |
ifeq ($(DEB_HOST_ARCH),armhf) |
| 10 |
DEB_CFLAGS_MAINT_APPEND = -march=armv7-a+fp |
| 11 |
export DEB_CFLAGS_MAINT_APPEND |
| 12 |
endif |
| 13 |
|
| 14 |
ifeq ($(DEB_HOST_ARCH), i386) |
| 15 |
PLATFORM = --disable-sse |
| 16 |
endif |
| 17 |
|
| 18 |
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 19 |
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 20 |
else |
| 21 |
NUMJOBS = 1 |
| 22 |
endif |
| 23 |
|
| 24 |
%: |
| 25 |
dh ${@} |
| 26 |
|
| 27 |
execute_after_dh_auto_clean: |
| 28 |
# remove generated files |
| 29 |
rm -f doc/*.gz src/*.a src/*.so |
| 30 |
|
| 31 |
for FILE in $$(find . -type f -name "*.in"); \ |
| 32 |
do \ |
| 33 |
rm -f "$$(dirname "$${FILE}")"/"$$(basename "$${FILE}" .in)"; \ |
| 34 |
done |
| 35 |
|
| 36 |
override_dh_auto_configure: |
| 37 |
dh_auto_configure -- \ |
| 38 |
--prefix=/usr \ |
| 39 |
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ |
| 40 |
--includedir=/usr/include \ |
| 41 |
--mandir=/usr/share/man \ |
| 42 |
--cores=2 \ |
| 43 |
$(PLATFORM) |
| 44 |
|
| 45 |
override_dh_auto_test: |
| 46 |
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 i386)) |
| 47 |
ifneq ($(NUMJOBS), 1) |
| 48 |
$(MAKE) -j1 check |
| 49 |
endif |
| 50 |
endif |