mirror of
https://github.com/boltgolt/howdy.git
synced 2024-09-12 09:41:18 +02:00
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
|
||||
|
||||
## 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
|
||||
|
||||
```sh
|
||||
meson setup build -Dinih:with_INIReader=true
|
||||
``` sh
|
||||
meson setup build
|
||||
meson compile -C build
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
sudo mv build/libpam_howdy.so /lib/security/pam_howdy.so
|
||||
``` sh
|
||||
sudo meson install -C build
|
||||
```
|
||||
|
||||
Change PAM config line to:
|
||||
|
||||
```pam
|
||||
auth sufficient pam_howdy.so
|
||||
``` pam
|
||||
auth sufficient pam_howdy.so
|
||||
```
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
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'])
|
||||
inih_cpp = dependency('INIReader', fallback: ['inih', 'INIReader_dep'])
|
||||
libpam = meson.get_compiler('cpp').find_library('pam')
|
||||
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]
|
||||
url = https://github.com/benhoyt/inih.git
|
||||
revision = r52
|
||||
revision = head
|
||||
|
|
Loading…
Reference in a new issue