Skip to content

Commit

Permalink
rewrote DEB packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
erwindon committed Feb 7, 2023
1 parent b115242 commit 5fad588
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
*.jar
*.war
*.ear
*.deb

target
.project
.settings
.idea
*.iml
.DS_Store

src/deb/fmtn-a/usr
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- #142 java updated to 11
- #142 updated procedure to create DEB package

## [1.5.2]

Expand Down
2 changes: 2 additions & 0 deletions src/deb/a.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec java -jar /usr/share/java/a-*-jar-with-dependencies.jar "$@"
10 changes: 0 additions & 10 deletions src/deb/bin.sh

This file was deleted.

28 changes: 28 additions & 0 deletions src/deb/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# Script to build a DEB (Debian/Ubuntu/etc) installer package
# This procedure might not delivere a package that is ready to be added to one of these distributions
# But it will deliver an installable DEB packager

# install the required software
sudo apt-get install maven

# Build the actual 'a' software
(cd ../..; mvn clean install -DskipTests)

# Add the full jar file to the distribution
mkdir --parents fmtn-a/usr/share/java
cp ../../target/a-*-jar-with-dependencies.jar fmtn-a/usr/share/java/

# Add a helper script to the distribution
mkdir --parents fmtn-a/usr/bin
cp a.sh fmtn-a/usr/bin/a
chmod a+rx fmtn-a/usr/bin/a

# Build the package
dpkg-deb --build --root-owner-group fmtn-a

# (sample) Install the package
#sudo dpkg -i fmtn-a.deb

# End
8 changes: 0 additions & 8 deletions src/deb/control/control

This file was deleted.

8 changes: 8 additions & 0 deletions src/deb/fmtn-a/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package: fmtn-a
Version: 1.6.0
Section: misc
Priority: optional
Architecture: all
Maintainer: Petter Nordlander <nordlander.petter@gmail.com>
Description: ActiveMQ CLI testing and message management
Depends: java11-runtime-headless | java12-runtime-headless | java13-runtime-headless | java14-runtime-headless | java15-runtime-headless | java16-runtime-headless | java17-runtime-headless | java18-runtime-headless | java19-runtime-headless | java20-runtime-headless | java21-runtime-headless

0 comments on commit 5fad588

Please sign in to comment.