Skip to content

Commit

Permalink
#227 add script for building backend deb package
Browse files Browse the repository at this point in the history
  • Loading branch information
elKei24 committed Feb 4, 2021
1 parent 5cd19d6 commit 1aaed7a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions scripts/backend_deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

# deb constants
version=1.0
revision=1
name=eak-backend
architecture=amd64
maintainer="The Ehrenamtskarte Team <[email protected]>"
description="Backend server for the Ehrenamtskarte app"

fullname=${name}_${version}-${revision}_${architecture}
debworkdir=build/$fullname
debfile=build/${fullname}.deb
ctrlfile=${debworkdir}/DEBIAN/control

# build backend
./gradlew build

# init deb workdir
mkdir -p $debworkdir
rm -rf ${debworkdir}/*
mkdir ${debworkdir}/DEBIAN
touch $ctrlfile
echo "Package: $name" >> $ctrlfile
echo "Version: $version" >> $ctrlfile
echo "Architecture: $architecture" >> $ctrlfile
echo "Maintainer: $maintainer" >> $ctrlfile
echo "Description: $description" >> $ctrlfile

# copy files to deb workdir
mkdir -p ${debworkdir}/var/ehrenamtskarte/backend
tar -xf build/distributions/backend.tar -C ${debworkdir}/var/ehrenamtskarte

# build the deb
dpkg-deb --build --root-owner-group $debworkdir $debfile

0 comments on commit 1aaed7a

Please sign in to comment.