File: rules

package info (click to toggle)
libdbd-mariadb-perl 1.22-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,072 kB
  • sloc: ansic: 5,603; perl: 1,082; sh: 39; makefile: 29
file content (44 lines) | stat: -rwxr-xr-x 1,158 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
#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export MYSQL_DIR=$(CURDIR)/t/testdb
export MYSQL_UNIX_PORT=$(MYSQL_DIR)/mysql.sock
export MYSQL_PIDFILE=$(MYSQL_DIR)/mysql.pid
export MYSQL_USER=$(shell whoami)

# DBD::MariaDB test setup
export DBD_MARIADB_TESTDB=testdb
export DBD_MARIADB_TESTHOST=localhost
export DBD_MARIADB_TESTSOCKET=$(MYSQL_UNIX_PORT)
export DBD_MARIADB_TESTUSER=testuser
export DBD_MARIADB_TESTPASSWORD=testpassword

%:
	dh $@

override_dh_auto_configure:
	LC_ALL=C.UTF-8 dh_auto_configure

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# prepare mariadb/mysql server
	sh $(CURDIR)/debian/tests/pkg-perl/smoke-setup

	dh_auto_test

	# tear down mariadb/mysql server
	sh $(CURDIR)/debian/tests/pkg-perl/smoke-cleanup
endif

override_dh_auto_install:
	dh_auto_install
	find $(TMP) -type f -name "*README*" -delete
	find $(TMP) -type f -name "*INSTALL*" -delete
	rmdir --ignore-fail-on-non-empty --parents --verbose \
		$(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/perl5/*/DBD/MariaDB/