[Pkg-privacy-commits] [irssi-plugin-otr] 155/267: Fix: make install now works
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.
commit d23b8514a912d504a80c496cf081db7d211c1ea3
Author: David Goulet <dgoulet at ev0ke.net>
Date: Tue Nov 27 19:13:36 2012 -0500
Fix: make install now works
If $HOME/.irssi/modules is not found, we create it and the make install
will put the shared object there.
Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
Makefile.am | 3 ---
configure.ac | 7 +++++++
src/Makefile.am | 11 ++++++++++-
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index ca421d0..edc6ea3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,6 +3,3 @@ AM_CFLAGS = $(PACKAGE_CFLAGS)
ACLOCAL_AMFLAGS = -I config
SUBDIRS = src
-
-dist_doc_DATA = LICENSE \
- ChangeLog
diff --git a/configure.ac b/configure.ac
index 5212534..7770827 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,6 +69,13 @@ CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing -fstack-protector-all -D_FORTIFY_S
DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/src -I\$(top_builddir)/include"
AC_SUBST(DEFAULT_INCLUDES)
+if test -n "$HOME"; then
+ IRSSI_MODULE_DIR="$HOME/.irssi/modules"
+ AC_SUBST(IRSSI_MODULE_DIR)
+else
+ AC_MSG_ERROR([Unable to find Irssi directory. The HOME variable is unset.])
+fi
+
AC_CONFIG_FILES([
Makefile
src/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 349a0c7..86ca640 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,10 +13,19 @@ IRSSI_INCLUDE = -I$(IRSSI_DIST) \
INCLUDES = -I$(top_srcdir)/src $(IRSSI_INCLUDE)
-lib_LTLIBRARIES = otr.la
+plugindir = $(IRSSI_MODULE_DIR)
+plugin_LTLIBRARIES = otr.la
otr_la_SOURCES = key.c key.h cmd.c cmd.h otr.c otr-ops.c \
utils.h utils.c otr.h module.c irssi_otr.h \
otr-formats.c otr-formats.h
otr_la_LDFLAGS = -avoid-version -module
otr_la_LDFLAGS += $(LIBOTR_LIBS) $(LIBGCRYPT_LIBS)
+
+install-exec-hook:
+ mkdir -p $(plugindir)
+
+install-data-hook:
+ rm $(plugindir)/otr.la
+ mv $(plugindir)/otr.so $(plugindir)/libotr.so
+ chmod 700 $(plugindir)/libotr.so
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git
More information about the Pkg-privacy-commits
mailing list