[bornagain] 01/01: monolithic bornagain package works - python bindings still TODO

Mika Pflüger mikapfl-guest at moszumanska.debian.org
Sat Dec 3 22:51:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

mikapfl-guest pushed a commit to branch debian
in repository bornagain.

commit 9e3855a7ebf7ff33ab1821183dae9306c39f1040
Author: Mika Pflüger <mika at mikapflueger.de>
Date:   Sat Dec 3 23:50:36 2016 +0100

    monolithic bornagain package works - python bindings still TODO
---
 debian/TODO                            |   1 +
 debian/bornagain.install               |   5 ++
 debian/control                         |  81 ++++++++++++++++-
 debian/patches/0001-debian-paths.patch | 158 +++++++++++++++++++++++++++++++++
 debian/patches/series                  |   1 +
 debian/python-bornagain.install        |   1 +
 debian/rules                           |  24 +----
 7 files changed, 248 insertions(+), 23 deletions(-)

diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..515d8c3
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1 @@
+* disable question about checking for updates.
diff --git a/debian/bornagain.install b/debian/bornagain.install
new file mode 100644
index 0000000..b7dbcec
--- /dev/null
+++ b/debian/bornagain.install
@@ -0,0 +1,5 @@
+usr/bin/bornagain
+usr/share/bornagain/images/*
+usr/share/doc/bornagain/*
+usr/lib/bornagain/*.so
+usr/include/bornagain/*
diff --git a/debian/control b/debian/control
index b7e4b38..36c15c8 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,22 @@ Source: bornagain
 Priority: extra
 Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Mika Pflüger <debian at mikapflueger.de>
-Build-Depends: debhelper (>=9), cmake, libgsl0-dev, libboost-all-dev, libfftw3-dev, python-dev, python-numpy, python-matplotlib, libtiff5-dev, libeigen3-dev, libyaml-cpp-dev, python-yaml, qtbase5-dev, libqt5designercomponents5, qttools5-dev, qtscript5-dev
+Build-Depends: debhelper (>=9),
+	       cmake,
+	       libgsl0-dev,
+	       libboost-all-dev,
+	       libfftw3-dev,
+	       python-dev,
+	       python-numpy-dev,
+	       python-matplotlib,
+	       libtiff5-dev,
+	       libeigen3-dev,
+	       libyaml-cpp-dev,
+	       python-yaml,
+	       qtbase5-dev,
+	       libqt5designercomponents5,
+	       qttools5-dev,
+	       qtscript5-dev
 Standards-Version: 3.9.8
 Section: science
 Homepage: http://bornagainproject.org/
@@ -11,7 +26,9 @@ Vcs-Browser: https://anonscm.debian.org/git/debian-science/packages/bornagain.gi
 
 Package: bornagain
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: ${misc:Depends},
+	 ${shlibs:Depends},
+Recommends: python-bornagain
 Description: Simulate and fit X-ray and neutron small-angle scattering at grazing incidence
  BornAgain is a software package to simulate and fit small-angle scattering at
  grazing incidence. It supports analysis of both X-ray (GISAXS) and neutron
@@ -63,5 +80,63 @@ Description: Simulate and fit X-ray and neutron small-angle scattering at grazin
   — Software for simulating and fitting X-ray and neutron small-angle
   scattering at grazing incidence, version <version you used>,
   http://www.bornagainproject.org
-       
 
+Package: python-bornagain
+Architecture: any
+Depends: ${misc:Depends},
+	 ${shlibs:Depends},
+	 bornagain (= ${binary:Version})
+Description: Simulate and fit X-ray and neutron small-angle scattering at grazing incidence
+ BornAgain is a software package to simulate and fit small-angle scattering at
+ grazing incidence. It supports analysis of both X-ray (GISAXS) and neutron
+ (GISANS) data. Calculations are carried out in the framework of the distorted
+ wave Born approximation (DWBA). BornAgain provides a graphical user interface
+ for interactive use as well as a generic Python and C++ framework for modeling
+ multilayer samples with smooth or rough interfaces and with various types of
+ embedded nanoparticles.
+ .
+ BornAgain supports:
+ .
+ Layers:
+  * Multilayers without any restrictions on the number of layers
+  * Interface roughness correlation
+  * Magnetic materials
+ .
+ Particles:
+  * Choice between different shapes of particles (form factors)
+  * Particles with inner structures
+  * Assemblies of particles
+  * Size distribution of the particles (polydispersity)
+ .
+ Positions of Particles:
+  * Decoupled implementations between vertical and planar positions
+  * Vertical distributions: particles at specific depth in layers or on top.
+  * Planar distributions:
+    - fully disordered systems
+    - short-range order distribution (paracrystals)
+    - two- and one-dimensional lattices
+ .
+ Input Beam:
+  * Polarized or unpolarized neutrons
+  * X-ray
+  * Divergence of the input beam (wavelength, incident angles) following
+    different distributions
+  * Possible normalization of the input intensity
+ .
+ Detector:
+  * Off specular scattering
+  * Two-dimensional intensity matrix, function of the output angles
+ .
+ Use of BornAgain:
+  * Simulation of GISAXS and GISANS from the generated sample
+  * Fitting to reference data (experimental or numerical)
+  * Interactions via Python scripts or Graphical User Interface
+ .
+ If you use BornAgain in your work, please cite
+  C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke (2015), BornAgain
+  — Software for simulating and fitting X-ray and neutron small-angle
+  scattering at grazing incidence, version <version you used>,
+  http://www.bornagainproject.org
+  .
+  This package contains the python bindings for use in scripts.
+ 
\ No newline at end of file
diff --git a/debian/patches/0001-debian-paths.patch b/debian/patches/0001-debian-paths.patch
new file mode 100644
index 0000000..6947165
--- /dev/null
+++ b/debian/patches/0001-debian-paths.patch
@@ -0,0 +1,158 @@
+From: =?utf-8?q?Mika_Pfl=C3=BCger?= <mika at mikapflueger.de>
+Date: Tue, 22 Nov 2016 12:10:03 +0100
+Subject: debian paths
+
+---
+ Core/CMakeLists.txt                                | 38 +++++++++++-----------
+ GUI/main/CMakeLists.txt                            | 14 ++++----
+ .../bornagain/modules/BornAgainConfiguration.cmake | 15 +++++----
+ 3 files changed, 34 insertions(+), 33 deletions(-)
+
+diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt
+index b0d0373..dd3622d 100644
+--- a/Core/CMakeLists.txt
++++ b/Core/CMakeLists.txt
+@@ -220,12 +220,12 @@ if(WIN32)
+ 
+ else()
+     # Install thisbornagain.sh.
+-    install(FILES
+-                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.sh
+-                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.csh
+-        PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+-        GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
+-        DESTINATION ${destination_libexec})
++#    install(FILES
++#                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.sh
++#                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.csh
++#        PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
++#        GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
++#        DESTINATION ${destination_libexec})
+ 
+     if(NOT BORNAGAIN_APPLE_BUNDLE AND NOT BUILD_DEBIAN)
+         # Create bin directory for links.
+@@ -234,26 +234,26 @@ else()
+             "
+             COMPONENT Runtime)
+         # Make links.
+-        install(CODE "
+-        execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
+-        \"../${destination_libexec}/thisbornagain.sh\" \"thisbornagain.sh\"
+-        WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${destination_bin}\")
+-        " COMPONENT Runtime)
+-        install(CODE "
+-        execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
+-        \"../${destination_libexec}/thisbornagain.csh\" \"thisbornagain.csh\"
+-        WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${destination_bin}\")
+-        " COMPONENT Runtime)
++#        install(CODE "
++#        execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
++#        \"../${destination_libexec}/thisbornagain.sh\" \"thisbornagain.sh\"
++#        WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${destination_bin}\")
++#        " COMPONENT Runtime)
++#        install(CODE "
++#        execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
++#        \"../${destination_libexec}/thisbornagain.csh\" \"thisbornagain.csh\"
++#        WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${destination_bin}\")
++#        " COMPONENT Runtime)
+     else()
+ 
+         install(FILES ${WRAP_DIR}/python/bornagain_python_install.py
+-            DESTINATION ${destination_libexec})
++            DESTINATION ${destination_python})
+     endif()
+ 
+ endif()
+ 
+ # Install bornagain/__init__.py and utilites
+ install(FILES "${CMAKE_BINARY_DIR}/lib/bornagain/__init__.py"
+-        DESTINATION ${destination_libexec}/bornagain/ COMPONENT Libraries)
++        DESTINATION ${destination_python}/bornagain/ COMPONENT Libraries)
+ install(FILES "${CMAKE_BINARY_DIR}/lib/bornagain/plot_utils.py"
+-        DESTINATION ${destination_libexec}/bornagain/ COMPONENT Libraries)
++        DESTINATION ${destination_python}/bornagain/ COMPONENT Libraries)
+diff --git a/GUI/main/CMakeLists.txt b/GUI/main/CMakeLists.txt
+index eecec1f..1b783aa 100644
+--- a/GUI/main/CMakeLists.txt
++++ b/GUI/main/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ ###############################################################################
+ # Builds BornAgain/GUI main executable
+ ###############################################################################
+-set(executable_name BornAgain)
++set(executable_name bornagain)
+ 
+ # -----------------------------------------------------------------------------
+ # source files
+@@ -94,7 +94,7 @@ if(BORNAGAIN_APPLE_BUNDLE)
+ elseif(WIN32)
+     set(executable_destination DESTINATION ${destination_gui})
+ else()
+-    set(executable_destination DESTINATION "${destination_gui}/exec")
++    set(executable_destination DESTINATION "${destination_gui}")
+ endif()
+ #message(STATUS "Executable destination is ${executable_destination}")
+ install (TARGETS ${executable_name} ${executable_destination} COMPONENT Applications)
+@@ -124,10 +124,10 @@ if(UNIX)
+     elseif(WIN32)
+     elseif(NOT BUILD_DEBIAN)
+         # creating link to BornAgain gui in bin directory
+-        install(CODE "
+-        execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
+-        \"../${destination_libexec}/exec/BornAgain\" \"bornagain\"
+-        WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${destination_bin}\")
+-        " COMPONENT Runtime)
++        #install(CODE "
++        #execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
++        #\"../${destination_libexec}/exec/BornAgain\" \"bornagain\"
++        #WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${destination_bin}\")
++        #" COMPONENT Runtime)
+     endif()
+ endif()
+diff --git a/cmake/bornagain/modules/BornAgainConfiguration.cmake b/cmake/bornagain/modules/BornAgainConfiguration.cmake
+index 4a98391..2bffd96 100644
+--- a/cmake/bornagain/modules/BornAgainConfiguration.cmake
++++ b/cmake/bornagain/modules/BornAgainConfiguration.cmake
+@@ -51,7 +51,6 @@ configure_file("${TEMPLATE_DIR}/auto_README.in" "${CMAKE_SOURCE_DIR}/auto/README
+ 
+ file(MAKE_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+ file(MAKE_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/bornagain)
+-file(MAKE_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/exec)
+ file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+ file(MAKE_DIRECTORY ${BUILD_VAR_DIR})
+ file(MAKE_DIRECTORY ${BUILD_INC_DIR})
+@@ -85,7 +84,7 @@ if(WIN32)
+     set(destination_images Images)
+     set(destination_libexec ${destination_bin})
+ else()
+-    set(destination_suffix BornAgain-${BornAgain_VERSION_MAJOR}.${BornAgain_VERSION_MINOR})
++    set(destination_suffix "bornagain")
+     if(APPLE AND BORNAGAIN_APPLE_BUNDLE)
+         set(destination_bundle BornAgain.app)
+         set(destination_prefix ${destination_bundle}/Contents/)
+@@ -97,18 +96,20 @@ else()
+             set(CMAKE_INSTALL_RPATH ${QTDIR}/lib)
+         endif()
+         set(destination_prefix "")
+-        set(destination_libexec ${destination_prefix}lib/${destination_suffix})
++        set(destination_libexec ${destination_prefix}bin)
+     endif()
+     set(destination_bin ${destination_prefix}bin)
+-    set(destination_gui ${destination_libexec})
++    set(destination_gui ${destination_bin})
+     set(destination_lib ${destination_prefix}lib/${destination_suffix})
++    set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${destination_lib})
+     set(destination_include ${destination_prefix}include/${destination_suffix})
+     set(destination_share ${destination_prefix}share/${destination_suffix}/)
+-    set(destination_examples ${destination_share}Examples)
+-    set(destination_images ${destination_share}Images)
++    set(destination_examples ${destination_prefix}share/doc/${destination_suffix}/examples)
++    set(destination_images ${destination_share}images)
++    set(destination_python ${destination_share}python)
+ endif()
+ 
+-message(STATUS "Destination directories: bin->${destination_bin}, lib->${destination_lib}, gui&libexec->${destination_libexec}, include->${destination_include}, share->${destination_share}")
++message(STATUS "Destination directories: bin->${destination_bin}, lib->${destination_lib}, gui&libexec->${destination_libexec}, include->${destination_include}, share->${destination_share}, python->${destination_python}")
+ 
+ # -----------------------------------------------------------------------------
+ # configure files
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..329730a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-debian-paths.patch
diff --git a/debian/python-bornagain.install b/debian/python-bornagain.install
new file mode 100644
index 0000000..6ba89ff
--- /dev/null
+++ b/debian/python-bornagain.install
@@ -0,0 +1 @@
+usr/lib/bornagain/*.py
diff --git a/debian/rules b/debian/rules
index 2f54c47..9b3da69 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,25 +1,9 @@
 #!/usr/bin/make -f
-# See debhelper(7) (uncomment to enable)
 # output every command that modifies files on the build system.
-#export DH_VERBOSE = 1
-
-
-# see FEATURE AREAS in dpkg-buildflags(1)
-#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-# see ENVIRONMENT in dpkg-buildflags(1)
-# package maintainers to append CFLAGS
-#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
-# package maintainers to append LDFLAGS
-#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-
+export DH_VERBOSE = 1
 
 %:
-	dh $@ 
-
-
-# dh_make generated override targets
-# This is example for Cmake (See https://bugs.debian.org/641051 )
-#override_dh_auto_configure:
-#	dh_auto_configure -- #	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+	dh $@ --parallel
 
+override_dh_auto_configure:
+	dh_auto_configure -- -DCMAKE_DEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/bornagain.git



More information about the debian-science-commits mailing list