File: rules

package info (click to toggle)
raxml 8.2.12%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,516 kB
  • sloc: ansic: 57,710; perl: 125; sh: 63; makefile: 52
file content (69 lines) | stat: -rwxr-xr-x 2,023 bytes parent folder | download | duplicates (3)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/make -f

# Copyright (C) Andreas Tille <tille@debian.org>
# License: GPL

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk
exe=raxmlHPC

ifeq (amd64,$(DEB_TARGET_ARCH_CPU))
##MFILES:=Makefile.gcc \ # we use a wrapper to the faster versions instead of shipping the "plain" version
MFILES =Makefile.PTHREADS.gcc \
	Makefile.SSE3.PTHREADS.gcc \
	Makefile.AVX.PTHREADS.gcc
MFLAGS=
else
MFILES = Makefile.AVX.PTHREADS.gcc
MFLAGS = CFLAGS="$(shell dpkg-buildflags --get CFLAGS) -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3"
endif

BINDIR=$(CURDIR)/debian/tmpbuild

%:
	dh $@

override_dh_auto_clean:
	for mfile in $(MFILES); do $(MAKE) -f $${mfile} clean ; done
	rm -rf $(BINDIR)

override_dh_auto_build:
	mkdir -p $(BINDIR)
	set -e ; for mfile in $(MFILES); do \
	    dh_auto_build --buildsystem=makefile -- -f $${mfile} $(MFLAGS); \
	    curexe=`ls $(exe)* | head -n 1` ; \
	    if [ -e $(BINDIR)/$${curexe} ] ; then \
		echo "**** ERROR: $${curexe} was created before!!" && false ; \
	    else \
		mv $${curexe} $(BINDIR)/$${curexe} ; \
	    fi ; \
	    $(MAKE) -f $${mfile} clean ; \
	done

override_dh_install:
	dh_install
ifeq (amd64,$(DEB_TARGET_ARCH_CPU))
	dh_install debian/bin/raxmlHPC usr/bin
else
	dh_link usr/bin/raxmlHPC-PTHREADS-AVX usr/bin/raxmlHPC
endif

override_dh_installman:
	dh_installman
	for cexe in `ls $(BINDIR)/$(exe)*` ; do \
	    curexe=`basename $${cexe}` ; \
	    if [ $${curexe} != $(exe) ] ; then \
		ln -s $(exe).1.gz $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1/$${curexe}.1.gz ; \
	    fi ; \
	done

override_dh_installexamples:
	dh_installexamples
	# fix perl path in example scripts
	for pscript in `ls usefulScripts/*.pl` ; do \
	    sed 's?/usr/local/bin/perl?/usr/bin/perl?' $${pscript} > $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples/`basename $${pscript}` ; \
	done

override_dh_gencontrol:
	dh_gencontrol -- -Vsimde:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libsimde-dev")"