Fixed installation path in Debian packages
This commit is contained in:
parent
c2d91726a7
commit
ad1d1396df
8
.gitignore
vendored
8
.gitignore
vendored
@ -31,11 +31,7 @@ build_packages/*
|
|||||||
build_packages/NSIS/*
|
build_packages/NSIS/*
|
||||||
!build_packages/NSIS/ProgressiaInstaller.nsi
|
!build_packages/NSIS/ProgressiaInstaller.nsi
|
||||||
|
|
||||||
# ... and except build_packages/DEB/progressia-*/DEBIAN/control
|
# ... and except build_packages/DEB/template
|
||||||
!build_packages/DEB
|
!build_packages/DEB
|
||||||
build_packages/DEB/*
|
build_packages/DEB/*
|
||||||
!build_packages/DEB/progressia-*
|
!build_packages/DEB/template
|
||||||
build_packages/DEB/progressia-*/*
|
|
||||||
!build_packages/DEB/progressia-*/DEBIAN
|
|
||||||
build_packages/DEB/progressia-*/DEBIAN/*
|
|
||||||
!build_packages/DEB/progressia-*/DEBIAN/control
|
|
||||||
|
@ -25,15 +25,20 @@ buildDebianPackage() {
|
|||||||
# Commands that must be available to execute this action
|
# Commands that must be available to execute this action
|
||||||
requiredCommands='dpkg-deb fakeroot'
|
requiredCommands='dpkg-deb fakeroot'
|
||||||
|
|
||||||
# Version that the package will receive
|
# Package name. Sync with control file manually!
|
||||||
version='0.1_all'
|
name='progressia-techdemo'
|
||||||
|
# Version that the package will receive. Sync with control file manually!
|
||||||
|
version='1.0_all'
|
||||||
|
|
||||||
directory="build_packages/DEB/progressia-$version"
|
# This directory will be copied into $tmpDir
|
||||||
|
templateDirectory="build_packages/DEB/template"
|
||||||
|
|
||||||
# .deb control file that must be present
|
# Files that must be present
|
||||||
configurationFile="$directory/DEBIAN/control"
|
requiredFiles="$templateDirectory/DEBIAN/control"
|
||||||
|
|
||||||
outputFile="build_packages/DEB/progressia-$version.deb"
|
nameAndVersion="$name-$version"
|
||||||
|
tmpDir="build_packages/DEB/$nameAndVersion"
|
||||||
|
outputFile="build_packages/DEB/$nameAndVersion.deb"
|
||||||
|
|
||||||
echo "Checking environment to build Debian package"
|
echo "Checking environment to build Debian package"
|
||||||
|
|
||||||
@ -46,26 +51,29 @@ buildDebianPackage() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! [ -r "$configurationFile" ]; then
|
for file in $requiredFiles; do
|
||||||
echoerr "$configurationFile is missing or not readable, cannot package"
|
if ! [ -r "$file" ]; then
|
||||||
exit 101
|
echoerr "$file is missing or not readable, cannot package"
|
||||||
else
|
exit 101
|
||||||
echo "- $configurationFile is present and readable"
|
else
|
||||||
fi
|
echo "- $file is present and readable"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "Environment OK; packaging Debian package"
|
echo "Environment OK; packaging Debian package"
|
||||||
exitCode=0
|
exitCode=0
|
||||||
|
|
||||||
{
|
{
|
||||||
user=`whoami`
|
shareDir="$tmpDir/usr/share/progressia"
|
||||||
homeDir="$directory/home/$user/Progressia/"
|
|
||||||
|
|
||||||
mkdir -p "$homeDir" &&
|
mkdir -p "$tmpDir" &&
|
||||||
cp -r 'build/libs/lib' "$homeDir/lib" &&
|
mkdir -p "$shareDir" &&
|
||||||
cp 'build/libs/Progressia.jar' "$homeDir/Progressia.jar" &&
|
cp -r "$templateDirectory"/* "$tmpDir" &&
|
||||||
echo "------ DPKG-DEB ------" &&
|
cp -r 'build/libs/lib' "$shareDir/lib" &&
|
||||||
fakeroot dpkg-deb --build "$directory" &&
|
cp 'build/libs/Progressia.jar' "$shareDir/Progressia.jar" &&
|
||||||
echo "---- DPKG-DEB END ----" &&
|
echo "------ DPKG-DEB ------" &&
|
||||||
|
fakeroot dpkg-deb --build "$tmpDir" &&
|
||||||
|
echo "---- DPKG-DEB END ----" &&
|
||||||
mv "$outputFile" build_packages
|
mv "$outputFile" build_packages
|
||||||
} || {
|
} || {
|
||||||
echoerr "Could not create Debian package"
|
echoerr "Could not create Debian package"
|
||||||
@ -73,8 +81,8 @@ buildDebianPackage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
if [ -d "$homeDir" ]; then
|
if [ -d "$tmpDir" ]; then
|
||||||
rm -r "$homeDir"
|
rm -r "$tmpDir"
|
||||||
fi
|
fi
|
||||||
echo "Cleaned up"
|
echo "Cleaned up"
|
||||||
} || {
|
} || {
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
Package: Progressia
|
|
||||||
Version: 0.1
|
|
||||||
Section: custom
|
|
||||||
Priority: optional
|
|
||||||
Architecture: all
|
|
||||||
Essential: no
|
|
||||||
Maintainer: Test
|
|
||||||
Depends: default-jdk
|
|
||||||
Description: Test package
|
|
8
build_packages/DEB/template/DEBIAN/control
Normal file
8
build_packages/DEB/template/DEBIAN/control
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Package: progressia-techdemo
|
||||||
|
Version: 1.0
|
||||||
|
Section: custom
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Maintainer: Javapony <kvadropups@gmail.com>
|
||||||
|
Depends: java8-runtime
|
||||||
|
Description: Progressia Techdemo release
|
Reference in New Issue
Block a user