From 20fbde5e9a01451d3dc29ae4b9d973166e60c60e Mon Sep 17 00:00:00 2001 From: Dilawar Singh <dilawars@ncbs.res.in> Date: Tue, 4 Aug 2015 17:26:30 +0530 Subject: [PATCH] Added debian folder for launchpad. --- debian/README.Debian | 6 ++++ debian/changelog | 9 +++++ debian/compat | 1 + debian/control | 66 ++++++++++++++++++++++++++++++++++++ debian/copyright | 33 ++++++++++++++++++ debian/moose-core.install | 2 ++ debian/moose-dev.install | 2 ++ debian/moose-doc.install | 0 debian/moose-gui.install | 2 ++ debian/moose-moogli.install | 1 + debian/moose-moogli.postinst | 44 ++++++++++++++++++++++++ debian/moose-moogli.prerm | 58 +++++++++++++++++++++++++++++++ debian/moose-python.install | 1 + debian/moose-python.postinst | 46 +++++++++++++++++++++++++ debian/moose-python.prerm | 57 +++++++++++++++++++++++++++++++ debian/rules | 48 ++++++++++++++++++++++++++ 16 files changed, 376 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/moose-core.install create mode 100644 debian/moose-dev.install create mode 100644 debian/moose-doc.install create mode 100644 debian/moose-gui.install create mode 100644 debian/moose-moogli.install create mode 100755 debian/moose-moogli.postinst create mode 100755 debian/moose-moogli.prerm create mode 100644 debian/moose-python.install create mode 100755 debian/moose-python.postinst create mode 100755 debian/moose-python.prerm create mode 100755 debian/rules diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..989036c4 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +moose for Debian +---------------- + +<possible notes regarding this package - if none, delete this file> + + -- Dilawar <dilawars@ncbs.res.in> Thu, 24 Jul 2014 16:41:58 +0530 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..8e3e6829 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,9 @@ +moose (3.0.2) unstable; urgency=low + + * Initial release + * Feature-freeze release. + * trunk series. Experimental branch. + * 3.0.2 relase. + * Just packed with SBML and GSL-1.6 support. + + -- Dilawar <dilawars@ncbs.res.in> Sun, 05 July 2015 13:41:58 +0530 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..9c0ebf67 --- /dev/null +++ b/debian/control @@ -0,0 +1,66 @@ +Source: moose +Section: science +Priority: optional +Maintainer: Dilawar Singh <dilawars@ncbs.res.in> +Build-Depends: debhelper, cdbs, devscripts, cmake, python-setuptools, build-essential, doxygen, python-qt4, python-qt4-dev, libopenscenegraph-dev, python-sip-dev, libqt4-dev, libqt4-opengl-dev, libxml2-dev, libbz2-dev, python-dev, python-numpy, libhdf5-serial-dev, libgsl0-dev, python-qt4-gl +Standards-Version: 3.9.5 +Homepage: http://moose.ncbs.res.in + +Package: moose-all +Architecture: any +Depends: moose-python, moose-gui, moose-moogli +Description: MOOSE is the Multiscale Object-Oriented Simulation Environment + It is the base and numerical core for large, detailed simulations including Computational Neuroscience and Systems Biology. + . + MOOSE spans the range from single molecules to subcellular networks, from + single cells to neuronal networks, and to still larger systems. MOOSE uses + Python for scripting compatibility with a large range of software and + analysis tools. It recognizes model definition standards including SBML, + NeuroML, and GENESIS model file formatsGallery + . + MOOSE is open source software, licensed under the LGPL (Lesser GNU Public + License). It has absolutely no warranty. + . + The MOOSE team is also participating in development of MOOGLI: a library and + standalone application for displaying time-course of activity of detailed 3-D + network models using OpenGL and also using OpenSceneGraph + + +Package: moose-core +Architecture: any +Depends: ${shlibs:Depends} +Description: Core C++ part of MOOSE + . + Core MOOSE engine without any scripting support. For general use see moose-python, moose-gui packages. This is only useful on clusters. + + +Package: moose-python +Architecture: any +Depends: ${shlibs:Depends}, python-numpy, python-matplotlib, python-nose, python-networkx, python-setuptools, python-suds +Description: Python interface of MOOSE Simulator + . + This package installs python scripting interface. + +Package: moose-gui +Architecture: any +Depends: python-qt4, moose-python +Description: GUI of moose + . + This package installs the GUI frontend of MOOSE neural simulator. + +Package: moose-moogli +Architecture: any +Depends: ${shlibs:Depends}, python-qt4-gl, python-sip, libqt4-gui, openscenegraph, moose-gui +Suggests: moose-python +Description: Visualizer for neural simulator + . + Moogli (a sister project of MOOSE) is a simulator independent openGL based + visualization tool for neural simulations. Moogli can visualize morphology of + single/multiple neurons or network of neurons, and can also visualize activity + in these cells. + +Package: moose-doc +Architecture: any +Description: User and developer documents of MOOSE neural simulator + . + This package installs user-manuals, tutorials, and developer document of MOOSE simulator. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..48013513 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: moose +Source: http://moose.ncbs.res.in + +Files: * +Copyright: 2007-15 Upinder Bhalla + 2009-13 Subhasis Ray + 2013-15 Dilawar Singh + 2014-15 Aviral Goel + +License: LGPL-3.0+ + +Files: debian/* +Copyright: 2014 Dilawar Singh <dilawars@ncbs.res.in> +License: LGPL-3.0+ + +License: LGPL-3.0+ + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + . + This package 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 + Lesser General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + . + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. diff --git a/debian/moose-core.install b/debian/moose-core.install new file mode 100644 index 00000000..1cb49585 --- /dev/null +++ b/debian/moose-core.install @@ -0,0 +1,2 @@ +usr/bin/moose.bin +usr/bin/moose diff --git a/debian/moose-dev.install b/debian/moose-dev.install new file mode 100644 index 00000000..34534c36 --- /dev/null +++ b/debian/moose-dev.install @@ -0,0 +1,2 @@ +usr/bin/moose* +usr/lib/libmoose* diff --git a/debian/moose-doc.install b/debian/moose-doc.install new file mode 100644 index 00000000..e69de29b diff --git a/debian/moose-gui.install b/debian/moose-gui.install new file mode 100644 index 00000000..ba3a0386 --- /dev/null +++ b/debian/moose-gui.install @@ -0,0 +1,2 @@ +usr/lib/moose/gui +usr/bin/moosegui diff --git a/debian/moose-moogli.install b/debian/moose-moogli.install new file mode 100644 index 00000000..2fc6202a --- /dev/null +++ b/debian/moose-moogli.install @@ -0,0 +1 @@ +usr/share/moogli/moogli*.tar.gz diff --git a/debian/moose-moogli.postinst b/debian/moose-moogli.postinst new file mode 100755 index 00000000..0624d9c3 --- /dev/null +++ b/debian/moose-moogli.postinst @@ -0,0 +1,44 @@ +#!/bin/sh +# postinst script for moose +# +# see: dh_installdeb(1) + +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> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + mkdir -p /etc/moogli + cd /usr/share/moogli + tar xzvf moogli-1.0.1.tar.gz + cd moogli-1.0.1 + python setup-moogli.py install --install-layout=deb --record /etc/moogli/installed_files.txt + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/moose-moogli.prerm b/debian/moose-moogli.prerm new file mode 100755 index 00000000..5bbe65c6 --- /dev/null +++ b/debian/moose-moogli.prerm @@ -0,0 +1,58 @@ +#!/bin/sh +# prerm script for moose +# +# see: dh_installdeb(1) + +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 http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + + if [ -d /usr/lib/moogli ]; then + rm -R /usr/lib/moogli + fi + if [ -d /etc/moogli ]; then + ( + cd /etc/moogli + while read -r line + do + # get the egg directory and remove it. + dirname=`expr $line : '\(.*moogli-.*egg\)'` + if [ -d "$dirname" ]; then + rm -rf $dirname + fi + # This line is usually redundant now. + if [ -f $line ]; then rm -f $line ; fi + done < installed_files.txt + ) + rm -R /etc/moogli + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/moose-python.install b/debian/moose-python.install new file mode 100644 index 00000000..0043ee3c --- /dev/null +++ b/debian/moose-python.install @@ -0,0 +1 @@ +usr/share/moose/moose*.tar.gz diff --git a/debian/moose-python.postinst b/debian/moose-python.postinst new file mode 100755 index 00000000..43a7ebef --- /dev/null +++ b/debian/moose-python.postinst @@ -0,0 +1,46 @@ +#!/bin/sh +# postinst script for moose +# +# see: dh_installdeb(1) + +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> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ( + mkdir -p /etc/moose + cd /usr/share/moose + tar xzvf moose-3.0.2.tar.gz + cd moose-3.0.2 + python setup-moose.py install --install-layout=deb --record /etc/moose/installed_files.txt + ) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/moose-python.prerm b/debian/moose-python.prerm new file mode 100755 index 00000000..fb54a154 --- /dev/null +++ b/debian/moose-python.prerm @@ -0,0 +1,57 @@ +#!/bin/sh +# prerm script for moose +# +# see: dh_installdeb(1) + +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 http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + remove|upgrade|deconfigure) + if [ -d /etc/moose ]; then + ( + cd /etc/moose + while read -r line + do + # get the egg directory and remove it. + dirname=`expr $line : '\(.*moose-.*egg\)'` + if [ -d "$dirname" ]; then + rm -rf $dirname + fi + # This line is usually redundant now. + if [ -f $line ]; then rm -f $line ; fi + done < installed_files.txt + ) + rm -R /etc/moose + fi + + if [ -d /usr/share/moose ]; then + rm -R /usr/share/moose + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..50a253ef --- /dev/null +++ b/debian/rules @@ -0,0 +1,48 @@ +#!/usr/bin/make -f + +# export DH_VERBOSE=1 +export BUILD_DIR_MOOSE=_build +NPROCS := 1 +OS := $(shell uname) +ifeq ($J,) + ifeq ($(OS),Linux) + NPROCS := $(shell grep -c ^processor /proc/cpuinfo) +else ifeq ($(OS),Darwin) + NPROCS := $(shell system_profiler | awk '/Number of CPUs/ {print $$4}{next;}') +endif # $(OS) +else + NPROCS := $J +endif # $J + +MAKEFLAGS=-j$(NPROCS) + +export PYTHONPATH=$(shell pwd)/../debian/tmp/$(PYTHON_LIBS)) + +## Here goes the debian make. + +%: + dh "$@" --parallel + +override_dh_auto_clean: + rm -rf $(BUILD_DIR_MOOSE) + dh_auto_clean --buildsystem=cmake + +# consider using -DUSE_VERSIONED_DIR=ON if backporting +override_dh_auto_configure: + mkdir -p $(BUILD_DIR_MOOSE) + cd $(BUILD_DIR_MOOSE) && cmake -DDEBUG=OFF -DBUILD_MOOGLI=ON -DCMAKE_VERBOSE_MAKEFILE=OFF \ + -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr .. + +override_dh_auto_build: + cd $(BUILD_DIR_MOOSE) && make VERBOSE=1 #-j${NPROCS} + + +override_dh_auto_install: + # Distable python install + cd $(BUILD_DIR_MOOSE) && make install + +override_dh_auto_test: + cd $(BUILD_DIR_MOOSE) && make test + +override_dh_shlibdeps: + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -- GitLab