donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

meson.build (3102B)


      1 # This build file is in the public domain
      2 
      3 install_data('donaudb.conf', 'donaudb-postgres.conf', install_dir: pkgcfgdir)
      4 
      5 sqldir = get_option('datadir') / 'donau' / 'sql'
      6 
      7 # FIXME possibly provide this output in the tgz through dist script
      8 run_command('make', '-f', 'Makefile.sql', 'all', check: true)
      9 
     10 sqlfiles = [
     11     'drop.sql',
     12     'donau-0001.sql',
     13     'donau-0002.sql',
     14     'procedures.sql',
     15     'versioning.sql',
     16 ]
     17 
     18 install_data(sources: sqlfiles, install_dir: sqldir)
     19 
     20 # This makes meson copy the files into the build directory for testing
     21 foreach f : sqlfiles
     22     configure_file(input: f, output: f, copy: true)
     23 endforeach
     24 
     25 test_idem = configure_file(
     26     input: 'test_idempotency.sh',
     27     output: 'test_idempotency.sh',
     28     copy: true,
     29 )
     30 
     31 test(
     32     'test_idempotency.sh',
     33     test_idem,
     34     workdir: meson.current_build_dir(),
     35     suite: ['donaudb', 'installcheck'],
     36 )
     37 
     38 
     39 libdonaudb = library(
     40     'donaudb',
     41     [
     42         'plugin_donaudb_postgres.c',
     43         'preflight.c',
     44         'commit.c',
     45         'drop_tables.c',
     46         'create_tables.c',
     47         'event_listen.c',
     48         'event_listen_cancel.c',
     49         'event_notify.c',
     50         'start.c',
     51         'rollback.c',
     52         'start_read_committed.c',
     53         'start_read_only.c',
     54         'insert_signing_key.c',
     55         'lookup_signing_key.c',
     56         'iterate_active_signing_keys.c',
     57         'insert_donation_unit.c',
     58         'iterate_donation_units.c',
     59         'iterate_submitted_receipts.c',
     60         'get_history.c',
     61         'get_charities.c',
     62         'insert_charity.c',
     63         'update_charity.c',
     64         'do_charity_delete.c',
     65         'insert_history_entry.c',
     66         'lookup_charity.c',
     67         'lookup_issued_receipts.c',
     68         'lookup_donation_unit_amount.c',
     69         'insert_issued_receipt.c',
     70         'insert_submitted_receipts.c',
     71     ],
     72     soversion: solibversions['libdonaudb']['soversion'],
     73     version: solibversions['libdonaudb']['soversion'],
     74     install_rpath: rpath_option,
     75     dependencies: [
     76         libdonaupq_dep,
     77         libdonauutil_dep,
     78         talerpq_dep,
     79         talerutil_dep,
     80         gnunetpq_dep,
     81         gnunetutil_dep,
     82         pq_dep,
     83     ],
     84     include_directories: [incdir, configuration_inc],
     85     install: true,
     86     install_dir: get_option('libdir'),
     87 )
     88 
     89 libdonaudb_dep = declare_dependency(link_with: libdonaudb)
     90 pkg.generate(
     91     libdonaudb,
     92     url: 'https://taler.net',
     93     description: 'GNU Taler donau DB library',
     94 )
     95 
     96 
     97 test_donaudb = executable(
     98     'test-donaudb-postgres',
     99     ['test_donaudb.c'],
    100     install_rpath: rpath_option,
    101     dependencies: [
    102         libdonauutil_dep,
    103         libdonaudb_dep,
    104         talerutil_dep,
    105         talerjson_dep,
    106         talerpq_dep,
    107         gnunetutil_dep,
    108         gnunetjson_dep,
    109         pq_dep,
    110         json_dep,
    111     ],
    112     include_directories: [incdir, configuration_inc],
    113     install: false,
    114 )
    115 
    116 test(
    117     'test_donaudb',
    118     test_donaudb,
    119     workdir: meson.current_build_dir(),
    120     suite: ['donaudb'],
    121     is_parallel: false,
    122 )
    123 
    124 configure_file(
    125     input: 'test-donau-db-postgres.conf',
    126     output: 'test-donau-db-postgres.conf',
    127     copy: true,
    128 )