File: rules

package info (click to toggle)
fossil 1%3A2.26-2
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 28,572 kB
  • sloc: ansic: 332,171; tcl: 14,144; javascript: 10,171; sh: 6,791; makefile: 4,276; pascal: 1,139; cpp: 1,001; cs: 879; sql: 376; asm: 281; perl: 166; xml: 95
file content (49 lines) | stat: -rwxr-xr-x 1,630 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
#!/usr/bin/make -f

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

%:
	dh $@ --with bash-completion

## If system (external) sqlite has high enough version, disable internal sqlite.

## Only use internal (vendored) sqlite for now.
##
##  Checking for sqlite3_open in sqlite3...-lsqlite3
##  Error: system SQLite library omits required build option -DSQLITE_ENABLE_JSON1
##
## Also removed corresponding dependencies from debian/control:
##               libsqlite3-dev (>= 3.38),
##               sqlite3,

SQLITE_MIN_VERSION=$(shell ./configure --print-minimum-sqlite-version | tail -1)
FOSSIL_CONF_SQLITE_OPTIONS:=$(shell pkg-config sqlite3 --atleast-version=$(SQLITE_MIN_VERSION) && echo --disable-internal-sqlite)

## This is an alternative method for checking sqlite version. Seems
## less robust, as pkg-config is designed for this purpose.

# dpkg --compare-versions \
# 	$(shell dpkg --status libsqlite3-dev | egrep '^Version: ' | cut --field=2 --delimiter=' ') \
# 	ge $(SQLITE_MIN_VERSION)

override_dh_autoreconf:
	dh_autoreconf debian/rules -- update-config-guess-sub

.PHONY: update-config-guess-sub
update-config-guess-sub:
	f=/usr/share/misc/; \
	g=autosetup/autosetup-; \
	for e in config.guess config.sub; do \
	  cmp $$f$$e $$g$$e || cp --verbose $$f$$e $$g$$e; \
	done

override_dh_auto_configure:
	dh_auto_configure -- --disable-option-checking \
			     $(FOSSIL_CONF_SQLITE_OPTIONS) \
			     --disable-fusefs

execute_after_dh_installdocs:
	mv debian/fossil/usr/share/doc/fossil/changes.wiki \
	   debian/fossil/usr/share/doc/fossil/changelog