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
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
ifneq (,$(filter $(DEB_BUILD_ARCH),arm64 armel armhf mips mips64el mipsel hppa kfreebsd-amd64 kfreebsd-i386 sparc64))
CACHE_FLAG = --with-memhinfo=L2:4/64/512K,L1:8/64/24K
else
CACHE_FLAG =
endif
ifneq (,$(filter $(DEB_BUILD_ARCH),arm64 armel i386))
PARALLEL_FLAG = --no-parallel
else
PARALLEL_FLAG = --parallel
endif
export DEB_CFLAGS_MAINT_APPEND = -O3
%:
dh $@ $(PARALLEL_FLAG)
override_dh_auto_configure:
dh_auto_configure -- \
$(CACHE_FLAG) \
--with-hwloc \
--enable-matrix-types=blas \
--with-zlib=-lz \
--enable-doc-build \
--enable-fortran-module-install \
--enable-extra-patches \
--enable-pkg-config-install \
--disable-extra-patches \
--prefix=/usr
override_dh_auto_build:
dh_auto_build
rm -f doc/html/jquery.js
ln -s /usr/share/javascript/jquery/jquery.js doc/html/jquery.js
override_dh_auto_install:
dh_auto_install
sed -i -e 's/\\\(leftarrow\|alpha\)/\\\\\1/g' debian/tmp/usr/share/man/man3/*.h.3
sed -i -e 's/\\n$$//g' debian/tmp/usr/share/man/man3/rsb.h.3
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
make qtests
(cd debian ; \
gcc $(CPPFLAGS) $(CFLAGS) -o rsb127_bugfix -I.. rsb127_bugfix.c $(LDFLAGS) -L../.libs -lrsb; \
LD_LIBRARY_PATH=../.libs ./rsb127_bugfix )
endif
execute_before_dh_auto_clean:
[ ! -f Makefile ] || make cleanall
[ ! -f Makefile ] || make realclean
|