challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

meson.build (3005B)


      1 # This file is in the public domain
      2 
      3 install_data('challenger_db_postgres.conf', install_dir: pkgcfgdir)
      4 
      5 
      6 sqldir = get_option('datadir') / 'challenger' / 'sql'
      7 
      8 procedures_sql = [
      9   'procedures-prelude.sql',
     10   'do_challenge_address.sql',
     11   'do_solve_challenge.sql',
     12   'commit.sql',
     13 ]
     14 
     15 generated_sql = [
     16     ['versioning.sql', ['versioning.sql']],
     17     ['drop.sql', ['drop.sql']],
     18     ['procedures.sql', procedures_sql],
     19     ['challenger-0001.sql', ['challenger-0001.sql']],
     20     ['challenger-0002.sql', ['challenger-0002.sql']],
     21     ['challenger-0003.sql', ['challenger-0003.sql']],
     22     ['challenger-0004.sql', ['challenger-0004.sql']],
     23 ]
     24 
     25 foreach g : generated_sql
     26     custom_target(
     27         'gen-challengerdb-' + g[0],
     28         input: g[1],
     29         output: g[0],
     30         capture: true,
     31         command: ['./amalgamate-sql.sh', '@INPUT@'],
     32         install: true,
     33         install_dir: sqldir,
     34     )
     35 endforeach
     36 
     37 libchallengerdb_SOURCES = [
     38     'get_validation_address.c',
     39     'insert_client.c',
     40     'update_client.c',
     41     'delete_client.c',
     42     'get_client.c',
     43     'get_client_by_uri.c',
     44     'create_tables.c',
     45     'drop_tables.c',
     46     'gc.c',
     47     'get_token.c',
     48     'do_insert_token.c',
     49     'do_insert_validation.c',
     50     'preflight.c',
     51     'pg.c',
     52     'update_validation.c',
     53     'do_challenge_address.c',
     54     'do_solve_challenge.c',
     55     'get_validation.c',
     56     'get_validation_pkce.c',
     57 ]
     58 libchallengerdb = library(
     59     'challengerdb',
     60     libchallengerdb_SOURCES,
     61     soversion: solibversions['libchallengerdb']['soversion'],
     62     version: solibversions['libchallengerdb']['soversion'],
     63     install_rpath: rpath_option,
     64     dependencies: [
     65         libchallengerutil_dep,
     66         talerpq_dep,
     67         gnunetutil_dep,
     68         gnunetpq_dep,
     69         pq_dep,
     70     ],
     71     include_directories: [incdir, configuration_inc],
     72     install: true,
     73     install_dir: get_option('libdir'),
     74 )
     75 
     76 libchallengerdb_dep = declare_dependency(link_with: libchallengerdb)
     77 pkg.generate(
     78     libchallengerdb,
     79     url: 'https://taler.net',
     80     description: 'GNU Taler challenger DB library',
     81 )
     82 
     83 executable(
     84     'challenger-dbinit',
     85     ['challenger-dbinit.c'],
     86     dependencies: [
     87         libchallengerutil_dep,
     88         libchallengerdb_dep,
     89         gnunetutil_dep,
     90         talerutil_dep,
     91     ],
     92     include_directories: [incdir, configuration_inc],
     93     install: true,
     94 )
     95 
     96 configure_file(
     97     input: 'test_challenger_db_postgres.conf',
     98     output: 'test_challenger_db_postgres.conf',
     99     copy: true,
    100 )
    101 
    102 test_challenger_db_postgres = executable(
    103     'test_challenger_db-postgres',
    104     ['test_challenger_db.c'],
    105     dependencies: [
    106         gnunetutil_dep,
    107         libchallengerutil_dep,
    108         libchallengerdb_dep,
    109         gnunetpq_dep,
    110         talerutil_dep,
    111     ],
    112     include_directories: [incdir, configuration_inc],
    113     build_by_default: false,
    114     install: false,
    115 )
    116 test(
    117     'test_challenger_db-postgres',
    118     test_challenger_db_postgres,
    119     workdir: meson.current_build_dir(),
    120     suite: ['challengerdb'],
    121     is_parallel: false,
    122 )