diff options
author | Marco TĂșlio Gontijo e Silva <marcot@debian.org> | 2010-03-23 22:47:02 +0300 |
---|---|---|
committer | =?UTF-8?q?Marco=20T=C3=BAlio=20Gontijo=20e=20Silva?= <=?UTF-8?q?Marco=20T=C3=BAlio=20Gontijo=20e=20Silva?=> | 2010-03-23 22:47:02 +0300 |
commit | e48d34bb203f7974446a9b35d3bac16e0b6ed46b (patch) | |
tree | 1c3b7f5ba64a4bb6761f268b0656e88b2e105c2a | |
parent | 61293606c1221281facbc3a1215e845ea621151e (diff) | |
download | DHG_packages-e48d34bb203f7974446a9b35d3bac16e0b6ed46b.tar.gz |
haskell-devscripts: Remove Dh_Haskell.pm.
-rw-r--r-- | p/haskell-devscripts/debian/Dh_Haskell.pm | 165 | ||||
-rw-r--r-- | p/haskell-devscripts/debian/debian/changelog | 6 | ||||
-rw-r--r-- | p/haskell-devscripts/debian/debian/install | 1 |
3 files changed, 6 insertions, 166 deletions
diff --git a/p/haskell-devscripts/debian/Dh_Haskell.pm b/p/haskell-devscripts/debian/Dh_Haskell.pm deleted file mode 100644 index ba511ac63..000000000 --- a/p/haskell-devscripts/debian/Dh_Haskell.pm +++ /dev/null @@ -1,165 +0,0 @@ -# arch-tag: dh_haskell libary -# -# Copyright (C) 2004 John Goerzen <jgoerzen@complete.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# - -package Dh_Haskell; - -use strict; -use Debian::Debhelper::Dh_Lib 'doit'; - -use Exporter; -use vars qw(@ISA @EXPORT %dh); -@ISA=qw(Exporter); -@EXPORT = qw(&builddir &build_setup &cabal_version_ge &is_handled_package - &dev_name &type_of_package - &version_of_debpkg &version_of_type &upstream_version - &profiling_name &getcabalname &getcabalversion &getcabalnameversion - &getcabalbasepath &getcabalpkglibpath &getcabalpkgsharepath - ); - -sub builddir { - my $package = shift; -# (my $pkgtype = shift) =~ s/haddock/ghc6/ ; - return "debian/tmp/build/$package/"; -} - -sub build_setup { - if (! -x "setup" ) { - print "Building setup...\n"; - my $setup; - for my $candidate (qw(Setup.lhs Setup.hs)) { - $setup = $candidate, last if -e $candidate; - } - die unless -e $setup; - doit("ghc6 -package Cabal $setup -o setup"); - } -} - -sub dpkg_ge { - my $version1 = shift; - my $version2 = shift; - system("dpkg --compare-versions $version1 ge $version2"); - if ($? == -1) { die "Failed to execute: $!\n"; } - my $exitcode = $? >> 8; - return ! $exitcode; -} - -sub cabal_version_ge { - my $requested_version = shift; - my @versions = split('\n', `ghc-pkg6 --global field Cabal version`); - my $max = "0"; - foreach(@versions) { - s/^version: //; - if (dpkg_ge($_, $max)) { - $max = $_; - } - } - dpkg_ge($max, $requested_version); -} - -sub is_handled_package { - my $pkgname = shift; - if ($pkgname =~ m/^lib(ghc6|hugs)-.+-(dev|prof)$/) { - return 1; - } elsif ($pkgname =~ m/^libhugs-.+$/) { - return 1; - } elsif ($pkgname =~ m/^(haskell|libghc6)-.+doc$/) { - return 1; - } else { - return 0; - } -} - -sub dev_name { - my $package = shift; - my @pn = ($package =~ m/^lib(ghc6|hugs)-(.+)-prof$/); - return "lib$pn[0]-$pn[1]-dev"; -} - -sub type_of_package { - my $pkgname = shift; - if ($pkgname =~ m/^libhugs-.+$/) { - return "hugs"; - } elsif (my @pn = ($pkgname =~ m/^lib(ghc6|hugs)-.+-dev$/)) { - return $pn[0]; - } elsif ($pkgname =~ m/^libghc6-.+-prof$/) { - return "ghc6-prof"; - } elsif ($pkgname =~ m/-doc$/) { - return "haddock"; - } -} - -sub version_of_debpkg { - my $pkgname = shift; - my $retval = `dpkg-query --show --showformat='\${Version}' $pkgname`; - chomp $retval; - return $retval; - } - -sub version_of_type { - my $pkgtype = shift; - return version_of_debpkg($pkgtype); -} - -sub upstream_version { - my $inver = shift; - if ($inver =~ m/-/) { - my @v = ($inver =~ m/^(.+)-[^-]+$/); - return $v[0]; - } -} - -sub profiling_name { - my $package = shift; - my @pn = ($package =~ m/^lib(ghc6|hugs)-(.+)-dev$/); - return "lib$pn[0]-$pn[1]-prof"; -} - -sub getcabalname { - my $retval = `grep -i ^Name *.cabal | tr ':' ' ' | awk '{print \$2}'`; - chomp $retval; - return $retval; -} - -sub getcabalversion { - my $retval = `grep -i ^Version *.cabal | tr ':' ' ' | awk '{print \$2}'`; - chomp $retval; - return $retval; -} - -sub getcabalnameversion { - return getcabalname() . "-" . getcabalversion(); -} - -sub getcabalbasepath { - my $pkgtype = shift; - $pkgtype =~ s/-prof// ; - return "/usr/lib/haskell-packages/$pkgtype"; -} - -sub getcabalpkglibpath { - my $pkgtype = shift; - return getcabalbasepath($pkgtype) . "/lib/" . getcabalnameversion(); -} - -sub getcabalpkgsharepath { - my $pkgtype = shift; - return getcabalbasepath($pkgtype) . "/share/" . getcabalnameversion(); -} - -1 diff --git a/p/haskell-devscripts/debian/debian/changelog b/p/haskell-devscripts/debian/debian/changelog index 661819383..4b59c83b0 100644 --- a/p/haskell-devscripts/debian/debian/changelog +++ b/p/haskell-devscripts/debian/debian/changelog @@ -1,3 +1,9 @@ +haskell-devscripts (0.7.6) UNRELEASED; urgency=low + + * Remove Dh_Haskell.pm. + + -- Marco TĂșlio Gontijo e Silva <marcot@debian.org> Tue, 23 Mar 2010 16:45:54 -0300 + haskell-devscripts (0.7.5) unstable; urgency=low * hlibrary.mk: Create HASKELL_HIDE_PACKAGES variable, to make it diff --git a/p/haskell-devscripts/debian/debian/install b/p/haskell-devscripts/debian/debian/install index 1396b1f8b..d4cc10961 100644 --- a/p/haskell-devscripts/debian/debian/install +++ b/p/haskell-devscripts/debian/debian/install @@ -1,6 +1,5 @@ dh_haskell_provides usr/bin/ dh_haskell_depends usr/bin/ dh_haskell_shlibdeps usr/bin/ -Dh_Haskell.pm usr/share/haskell-devscripts/ Dh_Haskell.sh usr/share/haskell-devscripts/ hlibrary.mk usr/share/cdbs/1/class |