r77541 - /trunk/liblocale-gettext-perl/debian/rules

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Sat Jul 16 18:29:44 UTC 2011


Author: ansgar
Date: Sat Jul 16 18:29:42 2011
New Revision: 77541

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77541
Log:
make debian/rules a bit more beautiful (at least for me)

Modified:
    trunk/liblocale-gettext-perl/debian/rules

Modified: trunk/liblocale-gettext-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocale-gettext-perl/debian/rules?rev=77541&op=diff
==============================================================================
--- trunk/liblocale-gettext-perl/debian/rules (original)
+++ trunk/liblocale-gettext-perl/debian/rules Sat Jul 16 18:29:42 2011
@@ -4,17 +4,12 @@
 DEB_HOST_GNU_TYPE       := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-        HOST_PERL = $(shell which perl)
-        PERL_VER = $(shell $(HOST_PERL) -v | $(HOST_PERL) -e 'while(<>) {/v(\d+\.\d+\.\d+)/ and print "$$1\n";}')
+  PERL_VER := $(shell perl -MConfig -e'print "$$Config{version}\n"')
+  export PERL5LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib/perl/$(PERL_VER)
 
-        export PERL5LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib/perl/$(PERL_VER)
-clean:
-	@if [ ! -f $(PERL5LIB)/Config.pm ] || [ ! -f $(PERL5LIB)/Config_heavy.pl ]	;\
-	then	\
-		echo "Config.pm & Config_heavy.pl for cross building not found in $(PERL5LIB)"	;\
-	exit 1	;\
-	fi
-	dh $@
+  ifneq (true,$(shell [ -f $(PERL5LIB)/Config.pm -a -f $(PERL5LIB)/Config_heavy.pl ] && echo true))
+    $(error Config.pm & Config_heavy.pl for cross building not found in $(PERL5LIB))
+  endif
 endif
 
 %:




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