r25863 - in /trunk/libdbd-odbc-perl/debian: changelog rules

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Oct 8 15:58:34 UTC 2008


Author: gregoa
Date: Wed Oct  8 15:58:31 2008
New Revision: 25863

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25863
Log:
Refresh debian/rules; examples are now in "examples/"; remove some unused
targets.

Modified:
    trunk/libdbd-odbc-perl/debian/changelog
    trunk/libdbd-odbc-perl/debian/rules

Modified: trunk/libdbd-odbc-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/debian/changelog?rev=25863&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/debian/changelog (original)
+++ trunk/libdbd-odbc-perl/debian/changelog Wed Oct  8 15:58:31 2008
@@ -1,6 +1,8 @@
 libdbd-odbc-perl (1.17-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Refresh debian/rules; examples are now in "examples/"; remove some unused
+    targets.
 
  -- gregor herrmann <gregoa at debian.org>  Wed, 08 Oct 2008 17:31:02 +0200
 

Modified: trunk/libdbd-odbc-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-odbc-perl/debian/rules?rev=25863&op=diff
==============================================================================
--- trunk/libdbd-odbc-perl/debian/rules (original)
+++ trunk/libdbd-odbc-perl/debian/rules Wed Oct  8 15:58:31 2008
@@ -3,26 +3,35 @@
 # debian/rules file for the Debian Linux libdbd-odbc-perl package
 # Copyright (C) 2000 - 2003 by Dirk Eddelbuettel <edd at debian.org>
 
-package	:= $(shell grep Package debian/control | sed 's/^Package: //')
-version	:= $(shell head -1 debian/changelog | \
-			perl -nle 'm/\S+\s+\((\S+)\)/ && print $$1')
-debtmp	:= $(shell pwd)/debian/$(package)
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
 
-dbuser  := $(shell whoami)
-dbname	:= dbd_odbc_test_db
+PERL   ?= /usr/bin/perl
+PACKAGE = $(shell dh_listpackages)
+TMP     = $(CURDIR)/debian/$(PACKAGE)
 
-upstream: get-orig-source
-get-orig-source:
-	links http://www.cpan.org/authors/id/J/JU/JURL
+# for test target, see below
+DBUSER  := $(shell whoami)
+DBNAME  := dbd_odbc_test_db
+
+# Allow disabling build optimisation by setting noopt in
+# $DEB_BUILD_OPTIONS
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+        CFLAGS += -O0
+else
+        CFLAGS += -O2
+endif
 
 build: build-stamp
 build-stamp:
 	dh_testdir
-        #DBI_USER=$(dbuser) 		
-        #DBI_DSN=dbi:ODBC:$(dbname) 	
-	ODBCHOME=/usr	perl Makefile.PL INSTALLDIRS=vendor 
-	$(MAKE) OPTIMIZE="-O2"
-	touch build-stamp
+	#DBI_USER=$(DBUSER) 		
+	#DBI_DSN=dbi:ODBC:$(DBNAME) 	
+	$(PERL) Makefile.PL INSTALLDIRS=vendor
+	$(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
+	touch $@
 
 # here is a test target -- it works for me under postgres
 # keeping it in a separate make target, and not actually invoking it
@@ -35,11 +44,11 @@
 #	Servername   = localhost
 test:	test-stamp
 test-stamp: build-stamp
-	createdb $(dbname)
-	-DBI_USER=$(dbuser) DBI_DSN=dbi:ODBC:$(dbname) \
-		make test TEST_VERBOSE=1  
-	-dropdb $(dbname)
-	touch test-stamp
+	createdb $(DBNAME)
+	-DBI_USER=$(DBUSER) DBI_DSN=dbi:ODBC:$(DBNAME) \
+		$(MAKE) test TEST_VERBOSE=1
+	-dropdb $(DBNAME)
+	touch $@
 
 clean:
 	dh_testdir
@@ -49,34 +58,33 @@
 	dh_clean
 
 install: install-stamp
-install-stamp: build
+install-stamp: build-stamp
 	dh_testdir
 	dh_testroot
-	$(MAKE) install PREFIX=$(debtmp)/usr
-	[ ! -d $(debtmp)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(debtmp)/usr/share/perl5
-	touch install-stamp	
+	dh_clean -k
+	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+	[ ! -d $(TMP)/usr/share/perl5 ] || \
+		rmdir --ignore-fail-on-non-empty --parents --verbose \
+		$(TMP)/usr/share/perl5
+	touch $@
 
 binary-indep: build install
 
 binary-arch: build install
 	dh_testdir
 	dh_testroot
-	dh_perl	
+	dh_installexamples examples/*
+	dh_installdocs README README.adabas
+	dh_installchangelogs Changes
+	dh_shlibdeps
 	dh_strip
-	dh_installdocs		README README.adabas 
-	dh_installexamples	mytest/*
-	dh_installchangelogs	Changes
+	dh_perl
 	dh_compress
 	dh_fixperms
 	dh_installdeb
-	dh_shlibdeps
 	dh_gencontrol
 	dh_md5sums
 	dh_builddeb
 
-source diff:                                                                  
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
-
+.PHONY: build clean binary-indep binary-arch binary install




More information about the Pkg-perl-cvs-commits mailing list