-
Notifications
You must be signed in to change notification settings - Fork 5
/
rules
executable file
·52 lines (40 loc) · 1.27 KB
/
rules
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
#!/usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
OVERRIDE_COMPILER=
PYVER = $(shell pyversions -dv)
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),powerpc mips mipsel))
OVERRIDE_COMPILER=-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
endif
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),i386 hurd-i386 kfreebsd-i386))
CMAKE_ARCH_FLAGS="-DDISABLE_SSE=ON"
endif
CMAKE_FLAGS = \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=TRUE \
-DLIBSHOGUN_BUILD_STATIC=ON \
-DBUILD_EXAMPLES=OFF \
-DUSE_SVMLIGHT=OFF \
-DBUILD_META_EXAMPLES=ON \
-DINTERFACE_PYTHON=ON \
$(CMAKE_ARCH_FLAGS)
%:
dh $@ --buildsystem=cmake --with python2 --builddirectory=$(BUILDDIR) --parallel
override_dh_auto_configure:
dh_auto_configure -- $(CMAKE_FLAGS) $(OVERRIDE_COMPILER)
override_dh_auto_build:
$(MAKE) -C $(BUILDDIR) meta_examples
dh_auto_build
override_dh_install:
dh_install
dh_numpy
override_dh_installdocs:
$(MAKE) -C $(BUILDDIR) doxygen
dh_installdocs $(BUILDDIR)/doc/doxygen/html
override_dh_fixperms-indep:
dh_fixperms
override_dh_strip:
dh_strip --dbg-package=libshogun18-dbg