Skip to content

Commit

Permalink
Add script to generate deb package
Browse files Browse the repository at this point in the history
  • Loading branch information
adelnoureddine committed Oct 20, 2023
1 parent 2b8593d commit bd1cd87
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 0 deletions.
17 changes: 17 additions & 0 deletions installer/create-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Create folders for pacakge formats
mkdir deb

# Create folder structure for debian
mkdir -p deb/powerjoular/usr/bin deb/powerjoular/etc/systemd/system deb/powerjoular/DEBIAN

# Copy binary files for deb package
cp ../obj/powerjoular ./deb/powerjoular/usr/bin/
cp ../systemd/powerjoular.service ./deb/powerjoular/etc/systemd/system/
cp ./debian-control-$1.txt ./deb/powerjoular/DEBIAN/control

# Create deb package
cd deb
dpkg-deb --build powerjoular
cd ..
5 changes: 5 additions & 0 deletions installer/debian-control-amd64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: powerjoular
Version: 0.7
Maintainer: Adel Noureddine
Architecture: amd64
Description: PowerJoular allows monitoring power consumption of multiple platforms and processes.
5 changes: 5 additions & 0 deletions installer/debian-control-arm64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: powerjoular
Version: 0.7
Maintainer: Adel Noureddine
Architecture: arm64
Description: PowerJoular allows monitoring power consumption of multiple platforms and processes.
5 changes: 5 additions & 0 deletions installer/debian-control-armhf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: powerjoular
Version: 0.7
Maintainer: Adel Noureddine
Architecture: armhf
Description: PowerJoular allows monitoring power consumption of multiple platforms and processes.
11 changes: 11 additions & 0 deletions installer/debian/create_deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# Create folder structure
mkdir -p powerjoular/usr/bin powerjoular/etc/systemd/system powerjoular/DEBIAN

# Copy binary files for deb package
cp ../../obj/powerjoular ./powerjoular/usr/bin/
cp ../../systemd/powerjoular.service ./powerjoular/etc/systemd/system/

# Create deb package
dpkg-deb --build powerjoular
5 changes: 5 additions & 0 deletions installer/debian/powerjoular/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: powerjoular
Version: 0.7
Maintainer: Adel Noureddine
Architecture: amd64
Description: PowerJoular allows monitoring power consumption of multiple platforms and processes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=PowerJoular service

[Service]
Type=simple
Restart=always
User=root
ExecStart=/usr/bin/powerjoular -o /tmp/powerjoular-service.csv

[Install]
WantedBy=multi-user.target
Binary file added installer/debian/powerjoular/usr/bin/powerjoular
Binary file not shown.

0 comments on commit bd1cd87

Please sign in to comment.