File: rules

package info (click to toggle)
ossim 1.8.16-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 24,156 kB
  • ctags: 31,345
  • sloc: cpp: 324,330; ansic: 14,940; sh: 7,473; pascal: 1,072; perl: 306; makefile: 207; lex: 183; xml: 141; sql: 78; csh: 4; php: 1
file content (61 lines) | stat: -rwxr-xr-x 2,185 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

OSSIM_VERSION=$(shell dpkg-parsechangelog|grep Version:|cut -d' ' -f2|cut -d- -f1)
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 \
		  --sourcedirectory=$(CURDIR) \
		  --builddirectory=$(CURDIR)/debian/build

# Add here any variable or target overrides you need.
CMAKE_OPTS = \
       -DCMAKE_INSTALL_PREFIX=/usr \
       -DBUILD_OSSIM_FRAMEWORKS=ON \
       -DBUILD_OSSIM_FREETYPE_SUPPORT=ON \
       -DBUILD_OSSIM_ID_SUPPORT=ON \
       -DBUILD_OSSIM_MPI_SUPPORT=OFF \
       -DBUILD_OSSIM_TEST_APPS=ON \
       -DBUILD_SHARED_LIBS=ON \
	   -DGEOS_C_LIB=/usr/lib/libgeos_c.so \
	   -DGEOS_INCLUDE_DIR=/usr/include/geos \
	   -DGEOS_LIB=/usr/lib/libgeos.so \
	   -DGEOS_LIBRARY=/usr/lib/libgeos_c.so \
	   -DGEOTIFF_INCLUDE_DIR=/usr/include/geotiff \
       -DCMAKE_MODULE_PATH=$(CURDIR)/CMakeModules \
	   -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2 \
	   -DGEOTIFF_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libgeotiff.so

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

override_dh_auto_build:
	$(MAKE) -C debian/build

overridd_dh_auto_install:
	#$(MAKE) -C $(CURDIR)/debian/build install DESTDIR=$(CURDIR)/debian/tmp
	dh_auto_install
	install -d $(CURDIR)/debian/tmp/usr/share/ossim/templates/
	install -D $(CURDIR)/etc/templates/*.kwl $(CURDIR)/debian/tmp/usr/share/ossim/templates
	install -T $(CURDIR)/etc/templates/ossim_preferences_template $(CURDIR)/debian/tmp/usr/share/ossim/templates/ossim_preferences
	install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/ossim
	find $(CURDIR)/debian/tmp/usr/share/ossim/templates -type f -exec chmod a-x {} \;
	rm -f $(CURDIR)/debian/tmp/usr/include/ossimConfig.h
	rm -f $(CURDIR)/debian/tmp/usr/include/ossimVersion.h

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