File: rules

package info (click to toggle)
relion-cuda 3.1.0-2
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 14,400 kB
  • sloc: cpp: 141,562; ansic: 4,359; python: 1,661; sh: 149; makefile: 39; csh: 1
file content (59 lines) | stat: -rwxr-xr-x 1,535 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
57
58
59
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

DEBVENDOR  := $(shell dpkg-vendor --query Vendor)

ifeq ($(DEBVENDOR), Qlustar)
    # Qlustar specific stuff
    include /usr/share/ql-deb-utils/Makefile
    MPICXX := mpicxx.openmpi-gcc
else
    include /usr/share/dpkg/default.mk

    NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKE_-J := $(addprefix -j, $(NUMJOBS))
    MPICXX := mpicxx.openmpi
endif

CONFIGURE_COMMON := cmake -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" \
  -DCMAKE_VERBOSE_MAKEFILE=ON \
  -DCMAKE_SKIP_RPATH=TRUE \
  -DDoublePrec_GPU=ON

%:
	dh $@

override_dh_auto_configure:

override_dh_auto_build:
	mkdir $(CURDIR)/build
	cd $(CURDIR)/build; \
	$(CONFIGURE_COMMON) -DGUI=ON -DCUDA=ON $(CURDIR); \
	make $(MAKE_-J); DESTDIR=$(CURDIR)/debian/tmp/cli make install
	mkdir -p $(CURDIR)/debian/tmp/gui/usr/bin
	rm $(CURDIR)/debian/tmp/cli/usr/bin/*.csh # Useless ...
	for prog in relion relion_display relion_maingui relion_manualpick; do \
	  mv $(CURDIR)/debian/tmp/cli/usr/bin/$$prog \
	    $(CURDIR)/debian/tmp/gui/usr/bin; done

override_dh_prep:
	# We don't want debian/tmp to be removed again ...
	dh_prep -X debian/tmp

override_dh_auto_install:

override_dh_install-arch:
	dh_install -a

override_dh_clean:
	dh_clean
	-rm -rf build*

get-orig-source:
	uscan --download-current-version --force-download --rename