Skip to content

Commit

Permalink
Merge pull request #199 from fufexan/master
Browse files Browse the repository at this point in the history
meson: don't prepend /
  • Loading branch information
EmixamPP authored Oct 11, 2024
2 parents 9f3fcc3 + 0e7d456 commit f0c6a73
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Pull Request

on:
pull_request:
pull_request_target:

jobs:
build:
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
27 changes: 10 additions & 17 deletions meson.build
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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 #
Expand All @@ -80,20 +75,18 @@ 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

##########
# Others #
##########
install_emptydir(log_dir)

install_data(
'README.md',
install_dir: get_option('datadir') / 'doc' / meson.project_name(),
Expand Down
8 changes: 8 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit f0c6a73

Please sign in to comment.