File: rules

package info (click to toggle)
psqlodbc 1:13.00.0000-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,128 kB
  • sloc: ansic: 51,264; sh: 11,491; cpp: 1,788; makefile: 175; sql: 157; xml: 31
file content (31 lines) | stat: -rwxr-xr-x 1,006 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_configure:
	# build ANSI driver
	dh_auto_configure -- ODBC_CONFIG=$(CURDIR)/debian/odbc_config_dummy --libdir=/usr/lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)/odbc --disable-unicode
	dh_auto_build
	dh_auto_install --destdir=debian/psqlodbca
	dh_auto_clean
	# build Unicode driver
	dh_auto_configure -- ODBC_CONFIG=$(CURDIR)/debian/odbc_config_dummy --libdir=/usr/lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)/odbc

# hurd doesn't have a working PG server, skip tests
override_dh_auto_test:
ifneq ($(shell dpkg --print-architecture),hurd-i386)
	if ! LC_ALL=C LD_LIBRARY_PATH=../.libs pg_virtualenv $(MAKE) -C test installcheck; then \
		cat test/regression.diffs ; \
		exit 1 ; \
	fi
endif

override_dh_install:
	dh_install
	rm debian/odbc-postgresql/usr/lib/*/odbc/psqlodbc*.la

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C test clean || :
	rm -rf test/exe/ test/reset-db test/runsuite test/results test/odbc*.ini test/regression.diffs