Skip to content

Commit

Permalink
Improve Linux packages creation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
adelnoureddine committed Jun 14, 2024
1 parent 9ee395d commit 6d85cb7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 11 deletions.
5 changes: 2 additions & 3 deletions installer/PKGBUILD → installer/aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Maintainer: Adel Noureddine <[email protected]>
# Contributor: Axel TERRIER <[email protected]>
pkgname=powerjoular
pkgver=0.7.3
pkgrel=1
pkgdesc="PowerJoular allows monitoring power consumption of multiple platforms and processes."
arch=('x86_64' 'aarch64' 'armv7h')
url="https://github.com/axelterrier/powerjoular"
url="https://github.com/joular/powerjoular"
license=('GPL3')
depends=('gcc-ada' 'gprbuild' 'xmlada' 'libgpr')
source=("$pkgname-$pkgver.tar.gz::https://github.com/axelterrier/powerjoular/archive/refs/heads/develop.tar.gz")
source=("$pkgname-$pkgver.tar.gz::https://github.com/joular/powerjoular/archive/refs/heads/main.tar.gz")
sha256sums=('SKIP')

build() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions installer/create-packages-deb-binary.sh → installer/deb/create-packages-deb-binary.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
ARCHITECTURES=("amd64" "arm64" "armhf")

# Directory of precompiled binaries
BIN_DIR="../obj"
BIN_DIR="../binary"

# Systemd service file directory
SERVICE_DIR="../systemd"
SERVICE_DIR="../binary/systemd"

# Output directory for packages
OUTPUT_DIR="deb_binary_packages"
Expand All @@ -25,7 +25,7 @@ do
mkdir -p $ARCH/powerjoular/DEBIAN

# Copy precompiled binaries to bin directory
cp $BIN_DIR/powerjoular $ARCH/powerjoular/usr/bin/
cp $BIN_DIR/$ARCH/powerjoular $ARCH/powerjoular/usr/bin/

# Copy systemd service files
cp $SERVICE_DIR/powerjoular.service $ARCH/powerjoular/etc/systemd/system/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions installer/create-packages-rpm-binary.sh → installer/rpm/create-packages-rpm-binary.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ do
mkdir -p $SCRIPT_DIR/$ARCH

# Copy binary and service files to their respective directories
cp $SCRIPT_DIR/../obj/powerjoular $SCRIPT_DIR/$ARCH/
cp $SCRIPT_DIR/../systemd/powerjoular.service $SCRIPT_DIR/$ARCH/
cp $SCRIPT_DIR/../binary/$ARCH/powerjoular $SCRIPT_DIR/$ARCH/
cp $SCRIPT_DIR/../binary/systemd/powerjoular.service $SCRIPT_DIR/$ARCH/

# Prepare the RPM build environment
mkdir -p $SCRIPT_DIR/$ARCH/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
Expand All @@ -35,10 +35,12 @@ do
done

# Combine all RPM packages into a single directory for convenience
mkdir -p $SCRIPT_DIR/rpm_binary_packages
mkdir -p $SCRIPT_DIR/packages

for ARCH in "${ARCHS[@]}"
do
mv $SCRIPT_DIR/$ARCH/*.rpm $SCRIPT_DIR/rpm_binary_packages/
mv $SCRIPT_DIR/$ARCH/*.rpm $SCRIPT_DIR/packages/
rm -rf $SCRIPT_DIR/$ARCH
done

echo "All RPM packages have been created and moved to the 'rpm_binary_packages' directory in $SCRIPT_DIR."
echo "All RPM packages have been created and moved to the 'packages' directory in $SCRIPT_DIR."
File renamed without changes.

0 comments on commit 6d85cb7

Please sign in to comment.