Debian Codegraph @

contrib/sepgsql/meson.build

raw
1 # Copyright (c) 2022-2025, PostgreSQL Global Development Group
2
3 if not selinux.found()
4 subdir_done()
5 endif
6
7 sepgsql_sources = files(
8 'database.c',
9 'dml.c',
10 'hooks.c',
11 'label.c',
12 'proc.c',
13 'relation.c',
14 'schema.c',
15 'selinux.c',
16 'uavc.c',
17 )
18
19 if host_system == 'windows'
20 sepgsql_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
21 '--NAME', 'sepgsql',
22 '--FILEDESC', 'sepgsql - SELinux integration',])
23 endif
24
25 sepgsql = shared_module('sepgsql',
26 sepgsql_sources,
27 c_pch: pch_postgres_h,
28 kwargs: contrib_mod_args + {
29 'dependencies': [selinux, contrib_mod_args['dependencies']],
30 }
31 )
32 contrib_targets += sepgsql
33
34 contrib_targets += custom_target('sepgsql.sql',
35 input: 'sepgsql.sql.in',
36 output: 'sepgsql.sql',
37 command: [sed, '-e', 's,MODULE_PATHNAME,$libdir/sepgsql,g', '@INPUT@'],
38 capture: true,
39 install: true,
40 install_dir: dir_data / 'contrib',
41 )
42
43 tests += {
44 'name': 'sepgsql',
45 'sd': meson.current_source_dir(),
46 'bd': meson.current_build_dir(),
47 'tap': {
48 'tests': [
49 't/001_sepgsql.pl',
50 ],
51 },
52 }