[vhffs-dev] [1439] Autoolized modobot

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1439
Author:   beuss
Date:     2009-06-15 09:14:26 +0200 (Mon, 15 Jun 2009)

Log Message:
-----------
Autoolized modobot

Modified Paths:
--------------
    trunk/Makefile.am
    trunk/configure.ac

Added Paths:
-----------
    trunk/vhffs-irc/Makefile.am


Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2009-06-14 14:15:44 UTC (rev 1438)
+++ trunk/Makefile.am	2009-06-15 07:14:26 UTC (rev 1439)
@@ -9,7 +9,7 @@
 endif
 
 SUBDIRS = $(SUB_VHFFS_FS) vhffs-api vhffs-packages vhffs-backend vhffs-doc vhffs-compat vhffs-intl vhffs-jabber vhffs-listengine \
-	vhffs-panel vhffs-public vhffs-robots vhffs-shells vhffs-themes vhffs-tools
+	vhffs-panel vhffs-public vhffs-robots vhffs-shells vhffs-themes vhffs-tools vhffs-irc
 
 EXTRA_DIST = config.rpath m4/ChangeLog vhffs-forum vhffs-irc
 

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2009-06-14 14:15:44 UTC (rev 1438)
+++ trunk/configure.ac	2009-06-15 07:14:26 UTC (rev 1439)
@@ -136,6 +136,16 @@
 )
 AC_SUBST(LEDIR)
 
+dnl IRC bot
+AC_ARG_WITH(irc-bot-path,
+	AC_HELP_STRING([--with-irc-bot-path=path],
+		[Complete path for moderation bot (/usr/lib/vhffs/irc)]),
+	IRCDIR=$withval,
+	IRCDIR=${prefix}/lib/vhffs/irc
+)
+AC_SUBST(IRCDIR)
+
+
 dnl documentation
 AC_ARG_WITH(doc-path,
 	AC_HELP_STRING([--with-doc-path=path],
@@ -247,6 +257,15 @@
 
 AM_CONDITIONAL(INSTALL_VHFFS_FS, test "$enable_vhffs_fs" = yes)
 
+dnl Install IRC moderation bot or not ?
+AC_ARG_ENABLE(irc,
+    AC_HELP_STRING([--enable-irc],
+        [Enable IRC moderation bot 
+            [default=no]]),
+        enable_irc=$enableval, enable_irc=no)
+
+AM_CONDITIONAL(INSTALL_IRC, test "$enable_irc" = yes)
+
 # -- Starting system checks
 AC_CHECK_HEADERS([stdlib.h string.h sys/time.h syslog.h unistd.h])
 
@@ -293,7 +312,7 @@
 	vhffs-jabber/Makefile
 	vhffs-listengine/Makefile
 	vhffs-listengine/src/Makefile
-    vhffs-packages/Makefile
+	vhffs-packages/Makefile
 	vhffs-panel/Makefile
 	vhffs-panel/templates/Makefile
 	vhffs-public/Makefile
@@ -303,7 +322,8 @@
 	vhffs-themes/Makefile
 	vhffs-tools/Makefile
 	vhffs-tools/src/Makefile
-    vhffs-tools/mans/Makefile
+	vhffs-irc/Makefile
+	vhffs-tools/mans/Makefile
 	],
 )
 

Added: trunk/vhffs-irc/Makefile.am
===================================================================
--- trunk/vhffs-irc/Makefile.am	                        (rev 0)
+++ trunk/vhffs-irc/Makefile.am	2009-06-15 07:14:26 UTC (rev 1439)
@@ -0,0 +1,19 @@
+if INSTALL_JABBER
+
+ircdir = @IRCDIR@
+irc_SCRIPTS = modobot.pl
+
+# Define the substitution we need to point perl script at correct location
+do_sed = $(SED) --in-place \
+        -e 's,%PERL%,$(PERL),g' \
+        -e 's,'%VHFFS_LIB_DIR%',$(VHFFS_LIBDIR),g'
+
+# Because automake, exec-hook is executed before install-scripts
+# so install-data is after. Here we use a data-hook
+install-data-hook :
+	for f in $(dist_irc_SCRIPTS) ; do \
+		$(do_sed) $(DESTDIR)$(ircdir)/$$f; \
+	done
+
+
+endif


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/