r45223 - in /packages/sundials/trunk/debian: ./ patches/ source/

trophime-guest at users.alioth.debian.org trophime-guest at users.alioth.debian.org
Mon Jul 9 16:19:05 UTC 2012


Author: trophime-guest
Date: Mon Jul  9 16:19:04 2012
New Revision: 45223

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=45223
Log:
add parallel version and switch to cmake

Added:
    packages/sundials/trunk/debian/libsundials-doc.install
    packages/sundials/trunk/debian/libsundials-nvecparallel0.install
    packages/sundials/trunk/debian/libsundials-nvecparallel0.symbols
    packages/sundials/trunk/debian/patches/cmake.patch
    packages/sundials/trunk/debian/source/
    packages/sundials/trunk/debian/source/format
Modified:
    packages/sundials/trunk/debian/changelog
    packages/sundials/trunk/debian/check.sh
    packages/sundials/trunk/debian/compat
    packages/sundials/trunk/debian/control
    packages/sundials/trunk/debian/libsundials-nvecserial0.symbols
    packages/sundials/trunk/debian/libsundials-serial-dev.install
    packages/sundials/trunk/debian/patches/series
    packages/sundials/trunk/debian/rules

Modified: packages/sundials/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/changelog?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/changelog (original)
+++ packages/sundials/trunk/debian/changelog Mon Jul  9 16:19:04 2012
@@ -1,9 +1,22 @@
 sundials (2.5.0-2) unstable; urgency=low
 
