blob: 4eb005027ea905b3217b1206b56a479a45d92b7a [file] [log] [blame]
Vernon Mauerycbf6f7e2023-06-27 10:22:37 -07001#
2# https://github.com/openbmc/pam-ipmi
3#
4project(
5 'pam_ipmi',
6 'c',
7 version: '0.1',
8 meson_version: '>=0.57.0',
9 default_options: [
10 'werror=true',
11 'warning_level=3',
12 ])
13
14root = meson.current_source_dir()
15
16compiler = meson.get_compiler('c')
17
18fam = target_machine.cpu_family()
19pw_file = ''
20if (fam == 'aarch64' or fam == 'mips64' or fam == 'ppc64' or
21 fam == 'riscv64' or fam == 'sparc64' or fam == 'x86_64')
22 pw_file = 'ipmi_pass_64'
23elif (fam == 'arc' or fam == 'arm' or fam == 'mips' or
24 fam == 'ppc' or fam == 'riscv32' or fam == 'sparc' or
25 fam == 'x86')
26 pw_file = 'ipmi_pass_32'
27else
28 error('unknown target architecture')
29endif
30
31# Dependencies
32crypto = dependency('libcrypto', version : '>=3.0.0')
33pam = compiler.find_library('pam', required: true)
34
35# Subfolders
36subdir('src/pam_ipmicheck')
37subdir('src/pam_ipmisave')
38
39install_data(
40 sources: pw_file,
41 rename: 'ipmi_pass',
42 install_mode: 'rw-------',
43 install_dir: get_option('sysconfdir')
44)
45install_data(
46 sources: 'key_file',
47 install_mode: 'rw-------',
48 install_dir: get_option('sysconfdir')
49)
50