| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
|
| 6 |
BUILDARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) |
| 7 |
|
| 8 |
include /usr/share/dpkg/default.mk |
| 9 |
|
| 10 |
PKGBEAGLE=$(DEB_SOURCE)-beagle |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ |
| 14 |
|
| 15 |
override_dh_autoreconf: |
| 16 |
dh_autoreconf --as-needed |
| 17 |
|
| 18 |
override_dh_auto_configure: |
| 19 |
override_dh_auto_build: |
| 20 |
|
| 21 |
|
| 22 |
beeing |
| 23 |
mv doc/phyml-manual.pdf . |
| 24 |
dh_auto_configure |
| 25 |
dh_auto_build -- LDFLAGS="$(LDFLAGS)" |
| 26 |
|
| 27 |
mkdir -p $(CURDIR)/debian/bin |
| 28 |
mv src/phyml $(CURDIR)/debian/bin/phyml |
| 29 |
ifeq ($(BUILDARCH),$(filter $(BUILDARCH), do_not_build_this)) |
| 30 |
$(MAKE) distclean |
| 31 |
dh_auto_configure -- --enable-beagle |
| 32 |
dh_auto_build -- CFLAGS="$(CFLAGS) -I/usr/include/libhmsbeagle-1 -DBEAGLE" LDFLAGS="$(LDFLAGS)" |
| 33 |
|
| 34 |
mkdir -p $(CURDIR)/debian/$(PKGBEAGLE)/usr/lib/phyml/bin |
| 35 |
mv src/phyml-beagle $(CURDIR)/debian/$(PKGBEAGLE)/usr/lib/phyml/bin |
| 36 |
endif |
| 37 |
$(MAKE) distclean |
| 38 |
dh_auto_configure -- --enable-phyml-mpi |
| 39 |
dh_auto_build -- LDFLAGS="$(LDFLAGS)" |
| 40 |
|
| 41 |
|
| 42 |
mv src/phyml-mpi $(CURDIR)/debian/bin/phyml-mpi |
| 43 |
ifeq ($(BUILDPHYTIME), 'yes') |
| 44 |
$(MAKE) distclean |
| 45 |
dh_auto_configure -- --enable-phytime |
| 46 |
dh_auto_build -- LDFLAGS="$(LDFLAGS)" CPPFLAGS="-DPHYREX $(CPPFLAGS)" |
| 47 |
endif |
| 48 |
mv phyml-manual.pdf doc |
| 49 |
|
| 50 |
override_dh_auto_install: |
| 51 |
dh_auto_install |
| 52 |
|
| 53 |
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin |
| 54 |
mv $(CURDIR)/debian/bin/* $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin |
| 55 |
chrpath --delete debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/bin/phyml* |
| 56 |
|
| 57 |
override_dh_auto_clean: |
| 58 |
|
| 59 |
mv doc/phyml-manual.pdf . |
| 60 |
dh_auto_clean || true |
| 61 |
mv phyml-manual.pdf doc |
| 62 |
|
| 63 |
rm -rf debian/bin |
| 64 |
rm -rf doc/Makefile |
| 65 |
|
| 66 |
override_dh_installdocs: |
| 67 |
dh_installdocs |
| 68 |
mv $(CURDIR)/debian/phyml/usr/share/doc/phyml/phyml-manual.pdf $(CURDIR)/debian/phyml/usr/share/doc/phyml/phyml_manual.pdf |
| 69 |
|
| 70 |
override_dh_compress: |
| 71 |
dh_compress --exclude=.pdf |
| 72 |
|
| 73 |
override_dh_fixperms: |
| 74 |
dh_fixperms |
| 75 |
find debian/*/usr/share/doc -name "*.nxs" -exec chmod -x \{\} \; |
| 76 |
find debian/*/usr/share/doc -name "*.xml" -exec chmod -x \{\} \; |
| 77 |
find debian/*/usr/share/doc -name "*.mat" -exec chmod -x \{\} \; |
| 78 |
find debian/*/usr/share/doc -name "*.txt" -exec chmod -x \{\} \; |
| 79 |
chmod -x debian/*/usr/share/doc/phyml/examples/nucleic |
| 80 |
chmod -x debian/*/usr/share/doc/phyml/examples/proteic |
| 81 |
|
| 82 |
override_dh_dwz: |
| 83 |
echo "Do not run dh_dwz" |