File: rules

package info (click to toggle)
tdbcodbc 1.1.13-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,136 kB
  • sloc: ansic: 4,537; sh: 430; tcl: 271; makefile: 43
file content (65 lines) | stat: -rwxr-xr-x 2,095 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
64
65
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

TCLVERSIONS = 8.6 9.0
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

DIR = $(shell pwd)/debian/tcl-tdbc-odbc
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# DEB_CFLAGS_MAINT_APPEND = -I/usr/include/tcl$$v ; \

%:
	dh $@

clean:
	echo "cleaning up source directory"; \
	rm -fv debian/autoreconf.* ; \
	rm -frv debian/tcl-tdbc-odbc ; \
	rm -frv debian/tdbcodbc ; \
	dh_clean

override_dh_auto_configure:
	for v in $(TCLVERSIONS) ; do \
		BUILD_DIR="debian/tdbcodbc/tcl$$v" ; \
		echo "Configuring tdbcodbc for Tcl$$v in $$BUILD_DIR" ;\
		dh_auto_configure --builddir=$$BUILD_DIR -- \
			--with-tcl=/usr/lib/tcl$$v	\
			--prefix=/usr			\
			--includedir=/usr/include	\
			--mandir=/usr/share/man		\
			--infodir=/usr/share/info	\
			--sysconfdir=/etc		\
			--localstatedir=/var		\
			--libdir=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) 	\
			--libexecdir=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) \
			--with-tdbc=$$(ls -dv /usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/tdbc1.* | tail -n 1) ; \
	done

override_dh_auto_build:
	for v in $(TCLVERSIONS) ; do \
		BUILD_DIR="debian/tdbcodbc/tcl$$v" ; \
		echo "Building tdbcodbc for Tcl$$v in $$BUILD_DIR" ; \
		dh_auto_build --builddir=$$BUILD_DIR --; \
	done 

override_dh_auto_install:
	for v in $(TCLVERSIONS) ; do \
		BUILD_DIR="debian/tdbcodbc/tcl$$v" ; \
		echo "Install tdbcodbc files for Tcl$$v version from $$BUILD_DIR" ; \
		dh_auto_install --builddir=$$BUILD_DIR  -- ; \
	done


.PHONY: override_dh_auto_install override_dh_auto_configure