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
|
#!/usr/bin/make -f
include /usr/share/libdbi-perl/perl-dbdabi.make
PACKAGE = $(shell dh_listpackages)
TMP = $(CURDIR)/debian/$(PACKAGE)
# for test target, see below
DBUSER := $(shell whoami)
DBNAME := dbd_odbc_test_db
%:
dh $@
# here is a test target -- it works for me under postgres
# keeping it in a separate make target, and not actually invoking it
# should keep the requirements simpler for the non-i386 builds
# I use the following in ~/.odbc.ini
# [dbd_odbc_test_db]
# Driver = /usr/lib/libpsqlodbc.so
# Database = dbd_odbc_test_db
# ReadOnly = 0
# Servername = localhost
test:
createdb $(DBNAME)
-DBI_USER=$(DBUSER) DBI_DSN=dbi:ODBC:$(DBNAME) \
$(MAKE) test TEST_VERBOSE=1
-dropdb $(DBNAME)
override_dh_auto_test:
# To run tests, use 'debian/rules test'
override_dh_installexamples:
dh_installexamples
sed -i '1s|^#!perl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/libdbd-odbc-perl/examples/*
sed -i '1s|^#!/usr/bin/perl.exe|#!/usr/bin/perl|' $(TMP)/usr/share/doc/libdbd-odbc-perl/examples/*
sed -i '1s|^#!c:/programme/perl/bin/perl.exe|#!/usr/bin/perl|' $(TMP)/usr/share/doc/libdbd-odbc-perl/examples/*
override_dh_fixperms:
dh_fixperms
chmod 644 $(TMP)/usr/share/doc/libdbd-odbc-perl/examples/*
override_dh_gencontrol:
dh_gencontrol -- -V"libdbi-perl:Depends=libdbi-perl, $(PERL_DBDABI_DEPENDS)"
override_dh_installchangelogs:
pod2text Changes > debian/Changes.txt
dh_installchangelogs debian/Changes.txt
override_dh_installdocs:
pod2text FAQ > debian/FAQ
dh_installdocs
|