Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to meson #29

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Move to meson #29

wants to merge 4 commits into from

Conversation

liz-desartiges
Copy link

@liz-desartiges liz-desartiges commented Jul 3, 2024

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

@liz-desartiges liz-desartiges marked this pull request as ready for review July 3, 2024 18:20
@liz-desartiges
Copy link
Author

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

@liz-desartiges
Copy link
Author

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

@liz-desartiges
Copy link
Author

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 <[email protected]>

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!

@liz-desartiges
Copy link
Author

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

@liz-desartiges
Copy link
Author

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 ?

@liz-desartiges
Copy link
Author

liz-desartiges commented Jul 4, 2024 via email

@liz-desartiges
Copy link
Author

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

@liz-desartiges
Copy link
Author

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.

@liz-desartiges
Copy link
Author

liz-desartiges commented Jul 6, 2024 via email

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
2 participants