From 1fd28aad64a27498a0344dafcabe1e4d991ac16e Mon Sep 17 00:00:00 2001 From: Swapnil Devesh Date: Fri, 28 Jun 2024 18:27:16 +0530 Subject: [PATCH] Update packaging --- .github/workflows/build.yml | 8 ++++---- README.md | 14 ++++++-------- arch | 2 +- build-deb.sh | 1 + debian/control | 2 +- rpm/com.sidevesh.Luminance.spec | 5 ++++- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40f3680..7fedb0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,13 +11,12 @@ on: jobs: build-deb: name: Build and upload deb package - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Install dependencies run: | - sudo add-apt-repository -y ppa:rockowitz/ddcutil sudo apt-get update - sudo apt-get install -y libgtk-3-dev ddcutil libddcutil-dev libglib2.0-dev gcc + sudo apt-get install -y gcc libglib2.0-dev libgtk-4-dev libadwaita-1-dev libddcutil-dev - name: Set up Git repository uses: actions/checkout@v2 @@ -44,7 +43,8 @@ jobs: steps: - name: Install dependencies run: | - sudo dnf install -y git-all ddcutil libddcutil libddcutil-devel gtk3-devel fedora-packager rpmdevtools gcc + sudo dnf -y upgrade + sudo dnf install -y git-all gcc glib2-devel gtk4-devel libadwaita-devel libddcutil-devel fedora-packager rpmdevtools - name: Set up Git repository uses: actions/checkout@v2 diff --git a/README.md b/README.md index 478c537..5f7acbe 100644 --- a/README.md +++ b/README.md @@ -35,25 +35,24 @@ Latest rpm release is available on the releases page https://github.com/sidevesh ### Dependencies - ddcutil library package (typically libddcutil or libddcutil-dev if not already installed with ddcutil) -- GTK 3.0 +- GTK 4.0 +- Libadwaita ### Steps 1. Firstly, ensure that all the dependencies are installed: ##### Arch Linux: ``` - pacman -S --needed ddcutil gtk3 + pacman -S --needed glib2 gtk4 libadwaita ddcutil ``` ##### Ubuntu-based distros (credit @aidengilmartin): ``` - sudo apt install libgtk3-dev gcc - sudo add-apt-repository ppa:rockowitz/ddcutil # add ddcutil repo - sudo apt install ddcutil libddcutil-dev + sudo apt install gcc libglib2.0-dev libgtk-4-dev libadwaita-1-dev libddcutil-dev ``` ##### Fedora: ``` - sudo dnf install ddcutil libddcutil libddcutil-devel gtk3-devel gcc + sudo dnf install gcc glib2-devel gtk4-devel libadwaita-devel libddcutil-devel ``` 2. Ensure that your user has access to the i2c devices: @@ -134,5 +133,4 @@ Project Link: [https://github.com/sidevesh/Luminance](https://github.com/sideves - @ahshabbir : for ddcbc-api and ddcbc-gtk: https://github.com/ahshabbir/ddcbc-api - @rockowitz : for ddcutil c api: https://github.com/rockowitz/ddcutil -- @jimmac : for the awesome new icon: -- https://github.com/jimmac +- @jimmac : for the awesome new icon: https://github.com/jimmac diff --git a/arch b/arch index e579bb7..73d66e6 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit e579bb785f8c55470616df57a840905f7adcc0db +Subproject commit 73d66e64814a1ac9516ee8004772e33ace205311 diff --git a/build-deb.sh b/build-deb.sh index 7e4d525..f4a3778 100755 --- a/build-deb.sh +++ b/build-deb.sh @@ -14,6 +14,7 @@ mkdir -p ./build/debian-package-files/usr/share/applications mkdir -p ./build/debian-package-files/usr/share/glib-2.0/schemas mkdir -p ./build/debian-package-files/usr/lib/udev/rules.d mkdir -p ./build/debian-package-files/usr/share/icons/hicolor/scalable/apps +mkdir -p ./build/debian-package-files/usr/share/icons/hicolor/symbolic/apps echo "Copying files to the package structure..." cp ./debian/control ./build/debian-package-files/DEBIAN/control diff --git a/debian/control b/debian/control index 86e466d..375d7f8 100644 --- a/debian/control +++ b/debian/control @@ -5,4 +5,4 @@ Maintainer: Swapnil Devesh Homepage: https://github.com/sidevesh/Luminance Description: A simple GTK application to control brightness of displays including external displays supporting DDC/CI License: GPL-3.0 -Depends: libgtk-4-1, libadwaita-1-0, ddcutil, libddcutil4 +Depends: libglib2.0-0, libgtk-4-1, libadwaita-1-0, libddcutil4 diff --git a/rpm/com.sidevesh.Luminance.spec b/rpm/com.sidevesh.Luminance.spec index 7f95bc2..a3bc9d8 100644 --- a/rpm/com.sidevesh.Luminance.spec +++ b/rpm/com.sidevesh.Luminance.spec @@ -10,10 +10,13 @@ BuildArch: x86_64 # Define the BuildRequires and Requires packages BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(ddcutil) +Requires: glib2 Requires: gtk4 Requires: libadwaita -Requires: ddcutil +Requires: libddcutil %description Luminance is a simple GTK application that allows you to control the brightness of displays, including external displays supporting DDC/CI.