blob: 8d1c582c2f9c6cc0f38052e9bda68b60eceb2c39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include
plugindir = $(libdir)/taler
pkgcfgdir = $(prefix)/share/taler/config.d/
pkgcfg_DATA = \
merchantdb-postgres.conf
sqldir = $(prefix)/share/taler/sql/merchant/
sqlinputs = \
pg_*.sql \
procedures.sql.in
sql_DATA = \
versioning.sql \
procedures.sql \
merchant-0001.sql \
merchant-0002.sql \
merchant-0003.sql \
merchant-0004.sql \
merchant-0005.sql \
merchant-0006.sql \
drop.sql
BUILT_SOURCES = \
procedures.sql
procedures.sql: procedures.sql.in pg_*.sql
chmod +w $@ || true
gcc -E -P -undef - < procedures.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
chmod ugo-w $@
if HAVE_POSTGRESQL
if HAVE_GNUNETPQ
plugin_LTLIBRARIES = \
libtaler_plugin_merchantdb_postgres.la
endif
endif
if USE_COVERAGE
AM_CFLAGS = --coverage -O0
XLIB = -lgcov
endif
lib_LTLIBRARIES = \
libtalermerchantdb.la
libtalermerchantdb_la_SOURCES = \
merchantdb_plugin.c \
merchantdb_helper.c
libtalermerchantdb_la_LIBADD = \
$(LIBGCRYPT_LIBS) \
-ltalerutil \
-ltalerpq \
-lgnunetutil \
-lltdl \
$(XLIB)
libtalermerchantdb_la_LDFLAGS = \
$(POSTGRESQL_LDFLAGS) \
-version-info 3:1:1 \
-no-undefined
libtaler_plugin_merchantdb_postgres_la_SOURCES = \
pg_update_wirewatch_progress.h pg_update_wirewatch_progress.c \
pg_select_wirewatch_accounts.h pg_select_wirewatch_accounts.c \
pg_insert_account.h pg_insert_account.c \
pg_update_account.h pg_update_account.c \
pg_insert_deposit_to_transfer.h pg_insert_deposit_to_transfer.c \
pg_increase_refund.h pg_increase_refund.c \
pg_insert_transfer.h pg_insert_transfer.c \
pg_insert_transfer_details.h pg_insert_transfer_details.c \
pg_store_wire_fee_by_exchange.h pg_store_wire_fee_by_exchange.c \
pg_select_open_transfers.h pg_select_open_transfers.c \
pg_lookup_categories.h pg_lookup_categories.c \
pg_select_category.h pg_select_category.c \
pg_update_category.h pg_update_category.c \
pg_insert_category.h pg_insert_category.c \
pg_delete_category.h pg_delete_category.c \
pg_lookup_instances.h pg_lookup_instances.c \
pg_lookup_transfers.h pg_lookup_transfers.c \
pg_update_transfer_status.h pg_update_transfer_status.c \
pg_delete_exchange_accounts.h pg_delete_exchange_accounts.c \
pg_select_accounts_by_exchange.h pg_select_accounts_by_exchange.c \
pg_set_transfer_status_to_confirmed.h pg_set_transfer_status_to_confirmed.c \
pg_insert_exchange_account.h pg_insert_exchange_account.c \
pg_insert_login_token.h pg_insert_login_token.c \
pg_delete_login_token.h pg_delete_login_token.c \
pg_select_login_token.h pg_select_login_token.c \
pg_select_account_by_uri.h pg_select_account_by_uri.c \
pg_lookup_instance_auth.h pg_lookup_instance_auth.c \
pg_lookup_pending_deposits.h pg_lookup_pending_deposits.c \
pg_insert_instance.h pg_insert_instance.c \
pg_account_kyc_set_status.h pg_account_kyc_set_status.c \
pg_account_kyc_get_status.h pg_account_kyc_get_status.c \
pg_delete_instance_private_key.h pg_delete_instance_private_key.c \
pg_purge_instance.h pg_purge_instance.c \
pg_update_instance.h pg_update_instance.c \
pg_update_deposit_confirmation_status.h pg_update_deposit_confirmation_status.c \
pg_update_instance_auth.h pg_update_instance_auth.c \
pg_inactivate_account.h pg_inactivate_account.c \
pg_activate_account.h pg_activate_account.c \
pg_insert_otp.h pg_insert_otp.c \
pg_delete_otp.h pg_delete_otp.c \
pg_update_otp.h pg_update_otp.c \
pg_select_otp.h pg_select_otp.c \
pg_select_otp_serial.h pg_select_otp_serial.c \
pg_lookup_otp_devices.h pg_lookup_otp_devices.c \
pg_select_account.h pg_select_account.c \
pg_select_accounts.h pg_select_accounts.c \
pg_delete_template.h pg_delete_template.c \
pg_insert_template.h pg_insert_template.c \
pg_update_template.h pg_update_template.c \
pg_lookup_templates.h pg_lookup_templates.c \
pg_lookup_template.h pg_lookup_template.c \
pg_lookup_all_products.h pg_lookup_all_products.c \
pg_lookup_products.h pg_lookup_products.c \
pg_lookup_product.h pg_lookup_product.c \
pg_delete_product.h pg_delete_product.c \
pg_insert_product.h pg_insert_product.c \
pg_update_product.h pg_update_product.c \
pg_lock_product.h pg_lock_product.c \
pg_insert_exchange_keys.h pg_insert_exchange_keys.c \
pg_select_exchange_keys.h pg_select_exchange_keys.c \
pg_expire_locks.h pg_expire_locks.c \
pg_delete_order.h pg_delete_order.c \
pg_lookup_order.h pg_lookup_order.c \
pg_lookup_order_summary.h pg_lookup_order_summary.c \
pg_lookup_orders.h pg_lookup_orders.c \
pg_insert_order.h pg_insert_order.c \
pg_unlock_inventory.h pg_unlock_inventory.c \
pg_insert_order_lock.h pg_insert_order_lock.c \
pg_lookup_contract_terms3.h pg_lookup_contract_terms3.c \
pg_lookup_contract_terms2.h pg_lookup_contract_terms2.c \
pg_lookup_contract_terms.h pg_lookup_contract_terms.c \
pg_insert_contract_terms.h pg_insert_contract_terms.c \
pg_update_contract_terms.h pg_update_contract_terms.c \
pg_delete_contract_terms.h pg_delete_contract_terms.c \
pg_lookup_deposits.h pg_lookup_deposits.c \
pg_insert_exchange_signkey.h pg_insert_exchange_signkey.c \
pg_insert_deposit.h pg_insert_deposit.c \
pg_insert_deposit_confirmation.h pg_insert_deposit_confirmation.c \
pg_lookup_refunds.h pg_lookup_refunds.c \
pg_mark_contract_paid.h pg_mark_contract_paid.c \
pg_refund_coin.h pg_refund_coin.c \
pg_lookup_order_status.h pg_lookup_order_status.c \
pg_lookup_order_status_by_serial.h pg_lookup_order_status_by_serial.c \
pg_lookup_deposits_by_order.h pg_lookup_deposits_by_order.c \
pg_lookup_transfer_details_by_order.h pg_lookup_transfer_details_by_order.c \
pg_mark_order_wired.h pg_mark_order_wired.c \
pg_lookup_refunds_detailed.h pg_lookup_refunds_detailed.c \
pg_insert_refund_proof.h pg_insert_refund_proof.c \
pg_lookup_refund_proof.h pg_lookup_refund_proof.c \
pg_lookup_order_by_fulfillment.h pg_lookup_order_by_fulfillment.c \
pg_delete_transfer.h pg_delete_transfer.c \
pg_check_transfer_exists.h pg_check_transfer_exists.c \
pg_lookup_account.h pg_lookup_account.c \
pg_lookup_wire_fee.h pg_lookup_wire_fee.c \
pg_lookup_deposits_by_contract_and_coin.h pg_lookup_deposits_by_contract_and_coin.c \
pg_lookup_transfer.h pg_lookup_transfer.c \
pg_lookup_transfer_summary.h pg_lookup_transfer_summary.c \
pg_lookup_transfer_details.h pg_lookup_transfer_details.c \
pg_lookup_webhooks.h pg_lookup_webhooks.c \
pg_lookup_webhook.h pg_lookup_webhook.c \
pg_delete_webhook.h pg_delete_webhook.c \
pg_insert_webhook.h pg_insert_webhook.c \
pg_update_webhook.h pg_update_webhook.c \
pg_lookup_webhook_by_event.h pg_lookup_webhook_by_event.c \
pg_delete_pending_webhook.h pg_delete_pending_webhook.c \
pg_insert_pending_webhook.h pg_insert_pending_webhook.c \
pg_update_pending_webhook.h pg_update_pending_webhook.c \
pg_lookup_pending_webhooks.h pg_lookup_pending_webhooks.c \
pg_insert_token_family.h pg_insert_token_family.c \
pg_lookup_token_family.h pg_lookup_token_family.c \
pg_lookup_token_families.h pg_lookup_token_families.c \
pg_delete_token_family.h pg_delete_token_family.c \
pg_update_token_family.h pg_update_token_family.c \
pg_insert_token_family_key.h pg_insert_token_family_key.c \
pg_lookup_token_family_key.h pg_lookup_token_family_key.c \
plugin_merchantdb_postgres.c \
pg_helper.h pg_helper.c
libtaler_plugin_merchantdb_postgres_la_LIBADD = \
$(LTLIBINTL)
libtaler_plugin_merchantdb_postgres_la_LDFLAGS = \
$(TALER_PLUGIN_LDFLAGS) \
-ltalerexchange \
-ltalerpq \
-ltalerutil \
-ltalerjson \
-ltalermhd \
-lgnunetpq \
-lgnunetjson \
-lpq \
-lgnunetutil \
$(XLIB)
if HAVE_POSTGRESQL
if HAVE_GNUNETPQ
check_PROGRAMS = \
test-merchantdb-postgres
endif
endif
test_merchantdb_postgres_SOURCES = \
test_merchantdb.c
test_merchantdb_postgres_LDFLAGS = \
-ltalerutil \
-ltalerjson \
-lgnunetjson \
-lgnunetutil \
-ljansson \
$(XLIB)
test_merchantdb_postgres_LDADD = \
$(top_builddir)/src/backenddb/libtalermerchantdb.la
TESTS = \
test-merchantdb-postgres
EXTRA_DIST = \
test-merchantdb-postgres.conf \
merchantdb-postgres.conf \
$(sqlinputs) \
$(sql_DATA)
|