Skip to content

Commit

Permalink
[iss-225]
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 351b9a9
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Wed Apr 19 12:58:22 2023 -0300

    Update build script.

commit 6244907
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Wed Apr 19 12:57:01 2023 -0300

    Added control file for u22.
  • Loading branch information
joaquinffernandez committed Apr 19, 2023
1 parent dddb768 commit 8e1fdef
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
20 changes: 16 additions & 4 deletions deploy/linux/build.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,23 @@ echo "Retrieving latest from Git";
git pull

cat ./deploy/linux/qss-solver.ini.in > ./deploy/linux/qss-solver.ini

# Set solver version
VER=`cat ./deploy/linux/version`
INI_VER="version="$VER
echo $INI_VER >> ./deploy/linux/qss-solver.ini

# Set OS config files.
CONTROL_FILE="control.amd64"
SBML_LIB="libsbml.so.5.18.0"
PACKAGE_NAME=qss-solver-$VER.deb
SYSTEM_VERSION=`lsb_release -d`
if [[ "$SYSTEM_VERSION" == *"22.04"* ]]; then
CONTROL_FILE="control.amd64.u22"
SBML_LIB="libsbml.so.5.19.0"
PACKAGE_NAME=qss-solver-$VER-u22.deb
fi

# Set solver branch
BRANCH=`git rev-parse --abbrev-ref HEAD`
BRANCH="branch="$BRANCH
Expand Down Expand Up @@ -60,8 +72,8 @@ mkdir ./tmp_deb/opt/qss-solver/build
mkdir ./tmp_deb/opt/qss-solver/output
mkdir ./tmp_deb/opt/qss-solver/lib/

cat ./tmp_deb/DEBIAN/control.amd64 | awk -v VERSION="$VER" '{ if(index($0,"Version:")>=1) print "Version: " VERSION ; else print $0;}' > ./tmp_deb/DEBIAN/control
rm ./tmp_deb/DEBIAN/control.amd64;
cat ./tmp_deb/DEBIAN/$CONTROL_FILE | awk -v VERSION="$VER" '{ if(index($0,"Version:")>=1) print "Version: " VERSION ; else print $0;}' > ./tmp_deb/DEBIAN/control
rm ./tmp_deb/DEBIAN/$CONTROL_FILE

cp deploy/linux/version ./tmp_deb/opt/qss-solver/
cp src/mmoc/usr/bin/mmoc ./tmp_deb/opt/qss-solver/bin/
Expand Down Expand Up @@ -99,7 +111,7 @@ rm -rf ./tmp_deb/opt/qss-solver/src/usr/lib
rm -rf ./tmp_deb/opt/qss-solver/src/interfaces/sbml/usr
rm -rf ./tmp_deb/opt/qss-solver/src/gui/usr

cp /usr/lib/x86_64-linux-gnu/libsbml.so.5.18.0 ./tmp_deb/opt/qss-solver/lib/libsbml.so.5
cp /usr/lib/x86_64-linux-gnu/$SBML_LIB ./tmp_deb/opt/qss-solver/lib/libsbml.so.5
cp src/engine/3rd-party/partitioners/patoh/Linux-x86_64/libpatoh.a ./tmp_deb/opt/qss-solver/lib/libpatoh.a
cp src/engine/3rd-party/partitioners/metis/Linux-x86_64/libmetis.a ./tmp_deb/opt/qss-solver/lib/libmetis.a

Expand All @@ -115,7 +127,7 @@ chmod 0644 `find tmp_deb/opt/qss-solver/packages/ -type f`
chmod 0644 `find tmp_deb/opt/qss-solver/src/usr/ -type f`
chmod 0755 `find tmp_deb/ -type d`
fakeroot dpkg -b tmp_deb qss-solver.deb
mv qss-solver.deb ./deploy/linux/qss-solver-$VER.deb
mv qss-solver.deb ./deploy/linux/$PACKAGE_NAME
rm -rf tmp_deb
rm -rf tmp
cd deploy/linux
9 changes: 9 additions & 0 deletions deploy/linux/deb/DEBIAN/control.amd64.u22
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: qss-solver
Version:
Architecture: amd64
Maintainer: Joaquin Fernandez <fernandez@cifasis-conicet.gov.ar>
Depends: gnuplot-x11, build-essential (>= 11.4), qtbase5-dev, qt5-qmake, zenity, gfortran (>=4.6.3), libconfig-dev, libblas-dev, libgsl0-dev, libsuitesparse-dev, libcln6, libatlas-base-dev
Section: science
Priority: extra
Homepage: https://github.com/CIFASIS/qss-solver
Description: Quantized State System Solver.

0 comments on commit 8e1fdef

Please sign in to comment.