File: rules

package info (click to toggle)
sqlite 2.8.17-14
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,716 kB
  • ctags: 3,107
  • sloc: ansic: 32,407; tcl: 10,821; sh: 7,775; yacc: 677; makefile: 385; awk: 62
file content (68 lines) | stat: -rwxr-xr-x 1,892 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
66
67
68
#!/usr/bin/make -f
# -*- makefile -*-

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk

ifeq ($(origin CC),default)
CC := $(DEB_HOST_GNU_TYPE)-gcc
endif
export config_BUILD_CC:=cc
export config_TARGET_CC:=$(CC)
export PATH:=$(PATH):$(CURDIR)/bin

CONFIGURE_EXTRA_FLAGS = config_TARGET_TCL_INC="-I/usr/include/tcl8.6" \
	config_BUILD_CFLAGS="$(CFLAGS) -DTHREADSAFE=1" \
	config_TARGET_LIBS="-ltcl8.6 -lpthread" \
	--enable-utf8

override_dh_clean:
	dh_autoreconf_clean
	dh_autotools-dev_restoreconfig
	dh_clean

override_dh_auto_configure:
	mkdir -p $(CURDIR)/bin/
	ln -s $(shell which tclsh8.6) $(CURDIR)/bin/tclsh
	dh_autotools-dev_updateconfig
	dh_autoreconf
	dh_auto_configure -- $(CONFIGURE_EXTRA_FLAGS)

override_dh_auto_build:
	$(MAKE) all libtclsqlite.la doc

override_dh_auto_install:
	install -d $(CURDIR)/debian/tmp/usr/bin/ \
		$(CURDIR)/debian/tmp/usr/lib/sqlite/
	install -m 0664 $(CURDIR)/debian/pkgIndex.tcl \
		$(CURDIR)/debian/tmp/usr/lib/sqlite
	./libtool --mode=install install libsqlite.la \
		$(CURDIR)/debian/tmp/usr/lib
	./libtool --mode=install install libtclsqlite.la \
		$(CURDIR)/debian/tmp/usr/lib/sqlite
	install -d $(CURDIR)/debian/tmp/usr/share/lemon
	install -m 664 $(CURDIR)/tool/lempar.c \
		$(CURDIR)/debian/tmp/usr/share/lemon
	install -m 775 lemon $(CURDIR)/debian/tmp/usr/bin/
	dh_auto_install

override_dh_makeshlibs:
	# empty dependency_libs
	sed -i "/dependency_libs/ s/'.*'/''/" \
		`find $(CURDIR)/debian/ -name '*.la'`
	dh_makeshlibs -V -X"libtclsqlite.so*"

override_dh_auto_test:
	dh_auto_test || true

%:
	dh $@ --parallel

.PHONY: override_dh_clean override_dh_auto_configure override_dh_auto_build \
	override_dh_auto_install override_dh_makeshlibs \
	override_dh_auto_test