changeset 105:c3e9fa6b37c6

move to autoconf/automake/docbook
author carl
date Sun, 18 Dec 2005 09:31:13 -0800
parents 586d5b58040a
children 2fbeeb4ced73
files Makefile.am Makefile.cvs configure.in dnsbl.rc html/Makefile.am info/Makefile.am man/Makefile.am test.bash xml/Makefile.am
diffstat 9 files changed, 71 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.am	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,21 @@
+SUBDIRS = src man html info
+hackdir = $(sysconfdir)
+hack_SCRIPTS = syslog2iptables
+sysconf_DATA = syslog2iptables.conf
+CLEANFILES = syslog2iptables xml/syslog2iptables xml/Makefile
+EXTRA_DIST = syslog2iptables.rc syslog2iptables.conf syslog2iptables.spec $(wildcard xml/h*) $(wildcard xml/M*) $(wildcard xml/s*)
+
+syslog2iptables: $(srcdir)/syslog2iptables.rc
+	   rm -f syslog2iptables
+	   echo "#!" $(BASH) >syslog2iptables
+	   cat $(srcdir)/syslog2iptables.rc     | \
+	       sed -e "s,SBINDIR,$(sbindir),g"  | \
+	       sed -e "s,SYSCONFDIR,$(sysconfdir),g" >>syslog2iptables
+
+chkconfig: syslog2iptables
+	   mv -f $(sysconfdir)/syslog2iptables /etc/rc.d/init.d
+	   /sbin/chkconfig --del syslog2iptables
+	   /sbin/chkconfig --add syslog2iptables
+	   /sbin/chkconfig --level 2345 syslog2iptables on
+	   /etc/rc.d/init.d/syslog2iptables start
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.cvs	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,8 @@
+default: all
+
+all:
+	aclocal
+	autoheader
+	automake
+	autoconf
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.in	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,20 @@
+AC_INIT(configure.in)
+
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(dnsbl,5.10)
+AC_PATH_PROGS(BASH, bash)
+
+AC_LANG_CPLUSPLUS
+AC_PROG_CXX
+AM_PROG_LIBTOOL
+
+AC_OUTPUT(                  \
+    Makefile                \
+    dnsbl.spec              \
+    html/Makefile           \
+    info/Makefile           \
+    man/Makefile            \
+    src/Makefile            \
+    xml/Makefile            \
+    xml/dnsbl               \
+    )
--- a/dnsbl.rc	Sun Dec 18 09:09:25 2005 -0800
+++ b/dnsbl.rc	Sun Dec 18 09:31:13 2005 -0800
@@ -1,4 +1,4 @@
-#!/bin/sh
+#  -- bash header installed by automake --
 #
 # dnsbl   This script controls the dnsbl milter daemon.
 #
@@ -21,10 +21,10 @@
         # Start daemons.
         echo -n "Starting dnsbl-milter: "
         if [ ! -f /var/lock/subsys/dnsbl ]; then
-            cd /etc/dnsbl   # conf file is here
-            /usr/sbin/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
+            cd SYSCONFDIR   # conf file is here
+            SBINDIR/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
             RETVAL=$?
-            pid=`pidof -s /usr/sbin/dnsbl`
+            pid=`pidof -s SBINDIR/dnsbl`
             if [ $pid ]
             then
                 success "Starting dnsbl milter:"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/html/Makefile.am	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,3 @@
+htmldir = ${datadir}/doc/@PACKAGE@-@VERSION@
+html_DATA = $(wildcard *.html) $(wildcard *.pdf)
+EXTRA_DIST = $(html_DATA)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/info/Makefile.am	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,2 @@
+info_INFOS = syslog2iptables.texi
+EXTRA_DIST = $(info_INFOS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/man/Makefile.am	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,2 @@
+man_MANS = syslog2iptables.1 syslog2iptables.conf.5
+EXTRA_DIST = $(man_MANS)
--- a/test.bash	Sun Dec 18 09:09:25 2005 -0800
+++ b/test.bash	Sun Dec 18 09:31:13 2005 -0800
@@ -35,7 +35,7 @@
 
 if [ "$1" == "test" ]; then
     # build the test.cf file
-    make test.cf
+    make -f Makefile.test test.cf
 
     # start the milter
     pid=/var/run/dnsbl.pid
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/Makefile.am	Sun Dec 18 09:31:13 2005 -0800
@@ -0,0 +1,10 @@
+all: syslog2iptables
+	   cat header.xml  syslog2iptables >syslog2iptables.xml
+	   cat header.sgml syslog2iptables >syslog2iptables.sgml
+	   rm -f ../html/*html
+	   rm -f ../html/*pdf
+	   xmlto        -o ../man  man   syslog2iptables.xml
+	   xmlto        -o ../html xhtml syslog2iptables.xml
+	   xmlto        -o ../html pdf   syslog2iptables.xml
+	   docbook2texi -o ../info       syslog2iptables.sgml
+	   rm -f syslog2iptables.xml syslog2iptables.sgml