--- Begin Message ---
Package: mathgl
Version: 1.9-1
Severity: wishlist
Tags: patch
Find attached patch to add python-mathgl pkg.
It is working for me though not extensively tested.
I think there are better ways to do it, but I lack the
skills to improve it.
TIA.
Pelayo Gozález
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages mathgl depends on:
ii libc6 2.9-23 GNU C Library: Shared libraries
ii libgcc1 1:4.4.1-1 GCC support library
ii libmgl-fltk5 1.9-1 library for scientific graphs. (FL
ii libmgl5 1.9-1 library for scientific graphs. (ma
ii libstdc++6 4.4.1-1 The GNU Standard C++ Library v3
mathgl recommends no packages.
mathgl suggests no packages.
-- no debconf information
diff -urNbB mathgl-1.9/debian/control mathgl-1.9.python/debian/control
--- mathgl-1.9/debian/control 2009-08-14 14:14:21.000000000 +0200
+++ mathgl-1.9.python/debian/control 2009-08-14 14:58:51.620175316 +0200
@@ -2,7 +2,8 @@
Section: libs
Priority: optional
Maintainer: Bradley Smith <[email protected]>
-Build-Depends: debhelper (>= 7), libltdl-dev, libgsl0-dev, freeglut3-dev, libgl1-mesa-dev | libgl-dev, libpng-dev, libhdf5-serial-dev | libhdf5-dev, libjpeg-dev, libtiff-dev, libfltk-dev, libqt4-dev, libwxgtk2.8-dev, swig, texinfo, texi2html, texlive, texlive-generic-recommended, octave3.0-headers, quilt, libgif-dev
+Build-Depends: debhelper (>= 7), libltdl-dev, libgsl0-dev, freeglut3-dev, libgl1-mesa-dev | libgl-dev, libpng-dev, libhdf5-serial-dev | libhdf5-dev, libjpeg-dev, libtiff-dev, libfltk-dev, libqt4-dev, libwxgtk2.8-dev, python-all-dev, python-central, swig, texinfo, texi2html, texlive, texlive-generic-recommended, octave3.0-headers, quilt, libgif-dev
+XS-Python-Version: >= 2.2, << 2.6
Standards-Version: 3.8.1
Homepage: http://mathgl.sourceforge.net/index.html
Vcs-Git: http://git.brad-smith.co.uk/git/debian/pkg-mathgl.git
@@ -122,3 +123,21 @@
languages, such as, C, Fortran, Pascal, Forth, Python, Octave.
.
This package containst the GLUT frontend.
+
+Package: python-mathgl
+Architecture: any
+XB-Python-Version: ${python:Versions}
+Section: python
+Priority: extra
+Depends: ${python:Depends}, ${shlibs:Depends}, libmgl5 (= ${binary:Version})
+Provides: ${python:Provides}
+Suggests: libmgl-dev, mathgl
+Description: MathGL is a library for the plotting of the data
+ MathGL is a free library of fast C++ routines for the plotting
+ of the data varied in one or more dimensions. It uses OpenGL
+ (www.opengl.org) for the plotting. Also there is a simple window
+ interface based on GLUT. This provides high compatibility with
+ any operating system (really any which has OpenGL-like libraries).
+ .
+ Python language interface
+
diff -urNbB mathgl-1.9/debian/pycompat mathgl-1.9.python/debian/pycompat
--- mathgl-1.9/debian/pycompat 1970-01-01 01:00:00.000000000 +0100
+++ mathgl-1.9.python/debian/pycompat 2009-08-14 13:10:14.516424432 +0200
@@ -0,0 +1 @@
+2
diff -urNbB mathgl-1.9/debian/python-mathgl.docs mathgl-1.9.python/debian/python-mathgl.docs
--- mathgl-1.9/debian/python-mathgl.docs 1970-01-01 01:00:00.000000000 +0100
+++ mathgl-1.9.python/debian/python-mathgl.docs 2009-08-14 13:43:49.328171066 +0200
@@ -0,0 +1,3 @@
+NEWS
+README
+AUTHORS
diff -urNbB mathgl-1.9/debian/python-mathgl.postinst mathgl-1.9.python/debian/python-mathgl.postinst
--- mathgl-1.9/debian/python-mathgl.postinst 1970-01-01 01:00:00.000000000 +0100
+++ mathgl-1.9.python/debian/python-mathgl.postinst 2009-08-14 13:09:25.944175789 +0200
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+exit 0
diff -urNbB mathgl-1.9/debian/python-mathgl.prerm mathgl-1.9.python/debian/python-mathgl.prerm
--- mathgl-1.9/debian/python-mathgl.prerm 1970-01-01 01:00:00.000000000 +0100
+++ mathgl-1.9.python/debian/python-mathgl.prerm 2009-08-14 13:09:07.484171292 +0200
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+exit 0
diff -urNbB mathgl-1.9/debian/rules mathgl-1.9.python/debian/rules
--- mathgl-1.9/debian/rules 2009-08-14 14:14:21.000000000 +0200
+++ mathgl-1.9.python/debian/rules 2009-08-14 17:12:40.053493720 +0200
@@ -1,5 +1,8 @@
#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
include /usr/share/quilt/quilt.make
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -10,6 +13,10 @@
# Package fails to build in parallel - Workaround for the time being.
MAKEFLAGS = -j1
+#PYTHON
+PYVERS:=$(sort $(shell pyversions -vr) 2.5)
+PYCURR:=$(shell pyversions -d)
+
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
@@ -22,7 +29,7 @@
CFLAGS="$(CFLAGS)" \
./configure --prefix=/usr --mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) --enable-all --enable-octave
+ --build=$(DEB_BUILD_GNU_TYPE) --enable-all --enable-python --enable-octave
touch $@
build: build-stamp
@@ -31,13 +38,23 @@
$(MAKE)
touch $@
+build-python: build build-python-stamp
+build-python-stamp: $(PYVERS:%=build-python-stamp-%)
+ touch $@
+
+build-python-stamp-%:
+ dh_testdir
+ python$* setup.py build
+ touch $@
+
clean: unpatch
dh_testdir
dh_testroot
- rm -f build-stamp configure-stamp
+ rm -f build-stamp configure-stamp build-python-stamp* install-python-stamp*
rm -rf build autom4te.cache texinfo/png/*.png
rm -f texinfo/mathgl.info-4
[ ! -f Makefile ] || $(MAKE) distclean
+ rm -rf build $(CURDIR)/debian/tmp
dh_clean
install: build
@@ -47,25 +64,57 @@
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
rm -f debian/tmp/usr/bin/*_example
-binary-indep: build install
+install-python: install install-python-stamp
+install-python-stamp: build-python $(PYVERS:%=install-python-stamp-%)
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+ dh_install
+ touch $@
-binary-arch: build install
+install-python-stamp-%: build-python-stamp-%
dh_testdir
dh_testroot
- dh_installchangelogs ChangeLog.txt
- dh_installdocs
- dh_install --fail-missing
+ python$* setup.py install --root $(CURDIR)/debian/python-mathgl --no-compile
+ touch $@
+
+binary-indep: build install
+
+binary-arch: build install
+ dh_testdir -Npython-mathgl
+ dh_testroot -Npython-mathgl
+ dh_installchangelogs -Npython-mathgl ChangeLog.txt
+ dh_installdocs -Npython-mathgl
+ dh_install -Npython-mathgl --list-missing
rm -f debian/mathgl-doc/usr/share/doc/mathgl-doc/png/all.png
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
+ dh_link -Npython-mathgl
+ dh_strip -Npython-mathgl
+ dh_compress -Npython-mathgl
+ dh_fixperms -Npython-mathgl
+ dh_makeshlibs -Npython-mathgl
+ dh_installdeb -Npython-mathgl
+ dh_shlibdeps -Npython-mathgl
+ dh_gencontrol -Npython-mathgl
+ dh_md5sums -Npython-mathgl
+ dh_builddeb -Npython-mathgl
+
+binary-arch-python: build build-python install install-python
+ dh_testdir -ppython-mathgl
+ dh_testroot -ppython-mathgl
+ dh_pycentral -ppython-mathgl
+ dh_python -ppython-mathgl
+ dh_installchangelogs -ppython-mathgl ChangeLog.txt
+ dh_installdocs -ppython-mathgl
+ dh_link -ppython-mathgl
+ dh_strip -ppython-mathgl
+ dh_compress -ppython-mathgl -X.py
+ dh_fixperms -ppython-mathgl
+ dh_makeshlibs -ppython-mathgl
+ dh_installdeb -ppython-mathgl
+ dh_shlibdeps -ppython-mathgl
+ dh_gencontrol -ppython-mathgl
+ dh_md5sums -ppython-mathgl
+ dh_builddeb -ppython-mathgl
-binary: binary-indep binary-arch
+binary: binary-indep binary-arch binary-arch-python
.PHONY: build clean binary-indep binary-arch binary install configure
--- End Message ---