1# Postasa plugin
2plugindir = $(EOG_PLUGINS_LIBS_DIR)
3appstreamdir = $(datadir)/appdata
4
5AM_CPPFLAGS = \
6	-I$(top_srcdir) 				\
7	$(EOG_CFLAGS) 					\
8	$(WARN_CFLAGS)					\
9	$(POSTASA_CFLAGS) 				\
10	-DEOG_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
11	-DEOG_POSTASA_PLUGIN_DIR=\""$(plugindir)"\"		\
12	-DEOG_POSTASA_DATA_DIR=\""$(EOG_PLUGINS_DATA_DIR)/postasa"\"
13
14
15plugin_LTLIBRARIES = libpostasa.la
16
17BUILT_SOURCES = \
18	eog-postasa-plugin-resources.c
19
20libpostasa_la_SOURCES = \
21	${BUILT_SOURCES}				\
22	eog-postasa-plugin.h				\
23	eog-postasa-plugin.c
24
25libpostasa_la_LDFLAGS = \
26	$(PLUGIN_LIBTOOL_FLAGS)				\
27	$(EOG_LIBS)
28
29libpostasa_la_LIBADD = $(EOG_LIBS)			\
30	$(POSTASA_LIBS)
31
32eog-postasa-plugin-resources.c: eog-postasa-plugin.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/eog-postasa-plugin.gresource.xml)
33	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --internal --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/eog-postasa-plugin.gresource.xml
34
35UI_FILES = postasa-config.ui postasa-uploads.ui
36
37# Plugin Info
38
39plugin_in_files = postasa.plugin.desktop.in
40plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
41# msgfmt 0.19.8 has a bug that adding additional keywords for translation
42# disables the default keywords, so we have to explicitly name them for now.
43$(plugin_DATA): %.plugin: %.plugin.desktop.in $(wildcard $(top_srcdir)/po/*po)
44	$(AM_V_GEN)$(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
45
46appstream_in_files = eog-postasa.appdata.xml.in
47appstream_DATA = $(appstream_in_files:.appdata.xml.in=.metainfo.xml)
48$(appstream_DATA): $(appstream_in_files)
49	$(AM_V_GEN)$(MSGFMT) --xml --language=appdata --template $< -d $(top_srcdir)/po -o $@
50
51
52EXTRA_DIST = \
53	$(plugin_in_files)	\
54	$(appstream_in_files)	\
55	$(UI_FILES)		\
56	eog-postasa-plugin.gresource.xml
57
58CLEANFILES = $(plugin_DATA) $(appstream_DATA) $(BUILT_SOURCES)
59DISTCLEANFILES = $(plugin_DATA) $(appstream_DATA) $(BUILT_SOURCES)
60
61-include $(top_srcdir)/git.mk
62