| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
# |
| 4 |
# Uncomment this to turn on verbose mode. |
| 5 |
#export DH_VERBOSE=1 |
| 6 |
|
| 7 |
include /usr/share/dpkg/architecture.mk |
| 8 |
include /usr/share/dpkg/buildtools.mk |
| 9 |
|
| 10 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 11 |
|
| 12 |
# Compensate test result mismatches occurring on i386 only. |
| 13 |
ifeq ($(DEB_HOST_ARCH),i386) |
| 14 |
DEB_CFLAGS_MAINT_APPEND=-ffloat-store |
| 15 |
DEB_CXXFLAGS_MAINT_APPEND=-ffloat-store |
| 16 |
endif |
| 17 |
|
| 18 |
# mpi-c only works for openmpi and mpicc only works for native builds. |
| 19 |
# With these settings mpich cross builds are broken and everything else works. |
| 20 |
DEB_CFLAGS_MAINT_APPEND += $(shell $(PKG_CONFIG) --cflags mpi-c) |
| 21 |
DEB_CXXFLAGS_MAINT_APPEND += $(shell $(PKG_CONFIG) --cflags mpi-c) |
| 22 |
MPI_LIBS += $(shell $(PKG_CONFIG) --libs mpi-c) |
| 23 |
|
| 24 |
export DEB_CFLAGS_MAINT_APPEND DEB_CXXFLAGS_MAINT_APPEND MPI_LIBS |
| 25 |
|
| 26 |
%: |
| 27 |
dh $@ |
| 28 |
|
| 29 |
override_dh_auto_install: |
| 30 |
make install |
| 31 |
dh_install bin/* /usr/bin |
| 32 |
dh_install Data/* /usr/share/ampliconnoise/Data/ |
| 33 |
dh_install Scripts/* /usr/share/ampliconnoise/Scripts/ |
| 34 |
|
| 35 |
execute_before_dh_auto_clean: |
| 36 |
mkdir -p bin |
| 37 |
|
| 38 |
#A typo in the upstream Makefile prevents proper cleaning. |
| 39 |
override_dh_clean: |
| 40 |
dh_clean |
| 41 |
rm -f *.o |
| 42 |
rm -f *.1 |
| 43 |
|
| 44 |
override_dh_installman: |
| 45 |
debian/ampliconnoise.pod |
| 46 |
dh_installman ampliconnoise.1 |
| 47 |
( for f in bin/* ; do \ |
| 48 |
ln -s ampliconnoise.1 debian/ampliconnoise/usr/share/man/man1/`basename "$$f"`.1 ; \ |
| 49 |
done ) |
| 50 |
|
| 51 |
override_dh_compress: |
| 52 |
# Use xz compression for data file to shrink size even more |
| 53 |
find debian -name C005.dat -exec xz \{\} \; |
| 54 |
dh_compress --exclude=.pdf |