build: support split packaging for buffyboard and unl0kr
This commit is contained in:
parent
69a6b6ee8b
commit
426f849b72
6 changed files with 83 additions and 23 deletions
|
|
@ -11,6 +11,7 @@ If a change only affects particular applications, they are listed in parentheses
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
- misc: Use standard C library instead of builtin functions (!49, thanks @vstoiakin)
|
- misc: Use standard C library instead of builtin functions (!49, thanks @vstoiakin)
|
||||||
|
- feat: Add support for split packaging of buffyboard and unl0kr (!54, thanks @vstoiakin)
|
||||||
|
|
||||||
## 3.3.0 (2025-04-15)
|
## 3.3.0 (2025-04-15)
|
||||||
|
|
||||||
|
|
|
||||||
32
README.md
32
README.md
|
|
@ -54,6 +54,38 @@ On distributions based on systemd, `unl0kr` can be used as a [password agent](ht
|
||||||
# systemd-ask-password --no-tty # Unl0kr is started
|
# systemd-ask-password --no-tty # Unl0kr is started
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
Create a full package:
|
||||||
|
```
|
||||||
|
meson setup builddir/
|
||||||
|
meson compile -C builddir/
|
||||||
|
meson install -C builddir/ --destdir "$pkgdir"
|
||||||
|
```
|
||||||
|
|
||||||
|
Create separate packages for Buffyboard and Unl0kr:
|
||||||
|
```
|
||||||
|
meson setup builddir/
|
||||||
|
meson compile -C builddir/
|
||||||
|
meson install -C builddir/ --tags=unl0kr --destdir "$pkgdir_unl0kr"
|
||||||
|
meson install -C builddir/ --tags=buffyboard --destdir "$pkgdir_buffyboard"
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a package for Unl0kr only:
|
||||||
|
```
|
||||||
|
meson setup builddir/
|
||||||
|
meson compile -C builddir/ unl0kr/unl0kr
|
||||||
|
meson compile -C builddir/ unl0kr/unl0kr-agent # on systemd-based distributions
|
||||||
|
meson install -C builddir/ --tags=unl0kr --destdir "$pkgdir"
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a package for Buffyboard only:
|
||||||
|
```
|
||||||
|
meson setup builddir/
|
||||||
|
meson compile -C builddir/ buffyboard/buffyboard
|
||||||
|
meson install -C builddir/ --tags=buffyboard --destdir "$pkgdir"
|
||||||
|
```
|
||||||
|
|
||||||
## Making a release
|
## Making a release
|
||||||
|
|
||||||
To make it easier for distributions to package BuffyBox, we include source tarballs including the LVGL submodule in GitLab releases. See [unl0kr#42] for more background on this.
|
To make it easier for distributions to package BuffyBox, we include source tarballs including the LVGL submodule in GitLab releases. See [unl0kr#42] for more background on this.
|
||||||
|
|
|
||||||
|
|
@ -19,25 +19,25 @@ executable('buffyboard',
|
||||||
include_directories: common_include_dirs,
|
include_directories: common_include_dirs,
|
||||||
sources: buffyboard_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
sources: buffyboard_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
||||||
dependencies: buffyboard_dependencies,
|
dependencies: buffyboard_dependencies,
|
||||||
install: true
|
install: true,
|
||||||
|
install_tag: 'buffyboard'
|
||||||
)
|
)
|
||||||
|
|
||||||
install_data('buffyboard.conf', install_dir: get_option('sysconfdir'))
|
install_data('buffyboard.conf',
|
||||||
|
install_dir: get_option('sysconfdir'),
|
||||||
|
install_tag: 'buffyboard'
|
||||||
|
)
|
||||||
|
|
||||||
systemd = dependency('systemd', required: get_option('systemd-buffyboard-service'))
|
depsystemd = dependency('systemd', required: get_option('systemd-buffyboard-service'))
|
||||||
if systemd.found()
|
if depsystemd.found()
|
||||||
system_unit_dir = systemd.get_variable(
|
system_unit_dir = depsystemd.get_variable(pkgconfig: 'systemd_system_unit_dir')
|
||||||
pkgconfig: 'systemd_system_unit_dir',
|
|
||||||
pkgconfig_define: ['prefix', get_option('prefix')],
|
|
||||||
)
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input : 'buffyboard.service.in',
|
configuration: {'bindir': get_option('prefix') / get_option('bindir')},
|
||||||
output : 'buffyboard.service',
|
input: 'buffyboard.service.in',
|
||||||
install : true,
|
output: 'buffyboard.service',
|
||||||
install_dir : system_unit_dir,
|
install: true,
|
||||||
configuration : {
|
install_dir: system_unit_dir,
|
||||||
'bindir' : get_option('prefix') / get_option('bindir'),
|
install_tag: 'buffyboard'
|
||||||
},
|
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,24 @@ progscdoc = depscdoc.get_variable(pkgconfig: 'scdoc')
|
||||||
|
|
||||||
foreach file : [
|
foreach file : [
|
||||||
'buffyboard.1',
|
'buffyboard.1',
|
||||||
'buffyboard.conf.5',
|
'buffyboard.conf.5'
|
||||||
|
]
|
||||||
|
|
||||||
|
section = file.split('.')[-1]
|
||||||
|
|
||||||
|
custom_target(file,
|
||||||
|
command: progscdoc,
|
||||||
|
feed: true,
|
||||||
|
capture: true,
|
||||||
|
input: file + '.scd',
|
||||||
|
output: file,
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('mandir') / 'man' + section,
|
||||||
|
install_tag: 'buffyboard'
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
foreach file : [
|
||||||
'unl0kr.1',
|
'unl0kr.1',
|
||||||
'unl0kr.conf.5'
|
'unl0kr.conf.5'
|
||||||
]
|
]
|
||||||
|
|
@ -16,6 +33,7 @@ foreach file : [
|
||||||
input: file + '.scd',
|
input: file + '.scd',
|
||||||
output: file,
|
output: file,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('mandir') / 'man' + section
|
install_dir: get_option('mandir') / 'man' + section,
|
||||||
|
install_tag: 'unl0kr'
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
project('buffybox', 'c',
|
project('buffybox', 'c',
|
||||||
version: '3.3.0',
|
version: '3.3.0',
|
||||||
default_options: ['warning_level=3', 'b_ndebug=if-release'],
|
default_options: ['warning_level=3', 'b_ndebug=if-release'],
|
||||||
meson_version: '>= 0.59.0'
|
meson_version: '>= 0.60.0'
|
||||||
)
|
)
|
||||||
|
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,14 @@ executable('unl0kr',
|
||||||
sources: unl0kr_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
sources: unl0kr_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
||||||
dependencies: unl0kr_dependencies,
|
dependencies: unl0kr_dependencies,
|
||||||
c_args: unl0kr_args,
|
c_args: unl0kr_args,
|
||||||
install: true
|
install: true,
|
||||||
|
install_tag: 'unl0kr'
|
||||||
)
|
)
|
||||||
|
|
||||||
install_data('unl0kr.conf', install_dir: get_option('sysconfdir'))
|
install_data('unl0kr.conf',
|
||||||
|
install_dir: get_option('sysconfdir'),
|
||||||
|
install_tag: 'unl0kr'
|
||||||
|
)
|
||||||
|
|
||||||
depsystemd = dependency('systemd', required: get_option('systemd-password-agent'))
|
depsystemd = dependency('systemd', required: get_option('systemd-password-agent'))
|
||||||
if depsystemd.found()
|
if depsystemd.found()
|
||||||
|
|
@ -42,18 +46,23 @@ if depsystemd.found()
|
||||||
dependencies: depinih,
|
dependencies: depinih,
|
||||||
c_args: '-DUNL0KR_BINARY="@0@"'.format(get_option('prefix') / get_option('bindir') / 'unl0kr'),
|
c_args: '-DUNL0KR_BINARY="@0@"'.format(get_option('prefix') / get_option('bindir') / 'unl0kr'),
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('libexecdir')
|
install_dir: get_option('libexecdir'),
|
||||||
|
install_tag: 'unl0kr'
|
||||||
)
|
)
|
||||||
|
|
||||||
system_unit_dir = depsystemd.get_variable(pkgconfig: 'systemd_system_unit_dir')
|
system_unit_dir = depsystemd.get_variable(pkgconfig: 'systemd_system_unit_dir')
|
||||||
|
|
||||||
install_data('unl0kr-agent.path', install_dir: system_unit_dir)
|
install_data('unl0kr-agent.path',
|
||||||
|
install_dir: system_unit_dir,
|
||||||
|
install_tag: 'unl0kr'
|
||||||
|
)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
configuration: {'LIBEXECDIR': get_option('prefix') / get_option('libexecdir')},
|
configuration: {'LIBEXECDIR': get_option('prefix') / get_option('libexecdir')},
|
||||||
input: 'unl0kr-agent.service.in',
|
input: 'unl0kr-agent.service.in',
|
||||||
output: 'unl0kr-agent.service',
|
output: 'unl0kr-agent.service',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: system_unit_dir
|
install_dir: system_unit_dir,
|
||||||
|
install_tag: 'unl0kr'
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue