File: rules

package info (click to toggle)
raxml 8.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,772 kB
  • ctags: 1,841
  • sloc: ansic: 56,101; perl: 125; makefile: 41; sh: 33
file content (56 lines) | stat: -rwxr-xr-x 1,798 bytes parent folder | download
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
#!/usr/bin/make -f

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

DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
exe=raxmlHPC

##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

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)
	for mfile in $(MFILES); do \
	    $(MAKE) -f $${mfile} ; \
	    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_installman:
	help2man --no-info --help-option="-h" --version-option="-v" \
	         --name="Randomized Axelerated Maximum Likelihood" \
	         $(CURDIR)/debian/$(DEBPKGNAME)/usr/bin/$(exe) > $(CURDIR)/debian/$(DEBPKGNAME)/usr/share/man/man1/$(exe).1
	for cexe in `ls $(BINDIR)/$(exe)*` ; do \
	    curexe=`basename $${cexe}` ; \
	    if [ $${curexe} != $(exe) ] ; then \
		ln -s $(exe).1.gz $(CURDIR)/debian/$(DEBPKGNAME)/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/$(DEBPKGNAME)/usr/share/doc/$(DEBPKGNAME)/examples/`basename $${pscript}` ; \
	done

get-orig-source:
	mkdir -p ../tarballs
	uscan --verbose --force-download --repack --compress xz --destdir=../tarballs