Skip to content

Conversation

@soubiliz
Copy link

@soubiliz soubiliz commented Jul 3, 2024

also move things that should be in header in header
fix #16

@soubiliz soubiliz force-pushed the main branch 5 times, most recently from f1d5a82 to bdf3cca Compare July 3, 2024 18:05
@soubiliz soubiliz marked this pull request as ready for review July 3, 2024 18:20
@soubiliz
Copy link
Author

soubiliz commented Jul 3, 2024

for now I don't install the .desktop and icons but the app build just fine

@soubiliz
Copy link
Author

soubiliz commented Jul 3, 2024

it does require ahshabbir/ddcbc-api#2 to build

@soubiliz
Copy link
Author

soubiliz commented Jul 3, 2024

I'm not sure how to handle the udev rules, I'm new to meson

for now I haven't really looked at packaging, didn't figure out how deb generation works

from reading the archwiki I got this for the pkgbuild :

# Maintainer: Swapnil Devesh <me@sidevesh.com>

pkgname=luminance
_pkgname=Luminance
pkgver=1.1.0
pkgrel=1
pkgdesc="A simple GTK application to control brightness of displays including external displays supporting DDC/CI"
arch=('x86_64')
url="https://github.com/sidevesh/$_pkgname"
license=('GPL3')
makedepends=('meson' 'git')
depends=('glib2' 'gtk4' 'libadwaita' 'ddcutil')
provides=("$pkgname")
conflicts=("$pkgname")
source=("git+https://github.com/sidevesh/$_pkgname.git#tag=$pkgver" "git+https://github.com/ahshabbir/ddcbc-api.git")
sha256sums=('SKIP' 'SKIP')

prepare() {
  meson subprojects download --sourcedir="$srcdir/$_pkgname"
}

build() {
    arch-meson "$srcdir/$_pkgname" _build
    meson compile -C _build
}

package() {
  meson install -C _build --destdir "$pkgdir"
  install -Dm644 "$srcdir/$_pkgname/data/44-backlight-permissions.rules" "$pkgdir/usr/lib/udev/rules.d/44-backlight-permissions.rules"
}

@sidevesh
Copy link
Owner

sidevesh commented Jul 4, 2024

Hey @liz-desartiges ,
first of all thanks for your work on the PR, really appreciate it!
Its also amazing coincidence that I was also working on exactly this recently,

My goals were shifting to meson,
and I also wanted to add separate application id and the devel icon and header bar style in the app in development like the first party Gnome apps do,

I see you have fixed out the C code a lot including the warnings during build, amazing work and sorry for my messy C code,

I have pushed my implementation to meson_build branch and you can check it out,
I had also incorporated installing the files into the meson config which we will need to do,

and also the deb, rpm and maybe even arch packaging / push will need to be done,
but neither of our branches are addressing that so will have to work on it once rest of the stuff is in place,
but in the meantime the build_rpm.sh and build _deb.sh files will have to be updated atleast to first do the meson build and then copy files from the right build dir.

Let me know if you would prefer incorporating changes from my branch to yours and then we merge in your PR or if you would rather I incorporate changes from yout PR to mine, up to you :)
and again thanks for the sizable contribution, PRs like yours makes me incredibly happy about OSS!

@soubiliz
Copy link
Author

soubiliz commented Jul 4, 2024

I spent way more time than I though I would on this, I don't mind if you take this pr and incorporate your changes to it

@soubiliz
Copy link
Author

soubiliz commented Jul 4, 2024

for deb I found that debhelper support meson I just haven't figured out how it works, and there is a rpm package for meson to build them, as for arch what I posted above should do the trick

@sidevesh
Copy link
Owner

sidevesh commented Jul 4, 2024

Cool, I guess I will update the arch pkgbuild once these changes are ready and merged,
would you be looking at deb and rpm building from meson or any other changes you want to add to this PR ?

@soubiliz
Copy link
Author

soubiliz commented Jul 4, 2024 via email

@soubiliz
Copy link
Author

soubiliz commented Jul 4, 2024

Oops meson rpm module was removed : https://mesonbuild.com/Release-notes-for-0-62-0.html#removal-of-the-rpm-module

@soubiliz
Copy link
Author

soubiliz commented Jul 4, 2024

The packaging rules for fedora and meson : https://docs.fedoraproject.org/en-US/packaging-guidelines/Meson/

@sidevesh
Copy link
Owner

sidevesh commented Jul 6, 2024

@liz-desartiges can you separate the C code changes including breaking things into header files into a separate PR that I can merge in first and then handle the meson setup ?
I will tackle the rpm and deb packaging through meson after the C code fixes and and meson config for building and installing the app is merged into main branch.

@soubiliz
Copy link
Author

soubiliz commented Jul 6, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file has mixed tabs and spaces

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@voidanix
Copy link

voidanix commented Nov 3, 2025

Any updates on this @soubiliz ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using a build system

4 participants