-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update debian .deb package creation script
- Loading branch information
1 parent
e9f1b9e
commit 9e0ad02
Showing
1 changed file
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# Create folders for pacakge formats | ||
mkdir deb | ||
for ARCH in amd64 arm64 armhf | ||
do | ||
# Create folder for architecture and package format | ||
mkdir -p $ARCH/powerjoular/usr/bin $ARCH/powerjoular/etc/systemd/system $ARCH/powerjoular/DEBIAN | ||
|
||
# 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 ./$ARCH/powerjoular/usr/bin/ | ||
cp ../systemd/powerjoular.service ./$ARCH/powerjoular/etc/systemd/system/ | ||
cp ./debian-control-$ARCH.txt ./$ARCH/powerjoular/DEBIAN/control | ||
|
||
# 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 .. | ||
# Create deb package | ||
cd ./$ARCH | ||
VERSION=$(grep '^Version:' powerjoular/DEBIAN/control | awk '{print $2}') | ||
dpkg-deb --build powerjoular | ||
mv powerjoular.deb powerjoular_${VERSION}_${ARCH}.deb | ||
cd .. | ||
done |