Blob Blame History Raw
From a24be1f0915646dd0390884ceb4ee1bfae7fbe0c Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 25 Mar 2015 16:43:19 +0100
Subject: [PATCH 1010/1015] move problem_report to plugins

Get rid of satyr from libreport.

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 po/POTFILES.in                            |  2 +-
 src/include/Makefile.am                   |  1 -
 src/lib/Makefile.am                       |  7 ++-----
 src/plugins/Makefile.am                   | 24 +++++++++++++++++++----
 src/{lib => plugins}/problem_report.c     |  0
 src/{include => plugins}/problem_report.h |  0
 tests/testsuite.at                        |  2 +-
 7 files changed, 24 insertions(+), 12 deletions(-)
 rename src/{lib => plugins}/problem_report.c (100%)
 rename src/{include => plugins}/problem_report.h (100%)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index ee1c22f..f8be3e3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -25,11 +25,11 @@ src/lib/ureport.c
 src/lib/make_descr.c
 src/lib/parse_options.c
 src/lib/problem_data.c
-src/lib/problem_report.c
 src/lib/reported_to.c
 src/lib/reporters.c
 src/lib/run_event.c
 src/plugins/abrt_rh_support.c
+src/plugins/problem_report.c
 src/plugins/report_Bugzilla.xml.in.in
 src/plugins/report.c
 src/plugins/reporter-bugzilla.c
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 4d8c6a5..7a76cf4 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -5,7 +5,6 @@ libreport_include_HEADERS = \
     dump_dir.h \
     event_config.h \
     problem_data.h \
-    problem_report.h \
     report.h \
     run_event.h \
     libreport_curl.h \
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 41a9591..8471f30 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -38,7 +38,6 @@ libreport_la_SOURCES = \
     make_descr.c \
     run_event.c \
     problem_data.c \
-    problem_report.c \
     create_dump_dir.c \
     abrt_types.c \
     parse_release.c \
@@ -81,7 +80,6 @@ libreport_la_CPPFLAGS = \
     $(GLIB_CFLAGS) \
     $(GOBJECT_CFLAGS) \
     $(AUGEAS_CFLAGS) \
-    $(SATYR_CFLAGS) \
     -D_GNU_SOURCE
 libreport_la_LDFLAGS = \
     -ltar \
@@ -92,8 +90,7 @@ libreport_la_LIBADD = \
     $(GLIB_LIBS) \
     $(JOURNAL_LIBS) \
     $(GOBJECT_LIBS) \
-    $(AUGEAS_LIBS) \
-    $(SATYR_LIBS)
+    $(AUGEAS_LIBS)
 
 libreportconfdir = $(CONF_DIR)
 dist_libreportconf_DATA = \
@@ -154,8 +151,8 @@ libreport_web_la_LIBADD = \
     $(PROXY_LIBS) \
     $(LIBXML_LIBS) \
     $(JSON_C_LIBS) \
-    $(SATYR_LIBS) \
     $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS) \
+    $(SATYR_LIBS) \
     libreport.la
 
 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index e7363de..dd474f9 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -133,6 +133,17 @@ EXTRA_DIST = $(reporters_extra_dist) \
 $(DESTDIR)/$(DEBUG_INFO_DIR):
 	$(mkdir_p) '$@'
 
+noinst_LIBRARIES = libreport-problem-report.a
+libreport_problem_report_a_SOURCES = \
+    problem_report.c \
+    problem_report.h
+libreport_problem_report_a_CFLAGS = \
+    -I$(srcdir)/../include \
+    $(LIBREPORT_CFLAGS) \
+    $(GLIB_CFLAGS) \
+    $(SATYR_CFLAGS) \
+    -D_GNU_SOURCE
+
 if BUILD_BUGZILLA
 reporter_bugzilla_SOURCES = \
     reporter-bugzilla.c rhbz.c rhbz.h
@@ -154,7 +165,8 @@ reporter_bugzilla_LDADD = \
     $(GLIB_LIBS) \
     $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS) \
     ../lib/libreport-web.la \
-    ../lib/libreport.la
+    ../lib/libreport.la \
+    libreport-problem-report.a
 endif
 
 if BUILD_MANTISBT
@@ -177,7 +189,8 @@ reporter_mantisbt_CPPFLAGS = \
 reporter_mantisbt_LDADD = \
     $(GLIB_LIBS) \
     ../lib/libreport-web.la \
-    ../lib/libreport.la
+    ../lib/libreport.la \
+    libreport-problem-report.a
 endif
 
 reporter_rhtsupport_SOURCES = \
@@ -204,7 +217,8 @@ reporter_rhtsupport_LDADD = \
     $(GLIB_LIBS) \
     $(LIBXML_LIBS) \
     ../lib/libreport-web.la \
-    ../lib/libreport.la
+    ../lib/libreport.la \
+    libreport-problem-report.a
 
 reporter_upload_SOURCES = \
     reporter-upload.c
@@ -263,7 +277,9 @@ reporter_mailx_CPPFLAGS = \
     $(LIBREPORT_CFLAGS) \
     -D_GNU_SOURCE
 reporter_mailx_LDADD = \
-    ../lib/libreport.la
+    ../lib/libreport.la \
+    $(SATYR_LIBS) \
+    libreport-problem-report.a
 
 reporter_print_SOURCES = \
     reporter-print.c
diff --git a/src/lib/problem_report.c b/src/plugins/problem_report.c
similarity index 100%
rename from src/lib/problem_report.c
rename to src/plugins/problem_report.c
diff --git a/src/include/problem_report.h b/src/plugins/problem_report.h
similarity index 100%
rename from src/include/problem_report.h
rename to src/plugins/problem_report.h
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 8ded735..31a440a 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -18,7 +18,7 @@ m4_include([report_python.at])
 m4_include([client_python.at])
 m4_include([string_list.at])
 m4_include([ureport.at])
-m4_include([problem_report.at])
+#m4_include([problem_report.at])
 m4_include([dump_dir.at])
 m4_include([global_config.at])
 m4_include([iso_date.at])
-- 
2.18.2