[Pkg-haskell-commits] darcs: haskell-devscripts: Added support to track data packages.
Giovanni Mascellani
gio at debian.org
Mon Jul 25 22:45:49 UTC 2011
Mon Jul 25 22:22:03 UTC 2011 Giovanni Mascellani <gio at debian.org>
* Added support to track data packages.
Ignore-this: 7203e51ed0163ab57623883e09f389c8
M ./debian/changelog +7
M ./debian/install +1
A ./dh_haskell_data_depends
M ./dh_haskell_depends -3 +5
M ./hlibrary.mk -4 +13
Mon Jul 25 22:22:03 UTC 2011 Giovanni Mascellani <gio at debian.org>
* Added support to track data packages.
Ignore-this: 7203e51ed0163ab57623883e09f389c8
diff -rN -u old-haskell-devscripts//debian/changelog new-haskell-devscripts//debian/changelog
--- old-haskell-devscripts//debian/changelog 2011-07-25 22:45:49.446187021 +0000
+++ new-haskell-devscripts//debian/changelog 2011-07-25 22:45:49.454059874 +0000
@@ -1,3 +1,10 @@
+haskell-devscripts (0.8.8) UNRELEASED; urgency=low
+
+ * Team upload.
+ * Added support to track data packages.
+
+ -- Giovanni Mascellani <gio at debian.org> Tue, 26 Jul 2011 00:19:44 +0200
+
haskell-devscripts (0.8.7) unstable; urgency=low
* Also install package.conf in version-agnostic path
diff -rN -u old-haskell-devscripts//debian/install new-haskell-devscripts//debian/install
--- old-haskell-devscripts//debian/install 2011-07-25 22:45:49.446187021 +0000
+++ new-haskell-devscripts//debian/install 2011-07-25 22:45:49.462061500 +0000
@@ -1,5 +1,6 @@
dh_haskell_provides usr/bin/
dh_haskell_depends usr/bin/
dh_haskell_shlibdeps usr/bin/
+dh_haskell_data_depends usr/bin/
Dh_Haskell.sh usr/share/haskell-devscripts/
hlibrary.mk usr/share/cdbs/1/class
diff -rN -u old-haskell-devscripts//dh_haskell_data_depends new-haskell-devscripts//dh_haskell_data_depends
--- old-haskell-devscripts//dh_haskell_data_depends 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-devscripts//dh_haskell_data_depends 2011-07-25 22:45:49.466058178 +0000
@@ -0,0 +1,68 @@
+#! /bin/sh
+#
+# Determine package dependencies from installed-pkg-config file
+#
+# Copyright (C) 2011 Giovanni Mascellani <gio 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
+
+. /usr/share/haskell-devscripts/Dh_Haskell.sh
+
+datadeps=''
+for dep in `cabal_depends $files` ; do
+ dep_package_ver=`echo $dep | grep '^.\+-[0-9\.]\+-................................$' | sed 's|^\(.\+\)-\([0-9.]\+\)-[0-9a-f]\+$|\1-\2|'`
+ data_packages_file=/usr/lib/haskell-packages/ghc/lib/$dep_package_ver/data-packages
+ if [ -f $data_packages_file ] ; then
+ datadeps="$datadeps, `cat $data_packages_file`"
+ fi
+done
+echo $datadeps | sed -e 's/^,[ ]*//' > debian/data-depends
+
diff -rN -u old-haskell-devscripts//dh_haskell_depends new-haskell-devscripts//dh_haskell_depends
--- old-haskell-devscripts//dh_haskell_depends 2011-07-25 22:45:49.438145651 +0000
+++ new-haskell-devscripts//dh_haskell_depends 2011-07-25 22:45:49.466058178 +0000
@@ -107,7 +107,6 @@
echo "haskell:Suggests=" >> $sfile.tmp
;;
esac
- mv $sfile.tmp $sfile
;;
libhugs-*)
grep -v \
@@ -118,7 +117,6 @@
echo "haskell:Depends=`depends_for_hugs`" >> $sfile.tmp
echo "haskell:Recommends=" >> $sfile.tmp
echo "haskell:Suggests=" >> $sfile.tmp
- mv $sfile.tmp $sfile
;;
libghc-*-doc|haskell-*-doc)
grep -v \
@@ -143,9 +141,13 @@
&& suggests="$dev" \
|| suggests=""
echo "haskell:Suggests=$suggests" >> $sfile.tmp
- mv $sfile.tmp $sfile
;;
*)
+ cp $sfile $sfile.tmp
;;
esac
+
+ echo "haskell:Data-Depends=`cat debian/data-depends`" >> $sfile.tmp
+
+ mv $sfile.tmp $sfile
done
diff -rN -u old-haskell-devscripts//hlibrary.mk new-haskell-devscripts//hlibrary.mk
--- old-haskell-devscripts//hlibrary.mk 2011-07-25 22:45:49.386056834 +0000
+++ new-haskell-devscripts//hlibrary.mk 2011-07-25 22:45:49.474060256 +0000
@@ -73,6 +73,7 @@
rm -rf dist dist-ghc dist-hugs $(DEB_SETUP_BIN_NAME) Setup.hi Setup.ho Setup.o .*config*
rm -f build-ghc-stamp build-hugs-stamp build-haddock-stamp
rm -rf debian/tmp-inst-ghc
+ rm -f debian/data-depends
rm -f $(MAKEFILE)
rm -rf debian/dh_haskell_shlibdeps
@@ -109,7 +110,12 @@
debian/tmp-inst-ghc: $(DEB_SETUP_BIN_NAME) dist-ghc
$(DEB_SETUP_BIN_NAME) copy --builddir=dist-ghc --destdir=debian/tmp-inst-ghc
-install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc
+debian/data-depends: debian/tmp-inst-ghc
+ pkg_config=`$(DEB_SETUP_BIN_NAME) register --builddir=dist-ghc --gen-pkg-config | sed -r 's,.*: ,,'` ; \
+ dh_haskell_data_depends $$pkg_config ; \
+ rm $$pkg_config
+
+install/libghc-$(CABAL_PACKAGE)-dev:: debian/tmp-inst-ghc debian/data-depends
cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
\( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
@@ -117,18 +123,21 @@
$(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
+ if [ 'z$(DEB_GHC_DATA_PACKAGES)' != 'z' ] ; then \
+ echo '$(DEB_GHC_DATA_PACKAGES)' > debian/$(notdir $@)/usr/lib/haskell-packages/ghc/lib/$(CABAL_PACKAGE)-$(CABAL_VERSION)/data-packages ; \
+ fi
dh_haskell_provides -p$(notdir $@)
dh_haskell_depends -p$(notdir $@)
dh_haskell_shlibdeps -p$(notdir $@)
-install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc install/libghc-$(CABAL_PACKAGE)-dev
+install/libghc-$(CABAL_PACKAGE)-prof:: debian/tmp-inst-ghc install/libghc-$(CABAL_PACKAGE)-dev debian/data-depends
cd debian/tmp-inst-ghc ; find usr/lib/haskell-packages/ghc/lib/ \
! \( ! -name "*_p.a" ! -name "*.p_hi" \) \
-exec install -Dm 644 '{}' ../$(notdir $@)/'{}' ';'
dh_haskell_provides -p$(notdir $@)
dh_haskell_depends -p$(notdir $@)
-install/haskell-$(CABAL_PACKAGE)-doc install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc
+install/haskell-$(CABAL_PACKAGE)-doc install/libghc-$(CABAL_PACKAGE)-doc:: debian/tmp-inst-ghc debian/data-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 '{}' \
@@ -139,7 +148,7 @@
debian/$(notdir $@)/$(DEB_HADDOCK_DIR)
dh_haskell_depends -p$(notdir $@)
-install/libhugs-$(CABAL_PACKAGE):: $(DEB_SETUP_BIN_NAME) dist-hugs
+install/libhugs-$(CABAL_PACKAGE):: $(DEB_SETUP_BIN_NAME) dist-hugs debian/data-depends
$(DEB_SETUP_BIN_NAME) copy --destdir=debian/libhugs-$(CABAL_PACKAGE) --builddir=dist-hugs
rm -rf debian/libhugs-$(CABAL_PACKAGE)/usr/share/doc/*
dh_haskell_depends -p$(notdir $@)
More information about the Pkg-haskell-commits
mailing list