diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-20 17:29:58 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-20 17:29:58 +0200 |
commit | b21a17491ab4eab43b871da791a8a8ef84489be1 (patch) | |
tree | a26607739338f0ed6eacf20a2888f3f72d4cffb0 | |
parent | f8338de268b159bd90d0753f4e21697d83a87cc3 (diff) | |
download | abrt-b21a17491ab4eab43b871da791a8a8ef84489be1.tar.gz abrt-b21a17491ab4eab43b871da791a8a8ef84489be1.tar.xz abrt-b21a17491ab4eab43b871da791a8a8ef84489be1.zip |
Fix build system for the case where configure was run with non-default prefix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | lib/Plugins/Makefile.am | 9 | ||||
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 2 | ||||
-rw-r--r-- | src/Gui/Makefile.am | 7 |
4 files changed, 15 insertions, 5 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 012b8f03..53a42fe4 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1 +1 @@ -SUBDIRS = Utils MiddleWare Plugins CommLayer Python
\ No newline at end of file +SUBDIRS = Utils MiddleWare Plugins CommLayer Python diff --git a/lib/Plugins/Makefile.am b/lib/Plugins/Makefile.am index 53a5a8d9..a67757f7 100644 --- a/lib/Plugins/Makefile.am +++ b/lib/Plugins/Makefile.am @@ -12,7 +12,7 @@ pluginslib_LTLIBRARIES = libCCpp.la \ libBugzilla.la \ libPython.la \ libFileTransfer.la - + pluginsconfdir=$(PLUGINS_CONF_DIR) dist_pluginsconf_DATA = CCpp.conf Mailx.conf SQLite3.conf Logger.conf KerneloopsScanner.conf KerneloopsReporter.conf Bugzilla.conf FileTransfer.conf @@ -22,6 +22,11 @@ man_MANS = abrt-FileTransfer.7 abrt-Bugzilla.7 abrt-KerneloopsReporter.7\ EXTRA_DIST = $(man_MANS) +install-data-hook: + sed 's: = /var/: = $(localstatedir)/:g' -i \ + $(DESTDIR)$(sysconfdir)/abrt/plugins/SQLite3.conf \ + $(DESTDIR)$(sysconfdir)/abrt/plugins/Logger.conf + # CCpp libCCpp_la_SOURCES = CCpp.cpp CCpp.h PluginSettings.h libCCpp_la_LDFLAGS = -avoid-version @@ -52,7 +57,7 @@ libMailx_la_LDFLAGS = -avoid-version libSQLite3_la_SOURCES = SQLite3.cpp SQLite3.h PluginSettings.h libSQLite3_la_LDFLAGS = -avoid-version libSQLite3_la_LIBADD = $(SQLITE3_LIBS) -libSQLite3_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils $(SQLITE3_CFLAGS) +libSQLite3_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils $(SQLITE3_CFLAGS) -DLOCALSTATEDIR='"$(localstatedir)"' # Logger libLogger_la_SOURCES = Logger.cpp Logger.h PluginSettings.h diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 13a0ed65..66c654ef 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -31,7 +31,7 @@ #define SQLITE3_MASTER_TABLE "sqlite_master" CSQLite3::CSQLite3() : - m_sDBPath("/var/cache/abrt/abrt-db"), + m_sDBPath(LOCALSTATEDIR "/cache/abrt/abrt-db"), m_pDB(NULL) {} diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am index e7971731..9112cf83 100644 --- a/src/Gui/Makefile.am +++ b/src/Gui/Makefile.am @@ -14,4 +14,9 @@ EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) abrt-gui abrt.desktop pkgdata_PYTHON = $(PYTHON_FILES) pkgdata_DATA = $(GLADE_FILES) -CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc))
\ No newline at end of file +CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc)) + +install-exec-hook: + for b in $(bin_SCRIPTS); do \ + sed 's:/usr/share:$(datadir):g' -i $(DESTDIR)$(bindir)/$$b || exit $$?; \ + done |