Turn subproject as fallback (#1)
Use system-wide INIReader if available or fallback to use subproject
This commit is contained in:
parent
ab4a492c37
commit
827f638be6
3 changed files with 37 additions and 12 deletions
|
|
@ -1,20 +1,34 @@
|
||||||
# Howdy PAM module
|
# Howdy PAM module
|
||||||
|
|
||||||
|
## Prepare
|
||||||
|
|
||||||
|
Howdy PAM module depends on `INIReader`.
|
||||||
|
|
||||||
|
If you are building a distro package,
|
||||||
|
there is a list for it below:
|
||||||
|
|
||||||
|
```
|
||||||
|
Arch Linux - libinih
|
||||||
|
Debian - libinih-dev
|
||||||
|
Fedora - inih-devel
|
||||||
|
OpenSUSE - inih
|
||||||
|
```
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
```sh
|
``` sh
|
||||||
meson setup build -Dinih:with_INIReader=true
|
meson setup build
|
||||||
meson compile -C build
|
meson compile -C build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```sh
|
``` sh
|
||||||
sudo mv build/libpam_howdy.so /lib/security/pam_howdy.so
|
sudo meson install -C build
|
||||||
```
|
```
|
||||||
|
|
||||||
Change PAM config line to:
|
Change PAM config line to:
|
||||||
|
|
||||||
```pam
|
``` pam
|
||||||
auth sufficient pam_howdy.so
|
auth sufficient pam_howdy.so
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,20 @@
|
||||||
project('pam_howdy', 'cpp', version: '0.1.0', default_options: ['cpp_std=c++14'])
|
project('pam_howdy', 'cpp', version: '0.1.0', default_options: ['cpp_std=c++14'])
|
||||||
|
|
||||||
inih = subproject('inih')
|
|
||||||
inih_cpp = inih.get_variable('INIReader_dep')
|
|
||||||
|
|
||||||
libpam = meson.get_compiler('c').find_library('pam')
|
|
||||||
boost = dependency('boost', modules: ['locale'])
|
boost = dependency('boost', modules: ['locale'])
|
||||||
|
inih_cpp = dependency('INIReader', fallback: ['inih', 'INIReader_dep'])
|
||||||
|
libpam = meson.get_compiler('cpp').find_library('pam')
|
||||||
threads = dependency('threads')
|
threads = dependency('threads')
|
||||||
shared_library('pam_howdy', 'main.cc', dependencies: [boost, libpam, inih_cpp, threads], install: true, install_dir: '/lib/security/')
|
|
||||||
|
shared_library(
|
||||||
|
'pam_howdy',
|
||||||
|
'main.cc',
|
||||||
|
dependencies: [
|
||||||
|
boost,
|
||||||
|
libpam,
|
||||||
|
inih_cpp,
|
||||||
|
threads
|
||||||
|
],
|
||||||
|
install: true,
|
||||||
|
install_dir: '/lib/security',
|
||||||
|
name_prefix: ''
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://github.com/benhoyt/inih.git
|
url = https://github.com/benhoyt/inih.git
|
||||||
revision = r52
|
revision = head
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue