blob: f760e6c672b696aed25eb83237e26e1e3376385b (
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
|
lib_LTLIBRARIES += libsecret-@SECRET_MAJOR@.la
incdir = $(includedir)/libsecret-@SECRET_MAJOR@/libsecret
libsecret_HEADS = \
libsecret/secret.h \
libsecret/secret-attributes.h \
libsecret/secret-backend.h \
libsecret/secret-collection.h \
libsecret/secret-item.h \
libsecret/secret-password.h \
libsecret/secret-paths.h \
libsecret/secret-prompt.h \
libsecret/secret-retrievable.h \
libsecret/secret-schema.h \
libsecret/secret-schemas.h \
libsecret/secret-service.h \
libsecret/secret-types.h \
libsecret/secret-value.h \
$(NULL)
inc_HEADERS = \
$(libsecret_HEADS) \
libsecret/secret-enum-types.h \
libsecret/secret-version.h \
$(NULL)
libsecret_BUILT_ENUMS = \
libsecret/secret-enum-types.c libsecret/secret-enum-types.h \
$(NULL)
libsecret_BUILT = \
secret-dbus-generated.c secret-dbus-generated.h \
$(libsecret_BUILT_ENUMS) \
libsecret/secret-version.h \
$(NULL)
libsecret_PUBLIC = \
libsecret/secret-attributes.h libsecret/secret-attributes.c \
libsecret/secret-backend.h libsecret/secret-backend.c \
libsecret/secret-collection.h libsecret/secret-collection.c \
libsecret/secret-item.h libsecret/secret-item.c \
libsecret/secret-methods.c \
libsecret/secret-password.h libsecret/secret-password.c \
libsecret/secret-prompt.h libsecret/secret-prompt.c \
libsecret/secret-retrievable.h libsecret/secret-retrievable.c \
libsecret/secret-schema.h libsecret/secret-schema.c \
libsecret/secret-schemas.h libsecret/secret-schemas.c \
libsecret/secret-service.h libsecret/secret-service.c \
libsecret/secret-types.h \
libsecret/secret-value.h libsecret/secret-value.c \
libsecret/secret-paths.h libsecret/secret-paths.c \
$(NULL)
libsecret_PRIVATE = \
libsecret/secret-private.h \
libsecret/secret-session.c \
libsecret/secret-util.c \
$(NULL)
if WITH_GCRYPT
libsecret_PRIVATE += \
libsecret/secret-file-backend.h \
libsecret/secret-file-backend.c \
libsecret/secret-file-collection.h \
libsecret/secret-file-collection.c \
libsecret/secret-file-item.h \
libsecret/secret-file-item.c \
$(NULL)
endif
libsecret_@SECRET_MAJOR@_la_SOURCES = \
$(libsecret_PUBLIC) \
$(libsecret_PRIVATE) \
$(libsecret_BUILT) \
$(NULL)
libsecret_@SECRET_MAJOR@_la_CFLAGS = \
-DSECRET_COMPILATION \
$(LIBGCRYPT_CFLAGS)
libsecret_@SECRET_MAJOR@_la_LDFLAGS = \
-version-info $(SECRET_LT_RELEASE) \
-no-undefined \
-export-symbols-regex '^secret_|^SECRET_|^SECMEM_.*'
libsecret_@SECRET_MAJOR@_la_LIBADD = \
libegg.la \
$(LIBGCRYPT_LIBS) \
$(LIBS)
BUILT_SOURCES += $(libsecret_BUILT)
noinst_LTLIBRARIES += libsecret-testable.la
libsecret_testable_la_SOURCES =
libsecret_testable_la_LIBADD = \
$(libsecret_@SECRET_MAJOR@_la_OBJECTS) \
$(libsecret_@SECRET_MAJOR@_la_LIBADD)
libsecret_testable_la_DEPENDENCIES = \
$(libsecret_@SECRET_MAJOR@_la_OBJECTS) \
$(libsecret_@SECRET_MAJOR@_la_DEPENDENCIES)
libsecret_testable_la_LDFLAGS = -rpath /force/shared
DBUS_XML_DEFINITIONS = \
libsecret/org.freedesktop.Secrets.xml
temp-dbus-generated.c: $(DBUS_XML_DEFINITIONS) Makefile.am
$(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.Secret. \
--generate-c-code temp-dbus-generated --c-namespace SecretGen $<
secret-dbus-generated.c: temp-dbus-generated.c Makefile.am
$(AM_V_GEN) { echo '#define GLIB_DISABLE_DEPRECATION_WARNINGS'; \
sed -e 's/secret_gen_/_secret_gen_/g' -e 's/type-/type/g' \
-e 's/temp-dbus-generated.h/secret-dbus-generated.h/g' \
temp-dbus-generated.c; } > secret-dbus-generated.c
secret-dbus-generated.h: temp-dbus-generated.c Makefile.am
$(AM_V_GEN) sed -e 's/secret_gen_/_secret_gen_/g' -e 's/type-/type/g' \
temp-dbus-generated.h > secret-dbus-generated.h
libsecret/secret-enum-types.h: libsecret/secret-enum-types.h.template $(libsecret_HEADS)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
libsecret/secret-enum-types.c: libsecret/secret-enum-types.c.template $(libsecret_HEADS)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
# ------------------------------------------------------------------
# INTROSPECTION
if HAVE_INTROSPECTION
INTROSPECTION_GIRS += Secret-@SECRET_MAJOR@.gir
Secret-@SECRET_MAJOR@.gir: libsecret-@SECRET_MAJOR@.la
Secret_@SECRET_MAJOR@_gir_NAMESPACE = Secret
Secret_@SECRET_MAJOR@_gir_EXPORT_PACKAGES = libsecret-@SECRET_MAJOR@
Secret_@SECRET_MAJOR@_gir_INCLUDES = GObject-2.0 Gio-2.0
Secret_@SECRET_MAJOR@_gir_LIBS = libsecret-@SECRET_MAJOR@.la
Secret_@SECRET_MAJOR@_gir_CFLAGS = -I$(srcdir) -I$(builddir) -DSECRET_COMPILATION
Secret_@SECRET_MAJOR@_gir_FILES = \
$(libsecret_PUBLIC) \
$(libsecret_BUILT_ENUMS) \
libsecret/secret-version.h \
$(NULL)
Secret_@SECRET_MAJOR@_gir_SCANNERFLAGS = --c-include "libsecret/secret.h"
gir_DATA += Secret-@SECRET_MAJOR@.gir
if ENABLE_VAPIGEN
libsecret-@SECRET_MAJOR@.vapi: Secret-@SECRET_MAJOR@.gir libsecret/Secret-@SECRET_MAJOR@.metadata libsecret-@SECRET_MAJOR@.deps
VAPIGEN_VAPIS += libsecret-@SECRET_MAJOR@.vapi
libsecret_@SECRET_MAJOR@_vapi_DEPS = glib-2.0 gio-2.0
libsecret_@SECRET_MAJOR@_vapi_METADATADIRS = $(srcdir)/libsecret
libsecret_@SECRET_MAJOR@_vapi_FILES = Secret-@SECRET_MAJOR@.gir
libsecret-$(SECRET_MAJOR).deps: Makefile.am
$(AM_V_GEN) echo $(libsecret_@SECRET_MAJOR@_vapi_DEPS) | tr ' ' '\n' > $@
vapi_DATA += \
libsecret-@SECRET_MAJOR@.vapi \
libsecret-@SECRET_MAJOR@.deps
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION
# ------------------------------------------------------------------
# PKG CONFIG
libsecret-$(SECRET_MAJOR).pc: libsecret/libsecret.pc
$(AM_V_GEN) cp libsecret/libsecret.pc libsecret-$(SECRET_MAJOR).pc
pkgconfig_DATA += \
libsecret-$(SECRET_MAJOR).pc \
libsecret/libsecret-unstable.pc
EXTRA_DIST += \
libsecret/secret-enum-types.h.template \
libsecret/secret-enum-types.c.template \
libsecret/org.freedesktop.Secrets.xml \
libsecret/Secret-@SECRET_MAJOR@.metadata \
$(NULL)
CLEANFILES += \
temp-dbus-generated.c \
temp-dbus-generated.h \
$(NULL)
DISTCLEANFILES += \
secret-dbus-generated.c \
secret-dbus-generated.h \
$(NULL)
# ------------------------------------------------------------------
# TESTS
noinst_LTLIBRARIES += libmock_service.la
libmock_service_la_SOURCES = \
libsecret/mock-service.c \
libsecret/mock-service.h \
$(NULL)
libmock_service_la_LDFLAGS = \
-rpath /force/shared
libmock_service_la_LIBADD = \
$(LIBGCRYPT_LIBS)
libsecret_LIBS = \
libsecret-testable.la \
libmock_service.la \
$(NULL)
C_TESTS = \
test-attributes \
test-value \
test-prompt \
test-service \
test-session \
test-paths \
test-methods \
test-password \
test-item \
test-collection \
$(NULL)
test_attributes_SOURCES = libsecret/test-attributes.c
test_attributes_LDADD = $(libsecret_LIBS)
test_collection_SOURCES = libsecret/test-collection.c
test_collection_LDADD = $(libsecret_LIBS)
test_item_SOURCES = libsecret/test-item.c
test_item_LDADD = $(libsecret_LIBS)
test_methods_SOURCES = libsecret/test-methods.c
test_methods_LDADD = $(libsecret_LIBS)
test_password_SOURCES = libsecret/test-password.c
test_password_LDADD = $(libsecret_LIBS)
test_paths_SOURCES = libsecret/test-paths.c
test_paths_LDADD = $(libsecret_LIBS)
test_prompt_SOURCES = libsecret/test-prompt.c
test_prompt_LDADD = $(libsecret_LIBS)
test_service_SOURCES = libsecret/test-service.c
test_service_LDADD = $(libsecret_LIBS)
test_session_SOURCES = libsecret/test-session.c
test_session_LDADD = $(libsecret_LIBS)
test_value_SOURCES = libsecret/test-value.c
test_value_LDADD = $(libsecret_LIBS)
if WITH_GCRYPT
C_TESTS += \
test-file-collection \
$(NULL)
test_file_collection_SOURCES = libsecret/test-file-collection.c
test_file_collection_LDADD = $(libsecret_LIBS)
endif
JS_TESTS = \
libsecret/test-js-lookup.js \
libsecret/test-js-clear.js \
libsecret/test-js-store.js \
$(NULL)
PY_TESTS = \
libsecret/test-py-lookup.py \
libsecret/test-py-clear.py \
libsecret/test-py-store.py \
$(NULL)
check_PROGRAMS += $(C_TESTS)
TESTS += $(C_TESTS) $(PY_TESTS) $(JS_TESTS)
# ------------------------------------------------------------------
# VALA TESTS
if HAVE_VALAC
VALA_V = $(VALA_V_$(V))
VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
VALA_V_0 = @echo " VALAC " $@;
VALA_TESTS_FLAGS = \
--Xcc=-w \
--Xcc=-I$(srcdir) \
--Xcc=-I$(builddir) \
--Xcc=-I$(srcdir)/libsecret \
-X -fPIC \
--vapidir=$(builddir) \
--pkg libsecret-@SECRET_MAJOR@ \
--pkg mock-service-0 \
--pkg gio-2.0
VALA_TESTS_VAPIS = \
libsecret-@SECRET_MAJOR@.vapi \
mock-service-0.vapi
VALA_TESTS = \
test-vala-lang \
test-vala-unstable \
$(NULL)
SUFFIXES = .vala .vala.o
test-vala-lang.vala.o: libsecret/test-vala-lang.vala $(VALA_TESTS_VAPIS)
$(VALA_V) $(VALAC) --compile $(VALA_TESTS_FLAGS) $<
test-vala-unstable.vala.o: libsecret/test-vala-unstable.vala $(VALA_TESTS_VAPIS)
$(VALA_V) $(VALAC) --compile --Xcc=-DSECRET_WITH_UNSTABLE=1 $(VALA_TESTS_FLAGS) $<
test_vala_lang_SOURCES =
test_vala_lang_LDADD = \
test-vala-lang.vala.o \
libsecret-@SECRET_MAJOR@.la \
libmock_service.la
test_vala_unstable_SOURCES =
test_vala_unstable_LDADD = \
test-vala-unstable.vala.o \
libsecret-@SECRET_MAJOR@.la \
libmock_service.la
if HAVE_INTROSPECTION
if ENABLE_VAPIGEN
check_PROGRAMS += $(VALA_TESTS)
TESTS += $(VALA_TESTS)
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION
endif # HAVE_VALAC
EXTRA_DIST += \
libsecret/test-vala-lang.vala \
libsecret/test-vala-unstable.vala
# ------------------------------------------------------------------
# TEST INTROSPECTION
if HAVE_INTROSPECTION
INTROSPECTION_GIRS += MockService-0.gir
MockService-0.gir: libmock_service.la
MockService_0_gir_PACKAGES = gobject-2.0 gio-2.0
MockService_0_gir_EXPORT_PACKAGES = mock-service-0
MockService_0_gir_INCLUDES = GObject-2.0 Gio-2.0
MockService_0_gir_LIBS = libmock_service.la
MockService_0_gir_CFLAGS = -I$(builddir) -I$(srcdir)
MockService_0_gir_FILES = $(libmock_service_la_SOURCES)
MockService_0_gir_SCANNERFLAGS = --c-include "libsecret/mock-service.h"
noinst_DATA += MockService-0.gir MockService-0.typelib
CLEANFILES += MockService-0.gir MockService-0.typelib
if ENABLE_VAPIGEN
mock-service-0.vapi: MockService-0.gir libsecret-@SECRET_MAJOR@.vapi
mock-service-0.deps:
VAPIGEN_VAPIS += mock-service-0.vapi
mock_service_0_vapi_DEPS = gio-2.0 libsecret-@SECRET_MAJOR@
mock_service_0_vapi_METADATADIRS = $(builddir)
mock_service_0_vapi_VAPIDIRS = $(builddir)
mock_service_0_vapi_FILES = MockService-0.gir
noinst_DATA += mock-service-0.vapi
CLEANFILES += mock-service-0.vapi
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION
#--------------------------------------------------------------------
EXTRA_DIST += \
libsecret/mock \
libsecret/mock-service-delete.py \
libsecret/mock-service-empty.py \
libsecret/mock-service-lock.py \
libsecret/mock-service-normal.py \
libsecret/mock-service-only-plain.py \
libsecret/mock-service-prompt.py \
$(JS_TESTS) \
$(PY_TESTS) \
libsecret/fixtures \
$(NULL)
|