File: rules

package info (click to toggle)
ogdi-dfsg 4.1.1%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,932 kB
  • sloc: ansic: 53,462; makefile: 348; sh: 214; perl: 162; tcl: 38
file content (54 lines) | stat: -rwxr-xr-x 1,358 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

export TOPDIR=$(CURDIR)
export CFG=debug

# Don't treat format-security as an error, caused build failure.
# Also link libm for cos() and related functions.
export DEB_CFLAGS_MAINT_APPEND=-Wno-error=format-security -lm -DNDEBUG

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

UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')

%:
	dh $@

override_dh_auto_clean:
	if [ -e config/common.mak ]; then \
		dh_auto_clean ; \
	fi

override_dh_auto_configure:
	dh_auto_configure -- \
		 --libdir=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
		 --with-expat=yes \
		 --with-expatinc=/usr/include \
		 --with-expatlib=-lexpat \
		 --with-zlib=yes \
		 --with-zlibinc=/usr/include \
		 --with-zliblib=-lz

override_dh_auto_build:
	dh_auto_build --max-parallel=1

override_dh_auto_install:
	dh_auto_install -- prefix=$(CURDIR)/debian/tmp/usr

	$(RM) $(CURDIR)/debian/tmp/usr/lib/ogdi/libskeleton.so

execute_after_dh_install:
	sed -i -e 's@$(CURDIR)/debian/tmp@@g' \
		debian/*/usr/bin/ogdi-config \
		debian/*/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/ogdi.pc

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION)