Vernon Mauery | cbf6f7e | 2023-06-27 10:22:37 -0700 | [diff] [blame] | 1 | # |
| 2 | # https://github.com/openbmc/pam-ipmi |
| 3 | # |
| 4 | project( |
| 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 | |
| 14 | root = meson.current_source_dir() |
| 15 | |
| 16 | compiler = meson.get_compiler('c') |
| 17 | |
| 18 | fam = target_machine.cpu_family() |
| 19 | pw_file = '' |
| 20 | if (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' |
| 23 | elif (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' |
| 27 | else |
| 28 | error('unknown target architecture') |
| 29 | endif |
| 30 | |
| 31 | # Dependencies |
| 32 | crypto = dependency('libcrypto', version : '>=3.0.0') |
| 33 | pam = compiler.find_library('pam', required: true) |
| 34 | |
| 35 | # Subfolders |
| 36 | subdir('src/pam_ipmicheck') |
| 37 | subdir('src/pam_ipmisave') |
| 38 | |
| 39 | install_data( |
| 40 | sources: pw_file, |
| 41 | rename: 'ipmi_pass', |
| 42 | install_mode: 'rw-------', |
| 43 | install_dir: get_option('sysconfdir') |
| 44 | ) |
| 45 | install_data( |
| 46 | sources: 'key_file', |
| 47 | install_mode: 'rw-------', |
| 48 | install_dir: get_option('sysconfdir') |
| 49 | ) |
| 50 | |