File: rules

package info (click to toggle)
ossim 2.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 29,740 kB
  • sloc: cpp: 383,170; ansic: 15,201; sh: 2,311; lex: 183; xml: 141; sql: 78; makefile: 77; csh: 6
file content (63 lines) | stat: -rwxr-xr-x 1,782 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
62
63
#!/usr/bin/make -f

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE=$(shell LC_ALL=C date -u "+%Y%m%d" -d "@$(SOURCE_DATE_EPOCH)")

OSSIM_VERSION=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
OSSIM_VERSION_TAG=$(subst .,_,$(OSSIM_VERSION))

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

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    CFLAGS += -O0
    OPTFLAG =
else
    CFLAGS += -O2
    OPTFLAG = --enable-optimization
endif

%:
	dh $@ --buildsystem cmake \
	      --builddirectory=$(CURDIR)/debian/build

# Add here any variable or target overrides you need.
CMAKE_OPTS = \
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_INSTALL_PREFIX=/usr \
       -DBUILD_OSSIM_APPS=ON \
       -DBUILD_OSSIM_FRAMEWORKS=OFF \
       -DBUILD_OSSIM_FREETYPE_SUPPORT=ON \
       -DBUILD_OSSIM_ID_SUPPORT=ON \
       -DBUILD_OSSIM_MPI_SUPPORT=OFF \
       -DBUILD_OSSIM_TESTS=OFF \
       -DBUILD_SHARED_LIBS=ON \
       -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2 \
       -DGEOS_INCLUDE_DIR=/usr/include/geos \
       -DINSTALL_LIBRARY_DIR:STRING=lib \
       -DOSSIM_BUILD_DATE=$(BUILD_DATE)

override_dh_auto_clean:
	rm -rf debian/build
	rm -f include/ossim/ossimConfig.h include/ossim/ossimVersion.h
	dh_auto_clean

override_dh_auto_configure:
	[ -d debian/build ] || mkdir debian/build
	[ ! -e CMakeCache.txt ] || rm CMakeCache.txt
	dh_auto_configure -- $(CMAKE_OPTS)

override_dh_auto_install:
	dh_auto_install
	rm -f $(CURDIR)/debian/tmp/usr/include/ossimConfig.h
	rm -f $(CURDIR)/debian/tmp/usr/include/ossimVersion.h
	rm -rf $(CURDIR)/debian/tmp/usr/share/ossim/fonts

override_dh_install:
	dh_install --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -V