diff -Nru haskell-devscripts-0.8.12ubuntu1/debian/changelog haskell-devscripts-0.8.19.5czchen1/debian/changelog --- haskell-devscripts-0.8.12ubuntu1/debian/changelog 2012-03-10 17:08:45.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/debian/changelog 2014-03-29 01:57:22.000000000 +0000 @@ -1,11 +1,116 @@ -haskell-devscripts (0.8.12ubuntu1) precise; urgency=low +haskell-devscripts (0.8.19.5czchen1) precise; urgency=medium - * Merge with Debian; remaining changes: - - dh_haskell_shlibdeps: If the test object doesn't have any unresolved - symbols from libffi or libgmp, remove the dependencies on libffi and - libgmp. + * Backport for precise - -- Iain Lane Sat, 10 Mar 2012 17:08:13 +0000 + -- ChangZhuo Chen (陳昌倬) Sat, 29 Mar 2014 09:56:57 +0800 + +haskell-devscripts (0.8.19.5) unstable; urgency=medium + + * dh_haskell_shlibdeps: Get -L flags from the library-dirs field. + + -- Joachim Breitner Sun, 16 Mar 2014 15:19:40 +0100 + +haskell-devscripts (0.8.19.4) unstable; urgency=medium + + * Simplify dh_haskell_shlibdeps + Instead of building a haskell program and running dpkg-shlibdeps (which + picks up shared library dependencies of dependencies of this module) + instead parse the ghc-pkg information of this package and use the + information from the "extra-libraries" field. Then build a probe + C program linking against these libraries and run dpkg-shlibdeps on them. + (This also removes special handling of libffi and libgmp, and makes it + compatible with ghc-7.8.) + * Prevent dh_shlibdeps to look at libHS* libraries. + + -- Joachim Breitner Sun, 09 Feb 2014 20:45:53 +0000 + +haskell-devscripts (0.8.19.3) unstable; urgency=medium + + * Run dh_haskell_blurbs on all packages (Closes: #721461) + + -- Joachim Breitner Sun, 09 Feb 2014 12:48:39 +0000 + +haskell-devscripts (0.8.19.2) unstable; urgency=medium + + * Remove the final newline from haskell:LongDescription, now that + http://bugs.debian.org/680871 is fixed. + + -- Joachim Breitner Tue, 10 Dec 2013 22:56:06 +0000 + +haskell-devscripts (0.8.19.1) unstable; urgency=low + + * add an encoding declaration in dh_haskell_shlibdeps.pod (Closes: #723882) + + -- Louis Bettens Fri, 20 Sep 2013 22:33:19 +0200 + +haskell-devscripts (0.8.19) unstable; urgency=low + + * Fix /usr/share/ subdirectory + + -- Louis Bettens Tue, 30 Jul 2013 08:48:41 +0200 + +haskell-devscripts (0.8.18) unstable; urgency=low + + * Ensure that debian/rules binary works. (Closes: #717442) + + -- Joachim Breitner Sun, 21 Jul 2013 19:27:10 +0200 + +haskell-devscripts (0.8.17) unstable; urgency=low + + * Allow a package to disable the installation of the hoogle file (prepares + the fix for #709771) + + -- Joachim Breitner Sun, 26 May 2013 10:37:57 +0200 + +haskell-devscripts (0.8.16) unstable; urgency=low + + * Remove some unnecssary build-depends version constraints (found by cme) + * Avoid adding dependencies on libffi and libgmp to libghc-*-foo (Closes: + 639015) + * Bump compat level + * Add build-arch and build-indep targets + + -- Joachim Breitner Fri, 24 May 2013 11:16:32 +0200 + +haskell-devscripts (0.8.15) experimental; urgency=low + + * dh_haskell_blurbs added, provides substitution variables for the common + package description blurbs, and also for reading the package description + from the Source’s Description field. + Until http://bugs.debian.org/680871 is fixed this does not work well for + packages with multiple paragraphs in their description. + + -- Joachim Breitner Fri, 17 May 2013 21:51:33 +0200 + +haskell-devscripts (0.8.14) experimental; urgency=low + + * Explicitly mention which Prelude to use in dh_haskell_shlibdeps, thanks to + Clifford Beshers for the patch. + * Use cdbsn' $(DEB_PACKAGES) instead of parsing debian/control to see if + profiling is desired. + * Support installing Cabal-built binaries: Put the name of the binary in + debian/pkg.haskell-binaries to ship the binary in that package + * Add GHC-Package field to the Packages file + + -- Joachim Breitner Sat, 11 May 2013 14:24:37 +0200 + +haskell-devscripts (0.8.13) experimental; urgency=low + + [ Joachim Breitner ] + * Improve parsing of "Setup register" output, patch by David Fox + * Enable creation of hoogle files, thanks to Kiwamu Okabe for the + suggestion. + + [ Kiwamu Okabe ] + * Need --html option to fix bug that --hoogle option don't output html file. + * Support to create /usr/lib/ghc-doc/hoogle/*.txt for hoogle package. + + [ Joachim Breitner ] + * Symlink hoogle’s txt files to /usr/lib/ghc-doc/hoogle/ + * Bump ghc dependency to 7.6 + * Bump standards version + + -- Joachim Breitner Mon, 08 Oct 2012 21:14:50 +0200 haskell-devscripts (0.8.12) unstable; urgency=low @@ -29,15 +134,6 @@ -- Joachim Breitner Wed, 04 Jan 2012 20:13:14 +0100 -haskell-devscripts (0.8.9ubuntu1) precise; urgency=low - - * Merge with Debian; remaining changes: - - dh_haskell_shlibdeps: If the test object doesn't have any unresolved - symbols from libffi or libgmp, remove the dependencies on libffi and - libgmp. Closes: #639015. - - -- Matthias Klose Thu, 17 Nov 2011 07:57:44 +0100 - haskell-devscripts (0.8.9) unstable; urgency=low [ Giovanni Mascellani ] diff -Nru haskell-devscripts-0.8.12ubuntu1/debian/compat haskell-devscripts-0.8.19.5czchen1/debian/compat --- haskell-devscripts-0.8.12ubuntu1/debian/compat 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/debian/compat 2013-07-21 17:18:14.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru haskell-devscripts-0.8.12ubuntu1/debian/control haskell-devscripts-0.8.19.5czchen1/debian/control --- haskell-devscripts-0.8.12ubuntu1/debian/control 2012-03-10 17:07:37.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/debian/control 2013-07-30 19:59:52.000000000 +0000 @@ -3,9 +3,10 @@ Priority: extra Maintainer: Debian Haskell Group Uploaders: Marco Silva , Joachim Breitner -Build-Depends: debhelper (>= 7) + , Louis Bettens +Build-Depends: debhelper (>= 9) Build-Depends-Indep: perl -Standards-Version: 3.9.1 +Standards-Version: 3.9.4 Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-devscripts Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/haskell-devscripts @@ -14,12 +15,12 @@ Depends: dctrl-tools , debhelper , dh-buildinfo - , ghc (>= 7.4) + , ghc (>= 7.6) , cdbs , ${misc:Depends} , html-xml-utils - , hscolour (>= 1.8) - , ghc-haddock (>= 7.4) + , hscolour + , ghc-haddock Description: Tools to help Debian developers build Haskell packages This package provides a collection of scripts to help build Haskell packages for Debian. Unlike haskell-utils, this package is not diff -Nru haskell-devscripts-0.8.12ubuntu1/debian/install haskell-devscripts-0.8.19.5czchen1/debian/install --- haskell-devscripts-0.8.12ubuntu1/debian/install 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/debian/install 2013-07-21 17:18:14.000000000 +0000 @@ -2,5 +2,6 @@ dh_haskell_depends usr/bin/ dh_haskell_shlibdeps usr/bin/ dh_haskell_extra_depends usr/bin/ +dh_haskell_blurbs usr/bin/ Dh_Haskell.sh usr/share/haskell-devscripts/ hlibrary.mk usr/share/cdbs/1/class diff -Nru haskell-devscripts-0.8.12ubuntu1/debian/manpages haskell-devscripts-0.8.19.5czchen1/debian/manpages --- haskell-devscripts-0.8.12ubuntu1/debian/manpages 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/debian/manpages 2013-07-21 17:18:14.000000000 +0000 @@ -2,3 +2,4 @@ dh_haskell_depends.1 dh_haskell_shlibdeps.1 dh_haskell_extra_depends.1 +dh_haskell_blurbs.1 diff -Nru haskell-devscripts-0.8.12ubuntu1/debian/rules haskell-devscripts-0.8.19.5czchen1/debian/rules --- haskell-devscripts-0.8.12ubuntu1/debian/rules 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/debian/rules 2013-07-21 17:18:14.000000000 +0000 @@ -15,7 +15,11 @@ pod2man -c 'Haskell devscripts documentation' -r 'Haskell devscripts $(DEB_VERSION)' $< > $@ .PHONY: build -build: $(manpages) +build-indep: $(manpages) + +build-arch: + +build: build-arch build-indep install-stamp: dh install @@ -28,10 +32,10 @@ touch $@ .PHONY: binary-indep -binary-indep: binary-indep-stamp +binary-indep: build-indep binary-indep-stamp .PHONY: binary-arch -binary-arch: install-stamp +binary-arch: build-arch install-stamp .PHONY: binary binary: binary-indep-stamp diff -Nru haskell-devscripts-0.8.12ubuntu1/dh_haskell_blurbs haskell-devscripts-0.8.19.5czchen1/dh_haskell_blurbs --- haskell-devscripts-0.8.12ubuntu1/dh_haskell_blurbs 1970-01-01 00:00:00.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/dh_haskell_blurbs 2014-02-09 12:47:02.000000000 +0000 @@ -0,0 +1,59 @@ +#! /bin/sh +# +# Create substvars for the Haskell package description blurbs +# +# Copyright (C) 2013 Joachim Breitner + +set -e + +for pkg in `dh_listpackages $args`; do + sfile=debian/$pkg.substvars + touch $sfile + + grep -v \ + -e ^haskell:Blurb \ + -e ^haskell:ShortBlurb \ + -e ^haskell:LongDescription \ + -e ^haskell:ShortDescription \ + $sfile > $sfile.tmp || true + + case "$pkg" in + libghc-*-dev) cat >> $sfile.tmp <<'__END__' ;; +haskell:ShortBlurb= +haskell:Blurb=This package provides a library for the Haskell programming language.${Newline}See http://www.haskell.org/ for more information on Haskell. +__END__ + + libghc-*-prof) cat >> $sfile.tmp <<'__END__' ;; +haskell:ShortBlurb=; profiling libraries +haskell:Blurb=This package provides a library for the Haskell programming language, compiled${Newline}for profiling. See http://www.haskell.org/ for more information on Haskell. +__END__ + + libghc-*-doc) cat >> $sfile.tmp <<'__END__' ;; +haskell:ShortBlurb=; documentation +haskell:Blurb=This package provides the documentation for a library for the Haskell${Newline}programming language.${Newline}See http://www.haskell.org/ for more information on Haskell. +__END__ + + esac + + shortDescription="$( + cat debian/control | + grep-dctrl -F Source '' -s X-Description -n| + head -n1 + )" + + longDescription="$( + cat debian/control | + grep-dctrl -F Source '' -s X-Description -n| + sed 's/^[\t ]//;s/^\.$//'| # remove initial space + tail -n +2| # skip short description + perl -pe 's/\n$/\${Newline}/'| # prepare for dpkg-gencontrol + perl -pe 's/\${Newline}$//' # but not final lineline + )" + + cat >> $sfile.tmp <<__END__ +haskell:ShortDescription=$shortDescription +haskell:LongDescription=$longDescription +__END__ + + mv $sfile.tmp $sfile +done diff -Nru haskell-devscripts-0.8.12ubuntu1/dh_haskell_blurbs.pod haskell-devscripts-0.8.19.5czchen1/dh_haskell_blurbs.pod --- haskell-devscripts-0.8.12ubuntu1/dh_haskell_blurbs.pod 1970-01-01 00:00:00.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/dh_haskell_blurbs.pod 2013-07-21 17:18:15.000000000 +0000 @@ -0,0 +1,39 @@ +=head1 NAME + +dh_haskell_blurb - standard haskell package description blurbs + +=head1 SYNOPSIS + +B [S>] +[B<-X>I] +[B<--exclude=>I] +[S> ...] + +=head1 DESCRIPTION + +dh_haskell_blurbs is a debhelper program provides substvars for the standard blurbs occurring in Haskell package descriptions. + +To use it, move the common parts of the description to the source stanza: + + X-Description: Cool library + This is a pure Haskell implementation of coolness. It is cooler + than implementation via foreign languages, because we can. + +And then use the following for every Haskell library package stanza, C, C and C: + + Description: ${haskell:ShortDescription}${haskell:ShortBlurb} + ${haskell:LongDescription} + . + ${haskell:Blurb} + + +=head1 SEE ALSO + +L +L +L +L + +=head1 AUTHOR + +Joachim Breitner diff -Nru haskell-devscripts-0.8.12ubuntu1/dh_haskell_provides haskell-devscripts-0.8.19.5czchen1/dh_haskell_provides --- haskell-devscripts-0.8.12ubuntu1/dh_haskell_provides 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/dh_haskell_provides 2013-07-21 17:18:15.000000000 +0000 @@ -3,7 +3,7 @@ # Calculated provides substvars for haskell library packages. # # Copyright (C) 2006-2007 Arjan Oosting -# Copyright (C) 2009 Joachim Breitner +# Copyright (C) 2009,2013 Joachim Breitner # # This program is free software; you can redistribute it and/or modify # it under the terms of either: @@ -83,15 +83,21 @@ -e ^haskell:Provides \ $sfile > $sfile.tmp || true echo "haskell:Provides=`provides_for_ghc $cfiles`" >> $sfile.tmp + mv $sfile.tmp $sfile + grep -v \ + -e ^haskell:ghc-package \ + $sfile > $sfile.tmp || true + echo "haskell:ghc-package=`cabal_package_ids $cfiles`" >> $sfile.tmp + mv $sfile.tmp $sfile ;; libghc-*-prof|ghc-prof) grep -v \ -e ^haskell:Provides \ $sfile > $sfile.tmp || true echo "haskell:Provides=`provides_for_ghc_prof $cfiles`" >> $sfile.tmp + mv $sfile.tmp $sfile ;; esac - mv $sfile.tmp $sfile ;; *) ;; diff -Nru haskell-devscripts-0.8.12ubuntu1/dh_haskell_shlibdeps haskell-devscripts-0.8.19.5czchen1/dh_haskell_shlibdeps --- haskell-devscripts-0.8.12ubuntu1/dh_haskell_shlibdeps 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/dh_haskell_shlibdeps 2014-03-16 14:15:55.000000000 +0000 @@ -2,6 +2,8 @@ # arch-tag: Debhelper script for Haskell # # Copyright (C) 2009 Marco Túlio Gontijo e Silva +# Copyright (C) 2014 Joachim Breitner +# # Based on mk-haskell-depends by Martin Sjögren # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -46,39 +48,28 @@ T_DIR=debian/dh_haskell_shlibdeps mkdir $T_DIR 2> /dev/null || true -echo '[]' > $T_DIR/package.conf + +args="" for file in $files do - pkg=`echo $file | cut -d/ -f2 | cut -d- -f2- | sed -e 's/-[^-]\+$//'` - pkgconflocal=$T_DIR/$pkg.package.conf - cat $file | sed -e \ - "/^\(import\|library\|include\)-dirs: / { \ - s#/usr/lib/haskell-packages#$PWD/debian/libghc-$pkg-dev/usr/lib/haskell-packages#g }" \ - > $pkgconflocal - ghc-pkg -f $T_DIR/package.conf register $pkgconflocal --force \ - 2>&1 > /dev/null || true + for dir in $(grep-dctrl -s library-dirs -n . < $file) + do + args="$args -L$dir" + done + for lib in $(grep-dctrl -s extra-libraries -n . < $file) + do + args="$args -l$lib" + done done + +echo 'main () {}' > $T_DIR/probe.c +gcc $args $T_DIR/probe.c -o $T_DIR/probe + for pkg in $pkgs do case "$pkg" in libghc-*-dev) - sfile=debian/$pkg.substvars - pkgname=`basename debian/$pkg/usr/lib/haskell-packages/ghc/lib/* | sed -e 's/-[^-]\+$//'` - touch $sfile - echo "module Main where main = return ()" > $T_DIR/a.hs - ghc --make $T_DIR/a.hs -o $T_DIR/a.out -package-conf \ - $T_DIR/package.conf -package $pkgname - dpkg-shlibdeps -Tdebian/$pkg.substvars $T_DIR/a.out - - # remove the dependencies on shared libs already in the ghc package - if [ $(nm -u $T_DIR/a.o | grep 'U ffi_' | wc -l) -eq 0 ]; then - libffi=$(dpkg -s ghc | sed -n '/^Depends/s/.*\(libffi[0-9][0-9]*\).*/\1/p') - sed -i -r "s/ *$libffi[^,]*"'(, *|$)//g;s/,$//' debian/$pkg.substvars - fi - if [ $(nm -u $T_DIR/a.o | grep 'U __gmp' | wc -l) -eq 0 ]; then - libgmp=$(dpkg -s ghc | sed -n '/^Depends/s/.*\(libgmp[0-9][0-9]*\).*/\1/p') - sed -i -r "s/ *$libgmp[^,]*"'(, *|$)//g;s/,$//' debian/$pkg.substvars - fi + dpkg-shlibdeps --warnings=1 -Tdebian/$pkg.substvars $T_DIR/probe ;; esac done diff -Nru haskell-devscripts-0.8.12ubuntu1/dh_haskell_shlibdeps.pod haskell-devscripts-0.8.19.5czchen1/dh_haskell_shlibdeps.pod --- haskell-devscripts-0.8.12ubuntu1/dh_haskell_shlibdeps.pod 2012-03-10 17:06:36.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/dh_haskell_shlibdeps.pod 2013-09-21 17:59:44.000000000 +0000 @@ -1,3 +1,4 @@ +=encoding utf8 =head1 NAME dh_haskell_shlibdeps - calculates Haskell external dependencies on Cabalized diff -Nru haskell-devscripts-0.8.12ubuntu1/hlibrary.mk haskell-devscripts-0.8.19.5czchen1/hlibrary.mk --- haskell-devscripts-0.8.12ubuntu1/hlibrary.mk 2012-03-10 17:07:37.000000000 +0000 +++ haskell-devscripts-0.8.19.5czchen1/hlibrary.mk 2014-02-09 20:40:29.000000000 +0000 @@ -31,12 +31,26 @@ CABAL_VERSION=$(shell cat *.cabal | egrep -i '^\s*version:' | head -n1 | sed -r 's,^\s*version:\s*,,i'| sed -r 's,\s*$$,,i') DEB_ENABLE_TESTS ?= no +DEB_ENABLE_HOOGLE ?= yes -ENABLE_PROFILING = $(shell egrep -qe '^Package: libghc-.*-prof$$' debian/control && echo --enable-library-profiling; exit 0) +DEB_DH_GENCONTROL_ARGS_libghc-$(CABAL_PACKAGE)-dev += -- '-DGHC-Package=$${haskell:ghc-package}' + +ifneq (,$(filter libghc-$(CABAL_PACKAGE)-prof,$(DEB_PACKAGES))) +ENABLE_PROFILING = --enable-library-profiling +endif NO_GHCI_FLAG = $(shell test -e /usr/bin/ghci || echo --ghc-option=-DDEBIAN_NO_GHCI; exit 0) -DEB_COMPRESS_EXCLUDE += .haddock .hs +DEB_COMPRESS_EXCLUDE += .haddock .hs .txt + +# We do not want to take dependency information +# from libHS*.so files, because +# * dh_haskell_shlibs takes care of that and +# * it would introduced unwanted dependencies on libgmp +# If the latter can be avoided, this could be changed to +# DEB_DH_SHLIBDEPS_ARGS_ALL += -- --ignore-missing-info +# (because we do not (yet) have shlibs files for libHS libraries) +DEB_DH_SHLIBDEPS_ARGS_ALL += -XlibHS # TODO: # - some of this would probably be useful for generic Haskell programs, @@ -52,10 +66,13 @@ GHC_VERSION = $(shell ghc --numeric-version) DEB_HADDOCK_DIR ?= /usr/lib/ghc-doc/haddock/$(CABAL_PACKAGE)-$(CABAL_VERSION)/ +DEB_HADDOCK_OPTS += --html --hoogle ifndef DEB_NO_IMPLICIT_HADDOCK_HYPERLINK DEB_HADDOCK_OPTS += --hyperlink-source endif +DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/ + MAKEFILE := debian/hlibrary.Makefile #ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) @@ -82,6 +99,7 @@ rm -f build-ghc-stamp build-hugs-stamp build-haddock-stamp rm -rf debian/tmp-inst-ghc rm -f debian/extra-depends + rm -f debian/libghc-$(CABAL_PACKAGE)-doc.links rm -f $(MAKEFILE) rm -rf debian/dh_haskell_shlibdeps @@ -93,7 +111,7 @@ $(DEB_SETUP_BIN_NAME) configure --ghc -v2 \ --prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib \ --builddir=dist-ghc \ - --haddockdir=$(DEB_HADDOCK_DIR) \ + --haddockdir=$(DEB_HADDOCK_DIR) --datasubdir=$(CABAL_PACKAGE)\ --htmldir=$(DEB_HADDOCK_HTML_DIR) $(ENABLE_PROFILING) $(NO_GHCI_FLAG) \ $(DEB_SETUP_GHC6_CONFIGURE_ARGS) $(DEB_SETUP_GHC_CONFIGURE_ARGS) $(OPTIMIZATION) $(TESTS) @@ -131,11 +149,11 @@ build/libhugs-$(CABAL_PACKAGE):: dist-hugs $(DEB_SETUP_BIN_NAME) build --builddir=dist-hugs -debian/tmp-inst-ghc: $(DEB_SETUP_BIN_NAME) dist-ghc +debian/tmp-inst-ghc: $(DEB_SETUP_BIN_NAME) build-ghc-stamp $(DEB_SETUP_BIN_NAME) copy --builddir=dist-ghc --destdir=debian/tmp-inst-ghc debian/extra-depends: debian/tmp-inst-ghc - pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | sed -r 's,.*: ,,'` ; \ + pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'` ; \ dh_haskell_extra_depends $$pkg_config ; \ rm $$pkg_config @@ -143,7 +161,7 @@ cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \ \( ! -name "*_p.a" ! -name "*.p_hi" \) \ -exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';' - pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | sed -r 's,.*: ,,'`; \ + pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | tr -d ' \n' | sed -r 's,^.*:,,'`; \ $(if $(HASKELL_HIDE_PACKAGES),sed -i 's/^exposed: True$$/exposed: False/' $$pkg_config;) \ install -Dm 644 $$pkg_config debian/$(notdir $@)/var/lib/ghc/package.conf.d/$$pkg_config; \ rm -f $$pkg_config @@ -161,7 +179,7 @@ dh_haskell_provides -p$(notdir $@) dh_haskell_depends -p$(notdir $@) -install/haskell-$(CABAL_PACKAGE)-doc install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc debian/extra-depends +install/haskell-$(CABAL_PACKAGE)-doc install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc build-haddock-stamp debian/extra-depends mkdir -p debian/$(notdir $@)/$(DEB_HADDOCK_HTML_DIR) cd debian/tmp-inst-ghc/ ; find ./$(DEB_HADDOCK_HTML_DIR)/ \ ! -name "*.haddock" -exec install -Dm 644 '{}' \ @@ -170,6 +188,11 @@ [ 0 = `ls debian/tmp-inst-ghc/$(DEB_HADDOCK_DIR)/ 2>/dev/null | wc -l` ] || \ cp -r debian/tmp-inst-ghc/$(DEB_HADDOCK_DIR)/*.haddock \ debian/$(notdir $@)/$(DEB_HADDOCK_DIR) +ifeq ($(DEB_ENABLE_HOOGLE),yes) + find debian/$(notdir $@)/$(DEB_HADDOCK_HTML_DIR) -name "*.txt" \ + -printf "%p $(DEB_HOOGLE_TXT_DIR)/%f\n" >> debian/libghc-$(CABAL_PACKAGE)-doc.links + sed -i s,^debian/libghc-$(CABAL_PACKAGE)-doc,, debian/libghc-$(CABAL_PACKAGE)-doc.links +endif dh_haskell_depends -p$(notdir $@) install/libhugs-$(CABAL_PACKAGE):: $(DEB_SETUP_BIN_NAME) dist-hugs debian/extra-depends @@ -177,3 +200,17 @@ rm -rf debian/libhugs-$(CABAL_PACKAGE)/usr/share/doc/* dh_haskell_depends -p$(notdir $@) +# Run dh_haskell_blurbs on all packags, useful e.g. for binary packages +$(patsubst %,install/%,$(DEB_PACKAGES)) :: install/%: + dh_haskell_blurbs -p$(cdbs_curpkg) + + +# Support for installing executables +define newline + + +endef +$(patsubst debian/%.haskell-binaries,build/%,$(wildcard debian/*.haskell-binaries)):: build-ghc-stamp + +$(patsubst debian/%.haskell-binaries,install/%,$(wildcard debian/*.haskell-binaries)):: debian/tmp-inst-ghc + $(foreach binary,$(shell cat debian/$(cdbs_curpkg).haskell-binaries),dh_install -p$(cdbs_curpkg) dist-ghc/build/$(binary)/$(binary) usr/bin $(newline))