sync

Backup service to store encrypted wallet databases (experimental)
Log | Files | Refs | Submodules | README | LICENSE

meson.build (2570B)


      1 # This build file is in the public domain
      2 install_data('sync_db_postgres.conf', install_dir: pkgcfgdir)
      3 
      4 sqldir = get_option('datadir') / 'sync' / 'sql'
      5 
      6 # FIXME possibly provide this output in the tgz through dist script
      7 run_command('make', '-f', 'Makefile.sql', 'all', check: true)
      8 
      9 sqlfiles = ['versioning.sql', 'procedures.sql', 'sync-0001.sql', 'drop.sql']
     10 
     11 install_data(sources: sqlfiles, install_dir: sqldir)
     12 
     13 # This makes meson copy the files into the build directory for testing
     14 foreach f : sqlfiles
     15     configure_file(input: f, output: f, copy: true)
     16 endforeach
     17 
     18 
     19 libsyncdb_SOURCES = [
     20     'syncdb_pg.c',
     21     'syncdb_drop_tables.c',
     22     'syncdb_create_tables.c',
     23     'syncdb_preflight.c',
     24     'syncdb_gc.c',
     25     'syncdb_store_payment_TR.c',
     26     'syncdb_lookup_pending_payments_by_account_TR.c',
     27     'syncdb_store_backup_TR.c',
     28     'syncdb_update_backup_TR.c',
     29     'syncdb_lookup_account_TR.c',
     30     'syncdb_lookup_backup_TR.c',
     31     'syncdb_increment_lifetime_TR.c',
     32 ]
     33 libsyncdb = library(
     34     'syncdb',
     35     libsyncdb_SOURCES,
     36     soversion: solibversions['libsyncdb']['soversion'],
     37     version: solibversions['libsyncdb']['soversion'],
     38     install_rpath: rpath_option,
     39     dependencies: [
     40         libsyncutil_dep,
     41         talerpq_dep,
     42         talerutil_dep,
     43         gnunetutil_dep,
     44         gnunetpq_dep,
     45         pq_dep,
     46     ],
     47     include_directories: [incdir, configuration_inc],
     48     install: true,
     49     install_dir: get_option('libdir'),
     50 )
     51 
     52 libsyncdb_dep = declare_dependency(link_with: libsyncdb)
     53 pkg.generate(
     54     libsyncdb,
     55     url: 'https://taler.net',
     56     description: 'GNU Taler sync DB library',
     57 )
     58 
     59 executable(
     60     'sync-dbinit',
     61     ['sync-dbinit.c'],
     62     dependencies: [
     63         libsyncutil_dep,
     64         talerutil_dep,
     65         libsyncdb_dep,
     66         talerpq_dep,
     67         gnunetutil_dep,
     68         gnunetpq_dep,
     69         pq_dep,
     70         gcrypt_dep,
     71     ],
     72     include_directories: [incdir, configuration_inc],
     73     install: true,
     74 )
     75 
     76 
     77 test_syncdb_postgres = executable(
     78     'test-syncdb-postgres',
     79     ['test_sync_db.c'],
     80     install_rpath: rpath_option,
     81     dependencies: [
     82         libsyncdb_dep,
     83         libsyncutil_dep,
     84         talerutil_dep,
     85         gnunetutil_dep,
     86         gnunetpq_dep,
     87     ],
     88     include_directories: [incdir, configuration_inc],
     89     install: false,
     90 )
     91 test(
     92     'test-syncdb-postgres',
     93     test_syncdb_postgres,
     94     workdir: meson.current_build_dir(),
     95     suite: ['syncdb', 'installcheck'],
     96     is_parallel: false,
     97 )
     98 configure_file(
     99     input: 'test_sync_db_postgres.conf',
    100     output: 'test_sync_db_postgres.conf',
    101     copy: true,
    102 )