Skip to content
Snippets Groups Projects
Commit f11851f5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

template and script for creating debian package

parent ee403761
No related branches found
No related tags found
3 merge requests!264Resolve "add support for matomo",!236Main,!232Resolve "debian package for frontend"
#!/bin/bash #!/bin/bash
versionCompLte() { set -e
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionCompLt() {
[ "$1" = "$2" ] && return 1 || versionCompLte $1 $2
}
#Where source file of the debian package should be placed #Where source file of the debian package should be placed
SRC_DIR=debian/src SRC_DIR=debian/src
...@@ -15,8 +8,7 @@ SRC_DIR=debian/src ...@@ -15,8 +8,7 @@ SRC_DIR=debian/src
ROOT_DIR=`pwd` ROOT_DIR=`pwd`
#clean build directories #clean build directories
rm -rf $SRC_DIR rm -rf $SRC_DIR debian/minerva-front*
rm -rf debian/minerva*
#recreate directory #recreate directory
mkdir $SRC_DIR mkdir $SRC_DIR
...@@ -28,18 +20,19 @@ cp -r out $SRC_DIR/front ...@@ -28,18 +20,19 @@ cp -r out $SRC_DIR/front
cd $SRC_DIR cd $SRC_DIR
zip -r front.zip front zip -r front.zip front
rm -r front
cd $ROOT_DIR cd $ROOT_DIR
#copy changelog file #copy changelog file
cp CHANGELOG $ROOT_DIR/debian/template/changelog cp CHANGELOG $ROOT_DIR/debian/template/changelog
current_version=`cat CHANGELOG |grep minerva |head -1 | cut -f2 -d'(' | cut -f1 -d')'` current_version=`cat CHANGELOG |grep minerva-front |head -1 | cut -f2 -d'(' | cut -f1 -d')'`
echo "Current version: " $current_version echo "Current version: " $current_version
#dh_make requires directory name to be like <package>-<version> #dh_make requires directory name to be like <package>-<version>
# this points to the directory # this points to the directory
DEBIAN_DIR=debian/minerva-$current_version/ DEBIAN_DIR=debian/minerva-front-$current_version/
mkdir $DEBIAN_DIR mkdir $DEBIAN_DIR
...@@ -55,18 +48,20 @@ dh_make -s --createorig -e piotr.gawron@uni.lu -y -t $ROOT_DIR/debian/template ...@@ -55,18 +48,20 @@ dh_make -s --createorig -e piotr.gawron@uni.lu -y -t $ROOT_DIR/debian/template
echo "1.0" > debian/source/format echo "1.0" > debian/source/format
#remove example files generated by dh_make #remove example files generated by dh_make
find -name '*.ex' ! -name 'minerva*' -type f -exec rm -f {} + find -name '*.ex' ! -name 'minerva-front*' -type f -exec rm -f {} +
#set proper architecture #set proper architecture
arch=`dpkg --print-architecture` arch=`dpkg --print-architecture`
echo "Architecture: $arch" >>debian/control echo "Architecture: $arch" >>debian/control
#remove some sample file #remove some sample file
rm debian/*.EX rm debian/*.ex debian/README.Debian debian/README.source debian/minerva-front-docs.docs
rm debian/*.ex
#build debian package #build debian package
debuild -us -uc debuild --no-lintian -us -uc
#run separately to fail on errors
lintian --suppress-tags bad-distribution-in-changes-file --fail-on warning,error --no-tag-display-limit
# remove temporary changelog # remove temporary changelog
rm $ROOT_DIR/debian/template/changelog rm $ROOT_DIR/debian/template/changelog
Package: minerva-front Source: minerva-front
Version: 18.0.0~beta.2
Section: science Section: science
Priority: optional Priority: optional
Maintainer: Piotr Gawron <piotr.gawron@uni.lu> Maintainer: Piotr Gawron <piotr.gawron@uni.lu>
Standards-Version: 3.9.7
Vcs-Browser: https://gitlab.lcsb.uni.lu/minerva/frontend
Build-Depends: debhelper (>=10)
Package: minerva-front
Priority: optional
Description: Frontend for standalone web application for visualization, Description: Frontend for standalone web application for visualization,
exploration and management of molecular networks encoded in SBGN-compliant exploration and management of molecular networks encoded in SBGN-compliant
format. After installation, the resource is used and managed via a webbrowser, format. After installation, the resource is used and managed via a web browser,
under the default address 'http://localhost:8080/minerva/'. Full documentation under the default address 'http://localhost:8080/minerva/'. Full documentation
can be found here: https://minerva.pages.uni.lu/doc/ can be found here: https://minerva.pages.uni.lu/doc/
Homepage: https://minerva.pages.uni.lu/
Depends: ${misc:Depends}
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: minerva-front
Source: https://minerva.pages.uni.lu/doc/
Files: front.zip
Copyright: 2024 Piotr Gawron <piotr.gawron@uni.lu>
License: AGPL-3.0
Comment: Manual for the package.
Files: debian/*
Copyright: 2024 Piotr Gawron <piotr.gawron@uni.lu>
License: AGPL-3.0
License: AGPL-3.0
Copyright (C) 2024 Piotr Gawron
.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
.
This program 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 Affero General Public License for more details.
.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
#!/usr/bin/make -f
%:
dh $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment