[Pkg-haskell-commits] darcs: ghc: Import of ghc6_6.12.1-10.dsc
Kari Pahula
kaol at debian.org
Sat Jan 15 06:07:45 UTC 2011
Fri Feb 19 16:08:57 UTC 2010 Kari Pahula <kaol at debian.org>
* Import of ghc6_6.12.1-10.dsc
A ./Dh_Haskell.sh
M ./changelog +11
M ./control -2 +2
A ./dh_haskell_provides
M ./ghc6.postinst.in +1
A ./index.html
M ./provided_substvars -1 +1
M ./rules +2
Fri Feb 19 16:08:57 UTC 2010 Kari Pahula <kaol at debian.org>
* Import of ghc6_6.12.1-10.dsc
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog 2011-01-15 06:07:44.969465340 +0000
+++ new-ghc/changelog 2011-01-15 06:07:45.029468500 +0000
@@ -1,3 +1,14 @@
+ghc6 (6.12.1-10) unstable; urgency=low
+
+ * Use dh_haskell_depends from haskell-devscripts to create provides
+ including the packages ABI.
+ * Make provided substvar for utf8-string too.
+ * Run "ghc-pkg check" in ghc6's trigger also.
+ * Added a stub /usr/share/doc/ghc6-doc/index.html that redirects to
+ html/index.html.
+
+ -- Kari Pahula <kaol at debian.org> Fri, 19 Feb 2010 18:08:57 +0200
+
ghc6 (6.12.1-9) unstable; urgency=low
* Remove /usr/lib/ghc-$(ProjectVersion)/lib/haddock (ie. the internal
diff -rN -u old-ghc/control new-ghc/control
--- old-ghc/control 2011-01-15 06:07:44.969465340 +0000
+++ new-ghc/control 2011-01-15 06:07:45.013467657 +0000
@@ -9,7 +9,7 @@
Package: ghc6
Architecture: any
Depends: perl | perl5, gcc (>= 4:4.2), libgmp3-dev, libffi-dev, libbsd-dev, libc6-dev, ${shlibs:Depends}, ${misc:Depends}
-Provides: haskell-compiler, ghc, haddock, ${provided-devs}
+Provides: haskell-compiler, ghc, haddock, ${provided-devs}, ${haskell:Provides}
Conflicts: ghc4 (<= 4.08.1-4), haddock
Replaces: haddock, ghc6-doc (= 6.12.1-8)
Breaks: cabal-install (<< 0.8.0), haskell-devscripts (<< 0.6.19), ghc6-doc (<= 6.12.1-8)
@@ -26,7 +26,7 @@
Package: ghc6-prof
Architecture: any
-Provides: ghc-prof, ${provided-profs}
+Provides: ghc-prof, ${provided-profs}, ${haskell:Provides}
Depends: ghc6 (= ${binary:Version}), ${misc:Depends}
Description: Profiling libraries for the Glasgow Haskell Compilation system
Version 6 of the Glorious Glasgow Haskell Compilation system (GHC). GHC is
diff -rN -u old-ghc/dh_haskell_provides new-ghc/dh_haskell_provides
--- old-ghc/dh_haskell_provides 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/dh_haskell_provides 2011-01-15 06:07:44.977465761 +0000
@@ -0,0 +1,99 @@
+#! /bin/sh
+#
+# Calculated provides substvars for haskell library packages.
+#
+# Copyright (C) 2006-2007 Arjan Oosting <arjan at debian.org>
+# Copyright (C) 2009 Joachim Breitner <nomeata at debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of either:
+#
+# 1) 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.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# 2) BSD 3-clause license.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# * The names of contributors may not be used to endorse or promote
+# products derived from this software without specific prior
+# written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -e
+
+if test -e debian/Dh_Haskell.sh
+then
+ . debian/Dh_Haskell.sh
+else
+ . /usr/share/haskell-devscripts/Dh_Haskell.sh
+fi
+
+for pkg in `dh_listpackages $args`; do
+ sfile=debian/$pkg.substvars
+ touch $sfile
+
+ case "$pkg" in
+ libghc6-*-dev|libghc6-*-prof|ghc6|ghc6-prof)
+ if [ -z "$files" ] ; then
+ cfiles=`find_config_for_ghc6 $pkg`
+ else
+ cfiles="$files"
+ fi
+ if [ -z "$cfiles" ] ; then
+ echo "No installed package description files can not be found" >&2
+ exit 1
+ fi
+ case "$pkg" in
+ libghc6-*-dev|ghc6)
+ grep -v \
+ -e ^haskell:Provides \
+ $sfile > $sfile.tmp || true
+ echo "haskell:Provides=`provides_for_ghc6 $cfiles`" >> $sfile.tmp
+ ;;
+ libghc6-*-prof|ghc6-prof)
+ grep -v \
+ -e ^haskell:Provides \
+ $sfile > $sfile.tmp || true
+ echo "haskell:Provides=`provides_for_ghc6_prof $cfiles`" >> $sfile.tmp
+ ;;
+ esac
+ mv $sfile.tmp $sfile
+ ;;
+ *)
+ ;;
+ esac
+done
diff -rN -u old-ghc/Dh_Haskell.sh new-ghc/Dh_Haskell.sh
--- old-ghc/Dh_Haskell.sh 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/Dh_Haskell.sh 2011-01-15 06:07:44.977465761 +0000
@@ -0,0 +1,239 @@
+strip_hash(){
+ echo "$1" | sed 's/-................................$//'
+}
+
+sort_uniq(){
+ {
+ for i in "$@" ; do
+ echo $i
+ done
+ } | sort -u | tr "\n" " "
+}
+
+dependency(){
+ local package
+ local version
+ local next_upstream_version
+ package=$1
+ version=`dpkg-query --showformat='${Version}' -W $package`
+ next_upstream_version=`echo $version | sed -e 's/-[^-]*$//' -e 's/$/+/'`
+ echo "$package (>= $version), $package (<< $next_upstream_version)"
+}
+
+providing_package_for_ghc6(){
+ local package
+ local dep
+ local dir
+ local dirs
+ local lib
+ dep=`strip_hash $1`
+ dirs=`ghc-pkg6 field $dep library-dirs | grep -i ^library-dirs | cut -d':' -f 2`
+ lib=`ghc-pkg6 field $dep hs-libraries | grep -i ^hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+ for dir in $dirs ; do
+ if [ -e "${dir}/lib${lib}.a" ] ; then
+ package=`dpkg-query -S ${dir}/lib${lib}.a | cut -d':' -f 1` || exit $?
+ continue
+ fi
+ done
+ echo $package
+}
+
+providing_package_for_ghc6_prof(){
+ local package
+ local dep
+ local dir
+ local dirs
+ local lib
+ dep=`strip_hash $1`
+ dirs=`ghc-pkg6 field $dep library-dirs | grep -i ^library-dirs | cut -d':' -f 2`
+ lib=`ghc-pkg6 field $dep hs-libraries | grep -i ^hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+ for dir in $dirs ; do
+ if [ -e "${dir}/lib${lib}_p.a" ] ; then
+ package=`dpkg-query -S ${dir}/lib${lib}_p.a | cut -d':' -f 1` || exit $?
+ continue
+ fi
+ done
+ echo $package
+}
+
+cabal_package_ids(){
+ local config
+ local package_ids
+ until [ -z "$1" ]
+ do
+ config=$1
+ package_ids="$package_ids `grep-dctrl -n -i -s Id "" $config`"
+ shift
+ done
+ echo $package_ids
+}
+
+cabal_depends(){
+ local config
+ local dep
+ local depends
+ local final_depends
+ until [ -z "$1" ]
+ do
+ config=$1
+ depends="$depends `grep-dctrl -n -i -s Depends "" $config | tr "," " "`"
+ shift
+ done
+ for dep in `sort_uniq $depends` ; do
+ # The package is not mentioned in the ignored package list with the same version
+ # or mentioned without any version in the ignored package list?
+ if echo " $ignores " | grep -qv " $dep " &&
+ echo " $ignores " | grep -qv " `echo $dep | sed s%-[0-9][.0-9a-zA-Z]*$%%` " ;
+ then
+ final_depends="$final_depends $dep"
+ fi
+ done
+ echo $final_depends
+}
+
+hashed_dependency(){
+ local type
+ local pkgid
+ local virpkg
+ type=$1
+ pkgid=$2
+ virtual_pkg=`package_id_to_virtual_package $type $pkgid`
+ # As a transition measure, check if dpkg knows about this virtual package
+ if dpkg-query -W $virtual_pkg >/dev/null 2>/dev/null;
+ then
+ echo $virtual_pkg
+ fi
+}
+
+depends_for_ghc6(){
+ local dep
+ local packages
+ local pkgid
+ for pkgid in `cabal_depends $@` ; do
+ dep=`hashed_dependency dev $pkgid`
+ if [ -z "$dep" ]
+ then
+ pkg=`providing_package_for_ghc6 $pkgid`
+ if [ -n "$pkg" ]
+ then
+ dep=`dependency $pkg`
+ packages="$packages, $dep"
+ fi
+ else
+ packages="$packages, $dep"
+ fi
+ done
+
+ echo $packages | sed -e 's/^,[ ]*//'
+}
+
+depends_for_ghc6_prof(){
+ local dep
+ local packages
+ local pkgid
+ for pkgid in `cabal_depends $@` ; do
+ dep=`hashed_dependency prof $pkgid`
+ if [ -z "$dep" ]
+ then
+ pkg=`providing_package_for_ghc6_prof $pkgid`
+ dep=`dependency $pkg`
+ fi
+ packages="$packages, $dep"
+ done
+
+ echo $packages | sed -e 's/^,[ ]*//'
+}
+
+provides_for_ghc6(){
+ local dep
+ local packages
+ for package_id in `cabal_package_ids $@` ; do
+ packages="$packages, `package_id_to_virtual_package dev $package_id`"
+ done
+ echo $packages | sed -e 's/^,[ ]*//'
+}
+
+provides_for_ghc6_prof(){
+ local dep
+ local packages
+ for package_id in `cabal_package_ids $@` ; do
+ packages="$packages, `package_id_to_virtual_package prof $package_id`"
+ done
+ echo $packages | sed -e 's/^,[ ]*//'
+}
+
+package_id_to_virtual_package(){
+ local type
+ type="$1"
+ echo $2 | tr A-Z a-z | \
+ grep '[a-z0-9]\+-[0-9\.]\+-................................' | \
+ perl -pe 's/([a-z0-9-]+)-([0-9\.]+)-(.....).........................../libghc6-\1-'$type'-\2-\3/'
+}
+
+depends_for_hugs(){
+ local version
+ local upstream_version
+ version=`dpkg-query --showformat='${Version}' -W hugs`
+ upstream_version=`echo $version | sed -e 's/-[^-]*$//'`
+ echo "hugs (>= $upstream_version)"
+}
+
+find_config_for_ghc6(){
+ local f
+ local pkg
+ pkg=$1
+ case "$pkg" in
+ ghc6-prof)
+ pkg=ghc6
+ ;;
+ libghc6-*-prof)
+ pkg=`echo $pkg | sed -e 's/-prof$/-dev/'`
+ ;;
+ *)
+ ;;
+ esac
+ for f in debian/$pkg/var/lib/ghc-*/package.conf.d/*.conf ; do
+ if [ -f "$f" ] ; then
+ echo $f
+ echo " "
+ fi
+ done
+}
+
+
+if ! [ `which grep-dctrl` > /dev/null ] ; then
+ echo "grep-dctrl is missing" >&2
+ exit 1
+fi
+
+args=
+ignores=
+files=
+until [ -z "$1" ]
+do
+ case "$1" in
+ -X*)
+ pkg=${1##-X}
+ ignores="$ignores $pkg"
+ ;;
+
+ --exclude=*)
+ pkg=${1##--exclude=}
+ ignores="$ignores $pkg"
+ ;;
+
+ -*)
+ args="$args $1"
+ ;;
+ *)
+ if [ -f $1 ] ; then
+ files="$files $1"
+ else
+ echo "Installed package description file $1 can not be found" >&2
+ exit 1
+ fi
+ ;;
+ esac
+ shift
+done
+
diff -rN -u old-ghc/ghc6.postinst.in new-ghc/ghc6.postinst.in
--- old-ghc/ghc6.postinst.in 2011-01-15 06:07:44.969465340 +0000
+++ new-ghc/ghc6.postinst.in 2011-01-15 06:07:45.025468289 +0000
@@ -59,6 +59,7 @@
;;
triggered)
$bindir/ghc-pkg recache
+ $bindir/ghc-pkg check
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
diff -rN -u old-ghc/index.html new-ghc/index.html
--- old-ghc/index.html 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/index.html 2011-01-15 06:07:44.977465761 +0000
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>GHC's documentation has moved</title>
+ <meta http-equiv="REFRESH" content="0;url=html/index.html"></head>
+ <body>
+ GHC's documentation's main page is no longer in this place.
+ Instead, see <a href="html/index.html">html/index.html</a>.
+ </body>
+</html>
diff -rN -u old-ghc/provided_substvars new-ghc/provided_substvars
--- old-ghc/provided_substvars 2011-01-15 06:07:44.969465340 +0000
+++ new-ghc/provided_substvars 2011-01-15 06:07:44.981465972 +0000
@@ -5,7 +5,7 @@
open PKG, 'inplace/bin/ghc-pkg list --simple-output |'
or die "ghc-pkg list failed: $!";
my @pkgs;
-my @ignored = ('ghc', 'mtl', 'utf8-string', 'terminfo', 'haskeline');
+my @ignored = ('ghc', 'mtl', 'terminfo', 'haskeline');
while (<PKG>) {
y/A-Z/a-z/;
my $pkgstring = $_;
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules 2011-01-15 06:07:44.969465340 +0000
+++ new-ghc/rules 2011-01-15 06:07:45.029468500 +0000
@@ -185,6 +185,7 @@
mkdir debian/tmp/usr/lib/ghc-$(ProjectVersion)/haddock/`basename $$f` ; \
mv $$f/*.haddock debian/tmp/usr/lib/ghc-$(ProjectVersion)/haddock/`basename $$f` ; done
cd debian/tmp/usr/share/doc/ghc6-doc/html/libraries/; ln -s ghc-$(ProjectVersion) ghc
+ install -Dm 644 debian/index.html debian/tmp/usr/share/doc/ghc6-doc/index.html
endif
# manpages
@@ -266,6 +267,7 @@
dh_link -a
dh_compress -X.haddock -a
dh_fixperms -a
+ sh debian/dh_haskell_provides
dh_installdeb -a
dh_shlibdeps -XlibHS
dh_gencontrol -a
More information about the Pkg-haskell-commits
mailing list