Permalink
Browse files

Shifted to Pavel's Debian build system

I have changed the current Debian build system to the one made by
Pavel Shramov. It is a lot simpler than the current one. Also it is
similar to what can normally be found in the Debian archieve, and I
therefore assume that it will be easier to some day get an offecial
WxHaskell Debian package.

All of the files in the debian directory is the work of Pavel.

I changed only one thing, as compared to Pavel's version. Namely that
I removed the dependcy on libghc6-time-dev. I did it, as this
dependency makes the package un-buildable on Debian unstable (GHC
6.8). At release 0.10.3, some users requested a GHC 6.8 version, and
it is therefore important that we can provide one.

darcs-hash:20080413131752-73052-fcd3cccb4765f71c7a564f0e96ff7dcdbd9ecfd8.gz
  • Loading branch information...
1 parent 2294d12 commit f4aab071d73a1f621fef40ea438ce07caef80644 Mads Lindstroem committed Apr 13, 2008
Showing with 197 additions and 123 deletions.
  1. +0 −46 bin/debian_build.bash
  2. +0 −48 configure
  3. +63 −0 debian/changelog
  4. +21 −0 debian/control
  5. +39 −0 debian/libghc6-wxhaskell-dev.postinst
  6. +32 −0 debian/libghc6-wxhaskell-dev.prerm
  7. +6 −0 debian/register.sh
  8. +30 −0 debian/rules
  9. +6 −0 debian/unregister.sh.in
  10. +0 −29 makefile