+  [Andrew Miller]  
   * Fix spelling of suite (closes: #680881)
   * Add a -dbg package (closes: #680878)
 
- -- Andrew Miller <andrew at amxl.com>  Mon, 9 Jul 2012 09:47:03 +1200
+  [ Rafael Laboissiere ]
+  * debian/rules: 
+      - Install .mex files in the appropriate directory
+  
+  * Switch to buildsystem to cmake
+  * Switch to debhelper 9
+  * Switch to dpkg-source 3.0 (quilt) format 
+  
+  * Add support for parallel version
+  * Add a separate package for examples
+  * Modify check.sh to run serial tests
+  
+ -- Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>  Mon, 9 Jul 2012 09:40:03 +1200
 
 sundials (2.5.0-1) unstable; urgency=low
 

Modified: packages/sundials/trunk/debian/check.sh
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/check.sh?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/check.sh (original)
+++ packages/sundials/trunk/debian/check.sh Mon Jul  9 16:19:04 2012
@@ -11,16 +11,18 @@
 trap "cleanup" 1 2 3 13 15
 
 CWD=$(pwd)
+cd $1/examples
 
-for dir in examples/*/serial ; do
-    cd $dir
-    for prog in $(ls .libs | fgrep -v .o | grep -v ^lt- | sed 's:.libs/::') ; do
-        echo -n "Checking $dir/$prog... "
+for dir in $(find . -type d -maxdepth 1 -mindepth 1) ; do
+    cd $dir/serial
+    echo "tests in " $dir
+    for prog in $(find . -executable -type f) ; do
+        echo -n "Checking $prog... "
         ./$prog > $RESULTS
-        if test -e $prog.out ; then
-            DIFF=$(diff -u $prog.out $RESULTS)
+        if test -e $2/examples/$dir/serial/$prog.out ; then
+            DIFF=$(diff -u $2/examples/$dir/serial/$prog.out $RESULTS)
             if test -z "$DIFF" ; then
-                echo pass
+                echo success
             else
                 echo fail
                 echo "$DIFF"
@@ -29,5 +31,7 @@
             echo pass
         fi
     done
-    cd $CWD
+    cd $1/examples
 done
+
+cd $CWD

Modified: packages/sundials/trunk/debian/compat
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/compat?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/compat (original)
+++ packages/sundials/trunk/debian/compat Mon Jul  9 16:19:04 2012
@@ -1,1 +1,1 @@
-7
+9

Modified: packages/sundials/trunk/debian/control
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/control?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/control (original)
+++ packages/sundials/trunk/debian/control Mon Jul  9 16:19:04 2012
@@ -4,7 +4,7 @@
 Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>,
  Sylvestre Ledru <sylvestre at debian.org>
-Build-Depends: debhelper (>= 7), autotools-dev, cdbs, quilt, gfortran, 
+Build-Depends: debhelper (>= 9), cmake, gfortran, mpi-default-dev,
  libblas-dev | libblas-3gf.so, liblapack-dev | liblapack-3gf.so,
  octave-pkg-dev (>= 0.7.0)
 Standards-Version: 3.9.3
@@ -27,6 +27,24 @@
  This package depends on all other packages containing the shared
  libraries for the subcomponents of SUNDIALS: CVODE, CVODES, IDA,
  KINSOL, and NVECTOR_SERIAL.
+
+Package: libsundials-parallel
+Architecture: any
+Depends: libsundials-cvode1, libsundials-cvodes2, libsundials-ida2,
+ libsundials-idas0, libsundials-kinsol1, ${misc:Depends}, mpi-default-run
+Conflicts: libsundials-par0
+Replaces: libsundials-par0
+Description: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
+ The family of solvers referred to as SUNDIALS consists of solvers CVODE
+ (for ODE systems), CVODES (ODE with sensitivity analysis capabilities),
+ IDA (for differential-algebraic systems), and KINSOL (for nonlinear
+ algebraic systems).
+ .
+ This package depends on all other packages containing the shared
+ libraries for the subcomponents of SUNDIALS: CVODE, CVODES, IDA,
+ KINSOL, and NVECTOR_PAR.
+ .
+ This package provides MPI version
 
 Package: libsundials-cvode1
 Architecture: any
@@ -78,6 +96,15 @@
  SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation
  Solvers).
 
+Package: libsundials-nvecparallel0
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, mpi-default-run
+Description: MPI vector operations library (SUNDIALS library)
+ This package provides implementations for all vector operations
+ defined by the generic NVECTOR module in the table of operations for
+ SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation
+ Solvers).
+
 Package: libsundials-serial-dev
 Section: libdevel
 Architecture: any
@@ -94,19 +121,36 @@
  SUNDIALS in C and, in case of FCVODE and FKINSOL, Fortran.  It also
  contains various example programs distributed by the upstream authors.
 
-#Package: libsundials-serial-doc
-#Section: doc
-#Architecture: all
-#Depends: ${misc:Depends}
-#Recommends: libsundials-serial-dev
-#Description: SUNDIALS documentation files
-# The family of solvers referred to as SUNDIALS (SUite of Nonlinear and
-# DIfferential/ALgebraic equation Solvers) consists of solvers CVODE
-# (for ODE systems), CVODES (ODE with sensitivity analysis capabilities),
-# IDA (for differential-algebraic systems), and KINSOL (for nonlinear
-# algebraic systems).
-# .
-# This package contains SUNDIALS documentation.
+Package: libsundials-parallel-dev
+Section: libdevel
+Architecture: any
+Depends: libsundials-parallel (= ${binary:Version}), libsundials-nvecparallel0 (= ${binary:Version}), ${misc:Depends}
+Description: SUNDIALS development files
+ The family of solvers referred to as SUNDIALS (SUite of Nonlinear and
+ DIfferential/ALgebraic equation Solvers) consists of solvers CVODE
+ (for ODE systems), CVODES (ODE with sensitivity analysis capabilities),
+ IDA (for differential-algebraic systems), and KINSOL (for nonlinear
+ algebraic systems).
+ .
+ This package contains files necessary for development applications using
+ SUNDIALS in C and, in case of FCVODE and FKINSOL, Fortran.  It also
+ contains various example programs distributed by the upstream authors.
+ .
+ This package provides MPI version
+
+Package: libsundials-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Recommends: libsundials-serial-dev
+Description: SUNDIALS examples files
+ The family of solvers referred to as SUNDIALS (SUite of Nonlinear and
+ DIfferential/ALgebraic equation Solvers) consists of solvers CVODE
+ (for ODE systems), CVODES (ODE with sensitivity analysis capabilities),
+ IDA (for differential-algebraic systems), and KINSOL (for nonlinear
+ algebraic systems).
+ .
+ This package contains SUNDIALS examples.
 
 Package: octave-sundials
 Architecture: any
@@ -133,3 +177,16 @@
  algebraic systems).
  .
  This package contains the debugging symbols for SUNDIALS.
+
+Package: libsundials-parallel-dbg
+Section: debug
+Architecture: any
+Priority: extra
+Depends: libsundials-parallel, ${misc:Depends}
+Description: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
+ The family of solvers referred to as SUNDIALS consists of solvers CVODE
+ (for ODE systems), CVODES (ODE with sensitivity analysis capabilities),
+ IDA (for differential-algebraic systems), and KINSOL (for nonlinear
+ algebraic systems).
+ .
+ This package contains the debugging symbols for SUNDIALS.

Added: packages/sundials/trunk/debian/libsundials-doc.install
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/libsundials-doc.install?rev=45223&op=file
==============================================================================
--- packages/sundials/trunk/debian/libsundials-doc.install (added)
+++ packages/sundials/trunk/debian/libsundials-doc.install Mon Jul  9 16:19:04 2012
@@ -1,0 +1,1 @@
+examples usr/share/doc/libsundials-doc

Added: packages/sundials/trunk/debian/libsundials-nvecparallel0.install
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/libsundials-nvecparallel0.install?rev=45223&op=file
==============================================================================
--- packages/sundials/trunk/debian/libsundials-nvecparallel0.install (added)
+++ packages/sundials/trunk/debian/libsundials-nvecparallel0.install Mon Jul  9 16:19:04 2012
@@ -1,0 +1,2 @@
+usr/lib/libsundials_nvecparallel.so.*
+usr/lib/libsundials_fnvecparallel.so.*

Added: packages/sundials/trunk/debian/libsundials-nvecparallel0.symbols
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/libsundials-nvecparallel0.symbols?rev=45223&op=file
==============================================================================
--- packages/sundials/trunk/debian/libsundials-nvecparallel0.symbols (added)
+++ packages/sundials/trunk/debian/libsundials-nvecparallel0.symbols Mon Jul  9 16:19:04 2012
@@ -1,0 +1,55 @@
+libsundials_nvecparallel.so.0 libsundials-nvecparallel0 #MINVER#
+ N_VAbs_Parallel at Base 2.5.0
+ N_VAddConst_Parallel at Base 2.5.0
+ N_VCloneEmpty_Parallel at Base 2.5.0
+ N_VCloneVectorArrayEmpty_Parallel at Base 2.5.0
+ N_VCloneVectorArray_Parallel at Base 2.5.0
+ N_VClone_Parallel at Base 2.5.0
+ N_VCompare_Parallel at Base 2.5.0
+ N_VConst_Parallel at Base 2.5.0
+ N_VConstrMask_Parallel at Base 2.5.0
+ N_VDestroyVectorArray_Parallel at Base 2.5.0
+ N_VDestroy_Parallel at Base 2.5.0
+ N_VDiv_Parallel at Base 2.5.0
+ N_VDotProd_Parallel at Base 2.5.0
+ N_VGetArrayPointer_Parallel at Base 2.5.0
+ N_VInvTest_Parallel at Base 2.5.0
+ N_VInv_Parallel at Base 2.5.0
+ N_VL1Norm_Parallel at Base 2.5.0
+ N_VLinearSum_Parallel at Base 2.5.0
+ N_VMake_Parallel at Base 2.5.0
+ N_VMaxNorm_Parallel at Base 2.5.0
+ N_VMinQuotient_Parallel at Base 2.5.0
+ N_VMin_Parallel at Base 2.5.0
+ N_VNewEmpty_Parallel at Base 2.5.0
+ N_VNew_Parallel at Base 2.5.0
+ N_VPrint_Parallel at Base 2.5.0
+ N_VProd_Parallel at Base 2.5.0
+ N_VScale_Parallel at Base 2.5.0
+ N_VSetArrayPointer_Parallel at Base 2.5.0
+ N_VSpace_Parallel at Base 2.5.0
+ N_VWL2Norm_Parallel at Base 2.5.0
+ N_VWrmsNormMask_Parallel at Base 2.5.0
+ N_VWrmsNorm_Parallel at Base 2.5.0
+ RAbs at Base 2.5.0
+ RExp at Base 2.5.0
+ RPowerI at Base 2.5.0
+ RPowerR at Base 2.5.0
+ RSqrt at Base 2.5.0
+libsundials_fnvecparallel.so.0 libsundials-nvecparallel0 #MINVER#
+ F2C_CVODE_vec at Base 2.5.0
+ F2C_CVODE_vecB at Base 2.5.0
+ F2C_CVODE_vecQ at Base 2.5.0
+ F2C_CVODE_vecQB at Base 2.5.0
+ F2C_CVODE_vecS at Base 2.5.0
+ F2C_IDA_vec at Base 2.5.0
+ F2C_IDA_vecB at Base 2.5.0
+ F2C_IDA_vecQ at Base 2.5.0
+ F2C_IDA_vecQB at Base 2.5.0
+ F2C_IDA_vecS at Base 2.5.0
+ F2C_KINSOL_vec at Base 2.5.0
+ fnvinitp_ at Base 2.5.0
+ fnvinitp_b_ at Base 2.5.0
+ fnvinitp_q_ at Base 2.5.0
+ fnvinitp_qb_ at Base 2.5.0
+ fnvinitp_s_ at Base 2.5.0

Modified: packages/sundials/trunk/debian/libsundials-nvecserial0.symbols
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/libsundials-nvecserial0.symbols?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/libsundials-nvecserial0.symbols (original)
+++ packages/sundials/trunk/debian/libsundials-nvecserial0.symbols Mon Jul  9 16:19:04 2012
@@ -48,11 +48,6 @@
  F2C_IDA_vecQB at Base 2.5.0
  F2C_IDA_vecS at Base 2.5.0
  F2C_KINSOL_vec at Base 2.5.0
- RAbs at Base 2.5.0
- RExp at Base 2.5.0
- RPowerI at Base 2.5.0
- RPowerR at Base 2.5.0
- RSqrt at Base 2.5.0
  fnvinits_ at Base 2.5.0
  fnvinits_b_ at Base 2.5.0
  fnvinits_q_ at Base 2.5.0

Modified: packages/sundials/trunk/debian/libsundials-serial-dev.install
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/libsundials-serial-dev.install?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/libsundials-serial-dev.install (original)
+++ packages/sundials/trunk/debian/libsundials-serial-dev.install Mon Jul  9 16:19:04 2012
@@ -1,4 +1,6 @@
 usr/include
 usr/lib/lib*a
 usr/lib/lib*.so
-usr/bin/sundials-config
+bin/sundials-config usr/bin/sundials-config
+
+debian/sundials-config.1 usr/share/man/man1

Added: packages/sundials/trunk/debian/patches/cmake.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/patches/cmake.patch?rev=45223&op=file
==============================================================================
--- packages/sundials/trunk/debian/patches/cmake.patch (added)
+++ packages/sundials/trunk/debian/patches/cmake.patch Mon Jul  9 16:19:04 2012
@@ -1,0 +1,111 @@
+Index: sundials-2.5.0/CMakeLists.txt
+===================================================================
+--- sundials-2.5.0.orig/CMakeLists.txt	2012-07-09 16:10:55.000000000 +0200
++++ sundials-2.5.0/CMakeLists.txt	2012-07-09 16:14:25.000000000 +0200
+@@ -18,7 +18,7 @@
+ 
+ # Require a fairly recent cmake version
+ 
+-CMAKE_MINIMUM_REQUIRED(VERSION 2.2)
++CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+ 
+ # Project SUNDIALS (initially only C supported)
+ 
+@@ -28,9 +28,9 @@
+ 
+ SET(PACKAGE_BUGREPORT "radu at llnl.gov")
+ SET(PACKAGE_NAME "SUNDIALS")
+-SET(PACKAGE_STRING "SUNDIALS 2.4.0")
++SET(PACKAGE_STRING "SUNDIALS 2.5.0")
+ SET(PACKAGE_TARNAME "sundials")
+-SET(PACKAGE_VERSION "2.4.0")
++SET(PACKAGE_VERSION "2.5.0")
+ 
+ # Prohibit in-source build
+ 
+@@ -229,6 +229,7 @@
+ 
+ IF(UNIX)
+   OPTION(USE_GENERIC_MATH "Use generic (std-c) math libraries" ON)
++  MESSAGE(STATUS  "Use generic (std-c) math libraries")
+   IF(USE_GENERIC_MATH)
+     # executables will be linked against -lm 
+     SET(EXTRA_LINK_LIBS -lm)
+Index: sundials-2.5.0/config/SundialsLapack.cmake
+===================================================================
+--- sundials-2.5.0.orig/config/SundialsLapack.cmake	2012-07-09 16:10:55.000000000 +0200
++++ sundials-2.5.0/config/SundialsLapack.cmake	2012-07-09 16:14:55.000000000 +0200
+@@ -31,9 +31,9 @@
+ endif(NOT LAPACK_LIBRARIES)
+ # If using a GNU C compiler, it is quite likely we'll want LAPACK_LINKER_FLAGS
+ # to include -lg2c (if not already present)
+-if(CMAKE_COMPILER_IS_GNUCC AND NOT LAPACK_LINKER_FLAGS MATCHES "g2c")
+-  set(LAPACK_LINKER_FLAGS "${LAPACK_LINKER_FLAGS} -lg2c")
+-endif(CMAKE_COMPILER_IS_GNUCC AND NOT LAPACK_LINKER_FLAGS MATCHES "g2c")
++if(CMAKE_COMPILER_IS_GNUCC AND NOT LAPACK_LINKER_FLAGS MATCHES "gfortran")
++  set(LAPACK_LINKER_FLAGS "${LAPACK_LINKER_FLAGS} -lgfortran")
++endif(CMAKE_COMPILER_IS_GNUCC AND NOT LAPACK_LINKER_FLAGS MATCHES "gfortran")
+ # If we have the LAPACK libraries, test them
+ if(LAPACK_LIBRARIES)
+   message(STATUS "Looking for LAPACK libraries... OK")
+@@ -69,7 +69,9 @@
+     "}\n")
+   # Attempt to link the "ltest" executable
+   try_compile(LTEST_OK ${LapackTest_DIR} ${LapackTest_DIR}
+-    ltest OUTPUT_VARIABLE MY_OUTPUT)    
++    ltest
++    LINK_LIBRARIES ${LAPACK_LIBRARIES}
++    OUTPUT_VARIABLE MY_OUTPUT)
+   # To ensure we do not use stuff from the previous attempts, 
+   # we must remove the CMakeFiles directory.
+   file(REMOVE_RECURSE ${LapackTest_DIR}/CMakeFiles)
+Index: sundials-2.5.0/config/SundialsFortran.cmake
+===================================================================
+--- sundials-2.5.0.orig/config/SundialsFortran.cmake	2012-07-09 16:10:55.000000000 +0200
++++ sundials-2.5.0/config/SundialsFortran.cmake	2012-07-09 16:14:25.000000000 +0200
+@@ -52,6 +52,7 @@
+   # and an executable "ftest"
+   file(WRITE ${FortranTest_DIR}/CMakeLists.txt
+     "PROJECT(ftest Fortran)\n"
++    "CMAKE_MINIMUM_REQUIRED(VERSION 2.8)\n"
+     "SET(CMAKE_VERBOSE_MAKEFILE ON)\n"
+     "SET(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n"
+     "SET(CMAKE_Fortran_FLAGS \"${CMAKE_Fortran_FLAGS}\")\n"
+@@ -90,6 +91,7 @@
+     # Overwrite CMakeLists.txt with one which will generate the "ctest1" executable
+     file(WRITE ${FortranTest_DIR}/CMakeLists.txt
+       "PROJECT(ctest1 C)\n"
++      "CMAKE_MINIMUM_REQUIRED(VERSION 2.8)\n"
+       "SET(CMAKE_VERBOSE_MAKEFILE ON)\n"
+       "SET(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n"
+       "SET(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n"
+@@ -134,6 +136,7 @@
+     # Practically a duplicate of the previous steps.
+     file(WRITE ${FortranTest_DIR}/CMakeLists.txt
+       "PROJECT(ctest2 C)\n"
++      "CMAKE_MINIMUM_REQUIRED(VERSION 2.8)\n"
+       "SET(CMAKE_VERBOSE_MAKEFILE ON)\n"
+       "SET(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n"
+       "SET(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n"
+Index: sundials-2.5.0/config/FindLAPACK.cmake
+===================================================================
+--- sundials-2.5.0.orig/config/FindLAPACK.cmake	2012-07-09 16:10:55.000000000 +0200
++++ sundials-2.5.0/config/FindLAPACK.cmake	2012-07-09 16:14:25.000000000 +0200
+@@ -30,7 +30,7 @@
+   check_fortran_function_exists(cheev LAPACK_BLAS_WORKS)
+   mark_as_advanced(LAPACK_BLAS_WORKS)
+   if(LAPACK_BLAS_WORKS)
+-    set(LAPACK_FOUND TRUE)
++    #???set(LAPACK_FOUND TRUE)
+     set(LAPACK_LIBRARIES ${BLAS_LIBRARIES})
+   endif(LAPACK_BLAS_WORKS)
+   # Generic LAPACK library?
+@@ -81,7 +81,7 @@
+ 
+ if(NOT LAPACK_FIND_QUIETLY)
+   if(LAPACK_FOUND)
+-    message(STATUS "A library with LAPACK API found.")
++    message(STATUS "A library with LAPACK API found ${LAPACK_LIBRARIES}")
+   else(LAPACK_FOUND)
+     if(LAPACK_FIND_REQUIRED)
+       message(FATAL_ERROR 

Modified: packages/sundials/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/patches/series?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/patches/series (original)
+++ packages/sundials/trunk/debian/patches/series Mon Jul  9 16:19:04 2012
@@ -1,3 +1,4 @@
+cmake.patch
 makefile.patch
 #sh4.patch
 fix-format-error.patch

Modified: packages/sundials/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/rules?rev=45223&op=diff
==============================================================================
--- packages/sundials/trunk/debian/rules (original)
+++ packages/sundials/trunk/debian/rules Mon Jul  9 16:19:04 2012
@@ -1,57 +1,56 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-
 #include /usr/share/hardening-includes/hardening.make
 #
-#CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
-#LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
-#CFLAGS+=$(HARDENING_CFLAGS)
-#LDFLAGS+=$(HARDENING_LDFLAGS)
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
 
 debusr := $(DEB_DESTDIR)usr
 debexp = debian/libsundials-serial-dev/usr/share/doc/libsundials-serial-dev/examples
 
-DEB_AUTO_UPDATE_AUTOMAKE := 1.11
+extra_flags += \
+   -DCMAKE_Fortran_COMPILER=gfortran \
+   -DBUILD_SHARED_LIBS:BOOL=ON \
+   -DFCMIX_ENABLE:BOOL=ON \
+   -DMPI_ENABLE:BOOL=ON \
+   -DLAPACK_ENABLE:BOOL=ON \
+   -DEXAMPLES_ENABLE:BOOL=ON \
+   -DEXAMPLES_INSTALL:BOOL=OFF
 
-DEB_CONFIGURE_EXTRA_FLAGS := --enable-shared --disable-mpi --enable-examples
-DEB_CONFIGURE_SCRIPT_ENV += F77="gfortran"
-DEB_MAKE_INSTALL_TARGET := install prefix=$(debusr) EXS_INSTDIR=$(DEB_DESTDIR)$(debexp)
-
-DEB_INSTALL_MANPAGES_libsundials-serial-dev := debian/sundials-config.1
-DEB_INSTALL_EXAMPLES_libsundials-serial-dev := examples/*
-DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
-
-DEB_COMPRESS_EXCLUDE = .c .out .f
-
-USCAN_DESTDIR := $(CURDIR)/../tarballs
-DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -n -e 's/\.dfsg.*$$//p')
+BUILDDIR = $(CURDIR)/debian/build
 
 # Get the appropriate paths for the installation of the Octave files
 mpath = $(shell octave-config -p LOCALFCNFILEDIR)
-bpath = $(shell octave-config -p LOCALARCHLIBDIR)
+bpath = $(shell octave-config -p LOCALOCTFILEDIR)
 
-# The following hack is necessary because the upstream makefiles do
-# not install $libdir and $includedir or $mandir
-common-install-prehook-impl::
-	mkdir -p $(debusr)/lib
-	mkdir -p $(debusr)/include
-	mkdir -p $(debusr)/share/man/man1
 
-build/libsundials-serial::
-	$(SHELL) debian/check.sh
+%:
+	dh $@ --buildsystem=cmake  --builddirectory=$(BUILDDIR) --parallel
 
-build/octave-sundials::
+override_dh_auto_configure:
+	dh_auto_configure -- $(extra_flags)
+
+override_dh_auto_test:
+	dh_auto_test
+	echo "Running test..."
+	$(SHELL) debian/check.sh $(BUILDDIR) $(CURDIR)
+
+override_dh_auto_build:
+	dh_auto_build 
+	
+#
+#build/octave-sundials::
 	mkdir -p sundialsTB/octave
 	cd sundialsTB && octave -fV install_STB.m
-	strip sundialsTB/octave/sundialsTB/cvodes/cvm/cvm.mex
-	strip sundialsTB/octave/sundialsTB/idas/idm/idm.mex
-	strip sundialsTB/octave/sundialsTB/kinsol/kim/kim.mex
 
-install/octave-sundials::
+override_dh_auto_install:
+	dh_auto_install
+#
+#install/octave-sundials::
 	mkdir -p debian/tmp/$(mpath)
 	mkdir -p debian/tmp/$(bpath)/sundialsTB/cvodes/cvm/
 	mv sundialsTB/octave/sundialsTB/cvodes/cvm/cvm.mex debian/tmp/$(bpath)/sundialsTB/cvodes/cvm
@@ -61,34 +60,51 @@
 	mv sundialsTB/octave/sundialsTB/kinsol/kim/kim.mex debian/tmp/$(bpath)/sundialsTB/kinsol/kim
 	mv sundialsTB/octave/* debian/tmp/$(mpath)
 	rm debian/tmp/$(mpath)/sundialsTB/LICENSE
+#
+#install sundials-config
+	cp bin/sundials-config.in bin/sundials-config
+	perl -pi -e "s|\@SHELL\@|/bin/bash|" bin/sundials-config
+	
+	dh_install -a -Nlibsundials-doc
+	dh_install -plibsundials-doc -X.txt -X.out -X.in -XREADME
+	
+#
+#to generate symbols
+#	dpkg-gensymbols -plibsundials-parallel -O
 
-binary-install/libsundials-serial-dev::
-	find $(deblib) \( -name \*.la \) -exec rm -rf {} +
-	find $(debexp) \( -name \*.libs \) -exec rm -rf {} +
-	find $(debexp) \
-	        -type f -a ! \( -name README -o -name \*.out		\
-				   -o -name \*.f -o -name \*.c \)	\
-		-a -exec rm -f \{\} \;
+override_dh_strip:
+	find debian/tmp/$(bpath) -name \*.mex | xargs -r strip
 
-clean::
+	dh_strip -a -Nlibsundials-serial -Nlibsundials-parallel
+	dh_strip -plibsundials-serial --dbg-package=libsundials-serial-dbg
+	dh_strip -plibsundials-parallel --dbg-package=libsundials-parallel-dbg
+
+override_dh_auto_clean:
 	find examples \
-	        -type f -a  \( -name \*.o -o -name \*.out \)	\
+	        -type f -a  \( -name \*.o \)	\
 		-a -exec rm -f \{\} \;
 	find sundialsTB \
 	        -type f -a  \( -name \*.o -o -name \*.mex \)	\
 		-a -exec rm -f \{\} \;
 	rm -rf sundialsTB/octave
 	rm -rf bin/makefile-update.sh
+	dh_auto_clean
 	
+# Grab the version before +dfsg
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p')
+DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/-[^-]*$$//')
+
+USCAN_DESTDIR := $(CURDIR)/../tarballs
+
 
 get-orig-source:
 	mkdir -p $(USCAN_DESTDIR)
 	uscan --force-download  --no-symlink --verbose --destdir $(USCAN_DESTDIR)
-	tar -C $(USCAN_DESTDIR) -xzf $(USCAN_DESTDIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_STRIPPED_UPSTREAM_VERSION).orig.tar.gz
-	rm -f $(USCAN_DESTDIR)/$(DEB_SOURCE_PACKAGE)*.tar.gz
-	find $(USCAN_DESTDIR)/$(DEB_SOURCE_PACKAGE)-$(DEB_STRIPPED_UPSTREAM_VERSION) -name \*.pdf | xargs rm
+	tar -C $(USCAN_DESTDIR) -xzf $(USCAN_DESTDIR)/sundials_$(DEB_STRIPPED_UPSTREAM_VERSION).orig.tar.gz
+	rm -f $(USCAN_DESTDIR)/sundials*.tar.gz
+	find $(USCAN_DESTDIR)/sundials-$(DEB_STRIPPED_UPSTREAM_VERSION) -name \*.pdf | xargs rm
 	cd $(USCAN_DESTDIR) && GZIP=-9 tar -czf \
-	   $(CURDIR)/$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
-	   $(DEB_SOURCE_PACKAGE)-$(DEB_STRIPPED_UPSTREAM_VERSION)
-	rm -rf $(USCAN_DESTDIR)/$(DEB_SOURCE_PACKAGE)-$(DEB_STRIPPED_UPSTREAM_VERSION)
+	   $(CURDIR)/sundials_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
+	   sundials-$(DEB_STRIPPED_UPSTREAM_VERSION)
+	rm -rf $(USCAN_DESTDIR)/sundials-$(DEB_STRIPPED_UPSTREAM_VERSION)
 	

Added: packages/sundials/trunk/debian/source/format
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/source/format?rev=45223&op=file
==============================================================================
--- packages/sundials/trunk/debian/source/format (added)
+++ packages/sundials/trunk/debian/source/format Mon Jul  9 16:19:04 2012
@@ -1,0 +1,1 @@
+3.0 (quilt)




More information about the debian-science-commits mailing list