Verified Commit 6534cd26 authored by Tobias WEBER's avatar Tobias WEBER
Browse files

packaging script for debian 10

parent af4e3023
......@@ -262,12 +262,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ROOT (Minuit2, etc.)
URL: https://root.cern.ch
URL: https://github.com/root-project/root
URL: https://github.com/root-project/root/tree/master/math/minuit2
URL: https://doi.org/10.5281/zenodo.848818
URL: http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/release/download.html
Copyright (c) 1995-2021 by The ROOT Team.
License: GNU LGPL version 2.1 (see below)
License URL: https://root.cern/about/license/
--------------------------------------------------------------------------------
......
#!/bin/bash
#
# creates a DEB distro
# @author Tobias Weber <tobias.weber@tum.de>
# @license GPLv2
#
# installation directory
INSTDIR="$1"
if [ "${INSTDIR}" = "" ]; then
INSTDIR=~/tmp/takin
fi
# directories
mkdir -p ${INSTDIR}/usr/local/bin
mkdir -p ${INSTDIR}/usr/local/lib
mkdir -p ${INSTDIR}/usr/local/share/takin/res
mkdir -p ${INSTDIR}/usr/local/share/takin/3rdparty_licenses
mkdir -p ${INSTDIR}/usr/share/applications
mkdir -p ${INSTDIR}/DEBIAN
# control file
echo -e "Package: takin\nVersion: 2.0.0" > ${INSTDIR}/DEBIAN/control
echo -e "Description: inelastic neutron scattering software" >> ${INSTDIR}/DEBIAN/control
echo -e "Maintainer: n/a" >> ${INSTDIR}/DEBIAN/control
echo -e "Architecture: $(dpkg --print-architecture)" >> ${INSTDIR}/DEBIAN/control
echo -e "Section: base\nPriority: optional" >> ${INSTDIR}/DEBIAN/control
echo -e "Depends: libstdc++6, libboost-system1.67.0 (>=1.67.0), libboost-filesystem1.67.0 (>=1.67.0), libboost-iostreams1.67.0 (>=1.67.0), libboost-regex1.67.0 (>=1.67.0), libboost-program-options1.67.0 (>=1.67.0), libboost-python1.67.0 (>=1.67.0), libqt5core5a (>=5.9.5), libqt5gui5 (>=5.9.5), libqt5opengl5 (>=5.9.5), libqt5svg5 (>=5.9.5), libqt5xml5 (>=5.9.5), qt5-assistant, libqwt-qt5-6 (>=6.1.3), libpython3.7 (>=3.7.0), python3.7 (>=3.7.0), libfreetype6, gnuplot, gnuplot-qt, libopengl0\n" >> ${INSTDIR}/DEBIAN/control
# copy program files
cp -v bin/takin ${INSTDIR}/usr/local/bin
cp -v bin/convofit ${INSTDIR}/usr/local/bin
cp -v bin/convoseries ${INSTDIR}/usr/local/bin
cp -v bin/sfact ${INSTDIR}/usr/local/bin
cp -v bin/takinmod_py ${INSTDIR}/usr/local/bin
cp -v bin/takinmod_jl ${INSTDIR}/usr/local/bin
cp -rv res/* ${INSTDIR}/usr/local/share/takin/res/
cp -rv doc/* ${INSTDIR}/usr/local/share/takin/res/doc/
cp -v *.txt ${INSTDIR}/usr/local/share/takin
cp -rv 3rdparty_licenses/* ${INSTDIR}/usr/local/share/takin/3rdparty_licenses/
cp -v setup_lin/takin.desktop ${INSTDIR}/usr/share/applications
cp -v /usr/local/lib/libMinuit2.so ${INSTDIR}/usr/local/lib
pushd ${INSTDIR}/usr/local/lib
ln -sf libMinuit2.so libMinuit2.so.0
ln -sf libMinuit2.so libMinuit2.so.0.0
ln -sf libMinuit2.so libMinuit2.so.0.0.0
popd
# copy optional external programs
cp -v bin/takin_cif2xml ${INSTDIR}/usr/local/bin
cp -v bin/takin_findsg ${INSTDIR}/usr/local/bin
cp -v bin/takin_pol ${INSTDIR}/usr/local/bin
cp -v bin/takin_structfact ${INSTDIR}/usr/local/bin
cp -v bin/takin_magstructfact ${INSTDIR}/usr/local/bin
cp -v bin/takin_scanbrowser ${INSTDIR}/usr/local/bin
cp -v bin/takin_magsgbrowser ${INSTDIR}/usr/local/bin
cp -v bin/takin_moldyn ${INSTDIR}/usr/local/bin
# permissions
chmod a+x ${INSTDIR}/usr/local/bin/*
# stripping
strip -v ${INSTDIR}/usr/local/bin/*
strip -v ${INSTDIR}/usr/local/lib/*
# startup script
cp -v takin.sh ${INSTDIR}/usr/local/bin
# build package
cd ${INSTDIR}/..
chmod -R 775 ${INSTDIR}
dpkg --build takin
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment