# This file is in the public domain

configure_file(
    input: 'anastasis-dbconfig',
    output: 'anastasis-dbconfig',
    copy: true,
    install: true,
    install_dir: get_option('bindir'),
)


terms_DATA = ['anastasis-tos-v0.rst', 'anastasis-pp-v0.rst']
install_data(
    sources: terms_DATA,
    install_dir: get_option('datadir') / 'anastasis' / 'terms',
)


#install-exec-local:
#	find locale/ -name "*.po"
#	mkdir -p $(DESTDIR)$(datadir)
#	cp --parents -r $$(find locale/ -name "*.po") $(DESTDIR)$(datadir)

# FIXME: extracted.h should be put into the dist tarball?
extract_h = custom_target(
    'extracted.h',
    output: 'extracted.h',
    command: ['./extract.sh', meson.current_build_dir()],
    install: true,
    install_dir: pkgdatadir,
)

foreach f : [
    'redux.al.json',
    'redux.be.json',
    'redux.ch.json',
    'redux.cz.json',
    'redux.de.json',
    'redux.dk.json',
    'redux.es.json',
    'redux.fr.json',
    'redux.in.json',
    'redux.it.json',
    'redux.jp.json',
    'redux.nl.json',
    'redux.sk.json',
    'redux.us.json',
    'redux.xx.json',
    'redux.countries.json',
    'provider-list.json',
]
    configure_file(
        input: f,
        output: f,
        configuration: cdata,
        install: true,
        install_dir: pkgdatadir,
    )
endforeach
