From 4fdb7b9f2c776a61196ff703967ed571dc557899 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 5 Oct 2024 20:43:30 +0300 Subject: [PATCH 1/5] meson: don't prepend / Prepending `/` renders `prefix` useless, so users cannot customize the install location. --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index fbf1e30..da7698d 100644 --- a/meson.build +++ b/meson.build @@ -39,7 +39,7 @@ spdlog_dep = dependency('spdlog', include_type: 'system') ############ # Variable # ############ -sysconf_dir = '/' / get_option('sysconfdir') / meson.project_name() +sysconf_dir = get_option('sysconfdir') / meson.project_name() log_dir = get_option('localstatedir') / 'log' / meson.project_name() cfg_data = configuration_data( { @@ -80,12 +80,12 @@ install_data( if get_option('boot_service') == 'systemd' install_data( 'boot_service/systemd/linux-enable-ir-emitter.service', - install_dir: '/' / get_option('sysconfdir') / 'systemd/system', + install_dir: get_option('sysconfdir') / 'systemd/system', ) elif get_option('boot_service') == 'openrc' install_data( 'boot_service/openrc/linux-enable-ir-emitter', - install_dir: '/' / get_option('sysconfdir') / 'init.d', + install_dir: get_option('sysconfdir') / 'init.d', ) endif From 78b88f93f40d7f07016c482adf99528bb3b2ba3c Mon Sep 17 00:00:00 2001 From: EmixamPP Date: Thu, 10 Oct 2024 22:29:40 +0200 Subject: [PATCH 2/5] chore(CI): fix artifact build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1180fcc..b83c544 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: - name: Setup build run: | - meson setup build --libdir=lib --prefer-static --pkg-config-path=$(find .github -name "pkgconfig") + meson setup build --sysconfdir /etc --prefer-static --pkg-config-path $(find .github -name "pkgconfig") case "${{ inputs.buildtype }}" in "release") meson configure build --optimization=s --strip From 50a53a99f3bca7a497a2f708d344c8dfce65e93a Mon Sep 17 00:00:00 2001 From: EmixamPP Date: Thu, 10 Oct 2024 22:30:55 +0200 Subject: [PATCH 3/5] chore(build): move configuration to sub meson --- meson.build | 21 +++++++-------------- src/meson.build | 8 ++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/meson.build b/meson.build index da7698d..f5eb622 100644 --- a/meson.build +++ b/meson.build @@ -39,25 +39,20 @@ spdlog_dep = dependency('spdlog', include_type: 'system') ############ # Variable # ############ -sysconf_dir = get_option('sysconfdir') / meson.project_name() +config_dir = get_option('sysconfdir') / meson.project_name() log_dir = get_option('localstatedir') / 'log' / meson.project_name() -cfg_data = configuration_data( - { - 'version': meson.project_version(), - 'configdir': sysconf_dir, - 'log_file': log_dir / meson.project_name() + '.log', - }, -) ############## # Executable # ############## subdir('src') -################# -# Configuration # -################# -install_emptydir(sysconf_dir) +################ +# Config + Log # +################ +install_emptydir(config_dir) + +install_emptydir(log_dir) #################### # Shell completion # @@ -92,8 +87,6 @@ endif ########## # Others # ########## -install_emptydir(log_dir) - install_data( 'README.md', install_dir: get_option('datadir') / 'doc' / meson.project_name(), diff --git a/src/meson.build b/src/meson.build index ca7a9d1..ed6b601 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,11 @@ +cfg_data = configuration_data( + { + 'version': meson.project_version(), + 'configdir': config_dir, + 'log_file': log_dir / meson.project_name() + '.log', + }, +) + configure_file( input: 'linux-enable-ir-emitter.cpp.in', output: 'linux-enable-ir-emitter.cpp', From a648108b14e65adad01e339ca63f56dc26cec9fd Mon Sep 17 00:00:00 2001 From: EmixamPP Date: Fri, 11 Oct 2024 18:14:28 +0200 Subject: [PATCH 4/5] chore: bump version to 6.0.6 --- CHANGELOG.md | 2 ++ meson.build | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd59cf1..e122c05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# Fri Oct 11 2024 - 6.0.6 +- Better building system compatibility # Wed Oct 2 2024 - 6.0.5 - Fix fmt lib compatibility # Fri Sept 30 2024 - 6.0.4 diff --git a/meson.build b/meson.build index f5eb622..939d41f 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'linux-enable-ir-emitter', 'cpp', - version: '6.0.5', + version: '6.0.6', license: 'MIT', default_options: [ 'cpp_std=c++20', From 0e7d456879f5e0a042d620c21fbc48c0b8dee56f Mon Sep 17 00:00:00 2001 From: EmixamPP Date: Fri, 11 Oct 2024 18:15:46 +0200 Subject: [PATCH 5/5] chore(ci): fix bot comment on fork's PR (tentative) --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 827336a..b1e9c6f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,7 +1,7 @@ name: Pull Request on: - pull_request: + pull_request_target: jobs: build: @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest if: always() steps: - - uses: thollander/actions-comment-pull-request@v2 + - uses: thollander/actions-comment-pull-request@v3 with: comment_tag: bot_comment mode: recreate