| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# DH_VERBOSE := 1 |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
export DEB_CFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 |
| 7 |
export DEB_CXXFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 |
| 8 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 9 |
include /usr/share/dpkg/default.mk |
| 10 |
|
| 11 |
export JAVA_HOME := /usr/lib/jvm/default-java |
| 12 |
|
| 13 |
include /usr/share/dpkg/pkg-info.mk |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ --with maven_repo_helper |
| 17 |
|
| 18 |
override_dh_auto_clean: |
| 19 |
dh_auto_clean |
| 20 |
if [ -e src/main/c/org_broadinstitute_hellbender_utils_bwa_BwaMemIndex.c.save ]; then \ |
| 21 |
mv src/main/c/org_broadinstitute_hellbender_utils_bwa_BwaMemIndex.c.save src/main/c/org_broadinstitute_hellbender_utils_bwa_BwaMemIndex.c; \ |
| 22 |
fi |
| 23 |
-rm src/test/resources/ref.fa.img |
| 24 |
# Cleaning the C part |
| 25 |
cd src/main/c/ && make clean |
| 26 |
-rm -rf src/main/c/bwaComponent |
| 27 |
# Replacing the modified build.gradle file having a version number by the original one. |
| 28 |
if [ -e build.gradle.old ]; then mv build.gradle.old build.gradle; fi |
| 29 |
|
| 30 |
override_dh_auto_configure: |
| 31 |
# Putting the version in the JNI file so that is can output version information. |
| 32 |
cp src/main/c/org_broadinstitute_hellbender_utils_bwa_BwaMemIndex.c src/main/c/org_broadinstitute_hellbender_utils_bwa_BwaMemIndex.c.save |
| 33 |
sed -i "s/BWA_COMMIT/\"$(DEB_VERSION)\"/" src/main/c/org_broadinstitute_hellbender_utils_bwa_BwaMemIndex.c |
| 34 |
# Copying the component sources to src/main/c for the JNI build |
| 35 |
mkdir -p src/main/c/bwaComponent/ |
| 36 |
cp -a bwa-apache2/* src/main/c/bwaComponent/ |
| 37 |
# Adding a version number in the build.gradle file. |
| 38 |
cp build.gradle build.gradle.old |
| 39 |
sed -i "s/\(^group.*\)/\1\nversion = '$(DEB_VERSION_UPSTREAM)'/ ; s/\+dfsg[[:digit:]]*//" build.gradle |
| 40 |
dh_auto_configure |
| 41 |
|
| 42 |
override_dh_auto_test: |
| 43 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 44 |
# The shared lib should be looked for in its build directory. Without the |
| 45 |
# --debug flag, the build mysteriously fails, see Debian bug #1096676. |
| 46 |
LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:$$(readlink -f src/main/c)" dh_auto_test -- --debug |
| 47 |
endif |