| 1 |
#!/usr/bin/make -f |
| 2 |
include /usr/share/dpkg/pkg-info.mk |
| 3 |
|
| 4 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 5 |
|
| 6 |
export F77 = gfortran |
| 7 |
|
| 8 |
CPPFLAGS += -DBZ_HAVE_STD |
| 9 |
|
| 10 |
BUILDDIR=_BUILD |
| 11 |
|
| 12 |
default: |
| 13 |
@uscan --no-conf --dehs --report || true |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ -with autoreconf --builddirectory=$(BUILDDIR) --no-parallel |
| 17 |
|
| 18 |
override_dh_auto_configure: |
| 19 |
dh_auto_configure -- \ |
| 20 |
--enable-maintainer-mode \ |
| 21 |
--enable-static \ |
| 22 |
--enable-shared \ |
| 23 |
--enable-debug \ |
| 24 |
--enable-64bit \ |
| 25 |
--disable-doxygen |
| 26 |
|
| 27 |
override_dh_auto_build-arch: |
| 28 |
$(MAKE) -C $(BUILDDIR) lib |
| 29 |
# Make build reproducible |
| 30 |
sed -i \ |
| 31 |
-e 's@ [^ ]*-f\(file\|debug\)-prefix-map=[^ ]*@@g' \ |
| 32 |
$(BUILDDIR)/blitz/gnu/bzconfig.h |
| 33 |
|
| 34 |
override_dh_auto_build-indep: |
| 35 |
$(MAKE) -C $(BUILDDIR) lib |
| 36 |
$(MAKE) -C $(BUILDDIR) info pdf html |
| 37 |
|
| 38 |
override_dh_auto_test-arch: |
| 39 |
$(MAKE) -C $(BUILDDIR)/examples check |
| 40 |
$(MAKE) -C $(BUILDDIR)/testsuite check |
| 41 |
#$(MAKE) -C $(BUILDDIR)/benchmarks check |
| 42 |
|
| 43 |
override_dh_auto_test-indep: |
| 44 |
@true |
| 45 |
|
| 46 |
override_dh_prep-arch: |
| 47 |
sed -i \ |
| 48 |
-e '/^# generated by configure/d' \ |
| 49 |
-e 's/ -D_FORTIFY_SOURCE=2//;s/ -Wdate-time//;s/: $$/:/;' \ |
| 50 |
$(BUILDDIR)/blitz.pc |
| 51 |
|
| 52 |
## https://bugs.debian.org/726566 |
| 53 |
override_dh_prep-indep: |
| 54 |
sed -i \ |
| 55 |
-e 's/^* Blitz++: (blitz++)/* Blitz++: (blitz)/;' \ |
| 56 |
doc/blitz.info |
| 57 |
|
| 58 |
DEB_AUTO_INSTALL_MAKEFLAGS = DESTDIR=$(CURDIR)/debian/tmp |
| 59 |
override_dh_auto_install-indep: |
| 60 |
$(MAKE) -C $(BUILDDIR) install-info install-pdf install-html $(DEB_AUTO_INSTALL_MAKEFLAGS) |
| 61 |
$(MAKE) -C $(BUILDDIR)/examples install-examples $(DEB_AUTO_INSTALL_MAKEFLAGS) |
| 62 |
$(MAKE) -C $(BUILDDIR)/testsuite install-testsuite $(DEB_AUTO_INSTALL_MAKEFLAGS) |
| 63 |
|
| 64 |
override_dh_compress-indep: |
| 65 |
dh_compress -Xexamples -Xtestsuite -Xbenchmarks -X.pdf |