File: rules

package info (click to toggle)
oce 0.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 297,992 kB
  • ctags: 203,291
  • sloc: cpp: 1,176,369; ansic: 67,206; sh: 11,647; tcl: 6,890; cs: 5,221; python: 2,867; java: 1,522; makefile: 338; xml: 292; perl: 37
file content (61 lines) | stat: -rwxr-xr-x 2,674 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
60
61
#!/usr/bin/make -f

CFLAGS   := $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifeq ($(findstring parallel=,$(DEB_BUILD_OPTIONS)),)
	export DEB_BUILD_OPTIONS+=parallel=$(shell getconf _NPROCESSORS_ONLN)
endif

%:
	dh $@ --buildsystem=cmake --parallel --with quilt

override_dh_auto_configure:
	# See in debian/patches/split-export.patch why we must ignore cmake return value
	-dh_auto_configure -- \
        -DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 \
        -DOCE_BUILD_SHARED_LIB:BOOL=ON \
        -DOCE_TESTING:BOOL=ON \
        -DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON \
        -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
        -DOCE_INSTALL_PREFIX:PATH=/usr \
        -DOCE_INSTALL_LIB_DIR:PATH=lib/$(DEB_HOST_MULTIARCH) \
        -DOCE_INSTALL_CMAKE_DATA_DIR:PATH=lib/$(DEB_HOST_MULTIARCH)/oce-0.17 \
        -DOCE_DRAW:BOOL=ON \
        -DOCE_RPATH_FILTER_SYSTEM_PATHS:BOOL=ON \
        -DCMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES:STRING='/lib/$(DEB_HOST_MULTIARCH);/usr/lib/$(DEB_HOST_MULTIARCH)' \
        -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING='$(CFLAGS)' \
        -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING='$(CXXFLAGS)' \
        -DCMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING='$(LDFLAGS)' \
        -DCMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING='$(LDFLAGS)' \
        -DOCE_MULTITHREAD_LIBRARY:STRING=NONE \
        -DOCE_WITH_FREEIMAGE:BOOL=ON \
        -DOCE_WITH_GL2PS:BOOL=ON \
        -DDART_TESTING_TIMEOUT:STRING='3600'

override_dh_auto_install:
	dh_auto_install
	-mkdir debian/tmp/usr/include/oce/$(DEB_HOST_MULTIARCH)
	mv debian/tmp/usr/include/oce/oce_build_config.defs debian/tmp/usr/include/oce/$(DEB_HOST_MULTIARCH)/oce_build_config.defs
	-mkdir debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)
	rm debian/tmp/usr/include/oce/config.h
	mv debian/tmp/usr/include/oce/oce-config.h debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/
	# Improve integration in Debian desktop
	install -d debian/tmp/usr/share/applications
	cp -p debian/oce-draw.desktop debian/tmp/usr/share/applications/
	install -d debian/tmp/usr/share/pixmaps
	cp -p debian/occ-icon-32.xpm debian/tmp/usr/share/pixmaps/
	install -d debian/tmp/usr/share/man/man1
	# Install manual page
	cp -p debian/DRAWEXE.1 debian/tmp/usr/share/man/man1/
	find debian/tmp/usr/share -name FILES -exec rm -f {} \;

override_dh_install:
	dh_install --list-missing
	rm -rf debian/oce-draw/usr/include

override_dh_makeshlibs:
	dh_makeshlibs -Noce-draw