File: rules

package info (click to toggle)
astra-toolbox 2.3.0-4
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 4,972 kB
  • sloc: cpp: 24,378; python: 5,048; sh: 3,514; ansic: 1,181; makefile: 518
file content (48 lines) | stat: -rwxr-xr-x 1,850 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

SOURCE_DIRECTORY := build/linux

CONFIGURE_FLAGS_PYTHON := --prefix=/usr --with-cuda --with-python=/usr/bin/python3 --with-install-type=module
BUILD_DIRECTORY_PYTHON := build-python

CONFIGURE_FLAGS_OCTAVE := --prefix=/usr --with-cuda --enable-octave --with-install-type=module
BUILD_DIRECTORY_OCTAVE := build-octave

%:
	dh $@ --sourcedirectory=$(SOURCE_DIRECTORY)

override_dh_auto_clean:
	dh_auto_clean --builddirectory $(BUILD_DIRECTORY_PYTHON)
	dh_auto_clean --builddirectory $(BUILD_DIRECTORY_OCTAVE)
	rm -f $(SOURCE_DIRECTORY)/config.sub  $(SOURCE_DIRECTORY)/config.guess  $(SOURCE_DIRECTORY)/install-sh
	rm -f python/astra/*.cpp  python/astra/config.pxi

override_dh_auto_configure:
	cd $(SOURCE_DIRECTORY) ; ./autogen.sh

# 	python package
	mkdir -p $(BUILD_DIRECTORY_PYTHON)
	dh_auto_configure --builddirectory $(BUILD_DIRECTORY_PYTHON) --sourcedirectory=$(SOURCE_DIRECTORY) -- $(CONFIGURE_FLAGS_PYTHON)

# 	octave package
	mkdir -p $(BUILD_DIRECTORY_OCTAVE)
	dh_auto_configure --builddirectory $(BUILD_DIRECTORY_OCTAVE) --sourcedirectory=$(SOURCE_DIRECTORY) -- $(CONFIGURE_FLAGS_OCTAVE)

override_dh_auto_build:
	dh_auto_build --builddirectory $(BUILD_DIRECTORY_PYTHON)
	dh_auto_build --builddirectory $(BUILD_DIRECTORY_OCTAVE)

override_dh_auto_test:
#	dh_auto_test --builddirectory $(BUILD_DIRECTORY_PYTHON)
#	dh_auto_test --builddirectory $(BUILD_DIRECTORY_OCTAVE)

override_dh_auto_install:
	dh_auto_install --builddirectory $(BUILD_DIRECTORY_PYTHON) --destdir debian/python3-astra-toolbox
	dh_auto_install --builddirectory $(BUILD_DIRECTORY_OCTAVE) --destdir debian/octave-astra-toolbox