File: rules

package info (click to toggle)
libdbd-mysql-perl 4.041-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,068 kB
  • ctags: 409
  • sloc: ansic: 4,511; perl: 817; makefile: 27; sh: 22
file content (39 lines) | stat: -rwxr-xr-x 1,316 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)
ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

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)
export MYSQL_PASS=
export MYSQL_DBNAME=test

%:
	dh $@ --with perl_dbi

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)/usr -name '*.pod' | xargs -r chmod 0644
	[ ! -f $(TMP)/$(ARCHLIB)/DBD/mysql/INSTALL.pod ]           || $(RM) -v $(TMP)/$(ARCHLIB)/DBD/mysql/INSTALL.pod
	[ ! -d $(TMP)/$(ARCHLIB)/Bundle/ ]                         || $(RM) -vr $(TMP)/$(ARCHLIB)/Bundle/
	[ ! -f $(TMP)/usr/share/man/man3/Bundle::DBD::mysql.3pm ]  || $(RM) -v $(TMP)/usr/share/man/man3/Bundle::DBD::mysql.3pm
	[ ! -f $(TMP)/usr/share/man/man3/DBD::mysql::INSTALL.3pm ] || $(RM) -v $(TMP)/usr/share/man/man3/DBD::mysql::INSTALL.3pm