View
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# You have to download wxhaskell-doc-0.10.3.zip from
-# http://sourceforge.net/project/showfiles.php?group_id=73133&package_id=73173&release_id=582361
-# and place it in wxhaskell/ . This is neccesarry as we cannot currently
-# build the Haddock documentation on Debian.
-
-# This script must be run as root :(
-
-PREFIX=/usr/local
-
-case "$1" in
- 6.6)
- chmod 755 configure
- ./configure --enable-split-objs --hcprof --prefix=$PREFIX
- make
- make install
- make wx
- make wx-install
-
- make debdist
- ;;
-
- 6.8)
- chmod 755 configure
- runhaskell Setup configure --enable-split-objs --hcprof --prefix=$PREFIX
- runhaskell Setup build
- runhaskell Setup install
-
- cd wx
- chmod 755 configure
- runhaskell Setup configure --enable-split-objs --enable-library-profiling --prefix=$PREFIX
- runhaskell Setup build
- runhaskell Setup install
-
- cd ..
- make debdist
- ;;
-
- *)
- echo "You must specify either 6.6 or 6.8 as parameter"
- ;;
-
-esac
-
-
View
@@ -1135,54 +1135,6 @@ echo "" >> config/wxhaskell.spec.temp
cat config/wxhaskell.spec.temp bin/wxhaskell-spec-template > config/wxhaskell.spec
rm -f config/wxhaskell.spec.temp
-# generate DEB installer files
-
-mkdir config/DEBIAN
-
-case "$hcversion" in
- 6.6*)
- deb_package=libghc6-6-wxhaskell
- deb_ghc_dependency=6.6
- ;;
- 6.8*)
- deb_package=libghc6-8-wxhaskell
- deb_ghc_dependency=$hcversion
- ;;
- *)
- deb_package=libghc6-unknown-wxhaskell
- deb_ghc_dependency=6
- ;;
-esac
-
-cat > config/DEBIAN/control << EOF
-Package: $deb_package
-Version: $version
-Section: devel
-Priority: optional
-Architecture: i386
-Essential: no
-Depends: ghc6 (>= $deb_ghc_dependency), ghc6 (<<$deb_ghc_dependency+), libwxgtk2.6-dev
-Recommends: libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev
-Installed-Size: 21238821
-Maintainer: Mads Lindstroem [mads_lindstroem@yahoo.dk]
-Description: wxHaskell is a portable and native GUI library for Haskell
-EOF
-
-cat > config/DEBIAN/prerm << EOF
-#!/bin/sh
-ghc-pkg -r wx
-ghc-pkg -r wxcore
-ldconfig
-exit 0
-EOF
-
-cat > config/DEBIAN/postinst << EOF
-#!/bin/sh
-cat /usr/local/lib/wxcore.pkg | sed -e "s|\\\${wxhlibdir}|/usr/local/lib|" | ghc-pkg update -
-cat /usr/local/lib/wx.pkg | sed -e "s|\\\${wxhlibdir}|/usr/local/lib|" | ghc-pkg update -
-ldconfig
-EOF
-
# generate prologue for documentation
echo " config/prologue.txt"
echo "Documentation for wxHaskell $version" > config/prologue.txt.temp
View
@@ -0,0 +1,63 @@
+wxhaskell (0.10.3~rc2-3) unstable; urgency=low
+
+ * Get version from wxcore.cabal
+
+ -- Pavel Shramov <shramov@mexmat.net> Wed, 19 Mar 2008 15:02:50 +0300
+
+wxhaskell (0.10.3~rc2-2) unstable; urgency=low
+
+ * Fix unregister script
+
+ -- Pavel Shramov <shramov@mexmat.net> Wed, 19 Mar 2008 14:36:36 +0300
+
+wxhaskell (0.10.3~rc2-1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Packages 0.10.3-rc2 release.
+
+ -- Pavel Shramov <shramov@mexmat.net> Tue, 06 Nov 2007 13:53:05 +0300
+
+wxhaskell (0.8-2) unstable; urgency=low
+
+ * Recompile with ghc 6.2.2
+
+ -- Isaac Jones <ijones@debian.org> Mon, 18 Oct 2004 23:23:46 -0400
+
+wxhaskell (0.8-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Isaac Jones <ijones@debian.org> Tue, 27 Jul 2004 15:52:50 -0400
+
+wxhaskell (0.6-0.4) unstable; urgency=low
+
+ * Recompile with ghc 6.2.1
+
+ -- Ian Lynagh (wibble) <igloo@debian.org> Sat, 20 Mar 2004 19:44:05 +0000
+
+wxhaskell (0.6-0.3) unstable; urgency=low
+
+ * Make shlibs
+
+ -- Ian Lynagh (wibble) <igloo@debian.org> Sat, 20 Mar 2004 19:44:05 +0000
+
+wxhaskell (0.6-0.2) unstable; urgency=low
+
+ * Fix error where postinst wasn't created in debian/
+ * Split into library and dev binary packages.
+
+ -- Ian Lynagh (wibble) <igloo@debian.org> Sat, 20 Mar 2004 14:03:20 +0000
+
+wxhaskell (0.6-0.1) unstable; urgency=low
+
+ * Remove hardcoded "6.2" in postinst.
+ * Put the samples in the deb.
+
+ -- Ian Lynagh (wibble) <igloo@debian.org> Sun, 14 Mar 2004 23:51:09 +0000
+
+wxhaskell (0.6-0) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Ian Lynagh (wibble) <igloo@debian.org> Sun, 14 Mar 2004 18:22:59 +0000
+
View
@@ -0,0 +1,21 @@
+Source: wxhaskell
+Section: devel
+Priority: optional
+Maintainer: Isaac Jones <ijones@debian.org>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5), cdbs, ghc6 (>= 6.2.1), libwxgtk2.6-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libghc6-parsec-dev
+XS-Upstream-Depends: git-core
+XS-Vcs-Git: git://grid.pp.ru/psha/wxhaskell/
+XS-Vcs-Browse: http://grid.pp.ru/git/?p=psha/wxhaskell/.git
+
+Package: libghc6-wxhaskell0.10
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Haskell bindings for wxWidgets (runtime)
+ Haskell bindings for wxWidgets.
+
+Package: libghc6-wxhaskell-dev
+Architecture: any
+Depends: libghc6-wxhaskell0.10 (= ${Source-Version}), haskell-utils, ghc6 (>= 6.2.1), ${shlibs:Depends}, ${misc:Depends}
+Description: Haskell bindings for wxWidgets (development)
+ Haskell bindings for wxWidgets.
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Generic postinst script for Haskell cabal libraries v8 by Ian Lynagh.
+#
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+ /usr/lib/libghc6-wxhaskell-dev/register.sh
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Generic prerm.in script for Haskell cabal libraries v8 by Ian Lynagh.
+#
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+ remove|upgrade|deconfigure|failed-upgrade)
+ /usr/lib/libghc6-wxhaskell-dev/unregister.sh
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+LIBDIR=$(ghc6 --print-libdir)
+
+/usr/bin/ghc-pkg6 update - < ${LIBDIR}/package.conflets/wxcore.pkg
+/usr/bin/ghc-pkg6 update - < ${LIBDIR}/package.conflets/wx.pkg
View
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/makefile.mk
+
+PWD := $(shell pwd)
+PKG := libghc6-wxhaskell
+LIBDIR := $(shell ghc6 --print-libdir)
+VERSION := $(shell sed -ne "s/^Version: *//Ip" wxcore.cabal)
+
+configure/$(PKG)-dev::
+ ./configure --with-opengl --prefix=/usr --libdir=$(LIBDIR) --hc=ghc6
+
+debian/unregister.sh: debian/unregister.sh.in wxcore.cabal
+ sed 's|$${wxversion}|$(VERSION)|' < $< > $@
+
+install/$(PKG)0.10:: debian/unregister.sh
+ $(MAKE) DESTDIR=$(PWD)/debian/$(PKG)-dev wxcore-install-files
+ mkdir -p $(PWD)/debian/$(PKG)-dev/usr/lib/$(PKG)-dev
+ install -m0755 debian/unregister.sh $(PWD)/debian/$(PKG)-dev/usr/lib/$(PKG)-dev/
+ install -m0755 debian/register.sh $(PWD)/debian/$(PKG)-dev/usr/lib/$(PKG)-dev/
+ mkdir -p $(PWD)/debian/$(PKG)-dev/$(LIBDIR)/package.conflets
+ sed 's|$${wxhlibdir}|$(LIBDIR)|' < config/wxcore.pkg > $(PWD)/debian/$(PKG)-dev/$(LIBDIR)/package.conflets/wxcore.pkg
+ sed 's|$${wxhlibdir}|$(LIBDIR)|' < config/wx.pkg > $(PWD)/debian/$(PKG)-dev/$(LIBDIR)/package.conflets/wx.pkg
+ mkdir -p $(PWD)/debian/$(PKG)0.10/usr/lib
+ mv $(PWD)/debian/$(PKG)-dev/$(LIBDIR)/*.so $(PWD)/debian/$(PKG)0.10/usr/lib
+
+install/$(PKG)-dev:: install/$(PKG)0.10
+ sed 's|$${wxhlibdir}|$(PWD)/debian/$(PKG)-dev/$(LIBDIR)|' < config/wxcore.pkg | ghc-pkg -f out/wxcore.conf update -
+ $(MAKE) HCFLAGS="-package-conf out/wxcore.conf" DESTDIR=$(PWD)/debian/$(PKG)-dev wx wx-install-files
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+VERSION="${wxversion}"
+
+/usr/bin/ghc-pkg6 unregister wx-${VERSION}
+/usr/bin/ghc-pkg6 unregister wxcore-${VERSION}
View
@@ -32,7 +32,6 @@ help:
@echo " bindist binaries, docs, and samples zip (windows distribution)"
@echo " macdist installer for MacOS X (.dmg file) (includes docs and samples)"
@echo " rpmdist unix RPM installer (no docs and samples included)"
- @echo " debdist unix DEB installer (no docs and samples included)"
@echo ""
@echo "maintenance:"
@echo " clean remove object files and binaries"
@@ -392,34 +391,6 @@ DEBIAN_INSTALL_LOCACTION=$(DEBIAN_DIST)/usr/local
DEB_NAME=$(DIST-OUTDIR)/wxhaskell$(ARCHITECTURE)-bin-$(REL-VERSION).deb
DEB_DOC=$(DEBIAN_DIST)/usr/local/share
-.PHONY: debdist debdist-clean
-debdist:
-
-debdist:dist-dirs wxc-bindist wxcore-bindist wx-bindist
- @$(call ensure-dir,$(DEBIAN_DIST))
- @$(call cp-echo,config/DEBIAN,$(DEBIAN_DIST)/DEBIAN)
- @$(call ensure-dir,$(DEBIAN_INSTALL_LOCACTION))
- @$(call cp-echo,$(BINDIST-LIBDIR),$(DEBIAN_INSTALL_LOCACTION))
- # copy packages
- @$(call cp-echo,config/wxcore.pkg,$(DEBIAN_INSTALL_LOCACTION)/lib/wxcore.pkg)
- @$(call cp-echo,config/wx.pkg,$(DEBIAN_INSTALL_LOCACTION)/lib/wx.pkg)
- # copy license
- @$(call cp-echo,license.txt,$(DEBIAN_DIST)/DEBIAN/copyright)
- # permissions
- chmod 755 $(DEBIAN_DIST)/DEBIAN/prerm
- chmod 755 $(DEBIAN_DIST)/DEBIAN/postinst
- #extract doc-zip
- @$(call ensure-dir,$(DEB_DOC))
- unzip wxhaskell-doc-0.10.3.zip -d $(DEB_DOC)
- #ownership
- chown --recursive root.root $(DEBIAN_DIST)
- #build
- dpkg --build dist/debian/ $(DEB_NAME)
-
-debdist-clean: bindist-clean
- @$(RM) $(DEB_NAME)
- -@$(call full-remove-dir,$(DEBIAN_DIST))
-
# MAC dist
WXHASKELLINS=wxhaskell
WXHASKELLDMG=$(DIST-OUTDIR)/wxhaskell-bin-$(ARCHITECTURE)-$(REL-VERSION).dmg

0 comments on commit f4aab07

Please sign in to comment.