chiark / gitweb /
Build system overhaul to conform to new standards.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 19 Mar 2008 00:44:06 +0000 (00:44 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 29 Mar 2008 10:30:44 +0000 (10:30 +0000)
  * Rename configure.in to configure.ac, and rewrite using modern
    Autoconf macros.

  * Rewrite the Makefiles to be cleaner and more readable, using
    Automake conditionals and appending.

  * Move the manpages to live with their respective code components
    rather than languishing in their own subdirectory.

  * Switch the Debian build process over to using CDBS.

37 files changed:
.gitignore
.links
Makefile.am
client/Makefile.am
client/tripectl.1.in [moved from doc/tripectl.1.in with 100% similarity]
common/Makefile.am
configure.ac [new file with mode: 0644]
configure.in [deleted file]
debian/.gitignore
debian/control
debian/pkstream.install
debian/rules
debian/tripe-keys.install
debian/tripe-wireshark.install
debian/tripe.dirs [new file with mode: 0644]
debian/tripe.install
debian/tripe.postinst
debian/tripe.postrm [deleted file]
debian/tripe.prerm [deleted file]
debian/tripemon.install
doc/Makefile.am [deleted file]
init/Makefile.am
keys/Makefile.am
keys/tripe-keys.8 [moved from doc/tripe-keys.8 with 100% similarity]
keys/tripe-keys.conf.5 [moved from doc/tripe-keys.conf.5 with 100% similarity]
mon/Makefile.am
mon/tripemon.1.in [moved from doc/tripemon.1.in with 100% similarity]
pkstream/Makefile.am
pkstream/pkstream.1 [moved from doc/pkstream.1 with 100% similarity]
proxy/Makefile.am
proxy/tripe-mitm.8 [moved from doc/tripe-mitm.8 with 100% similarity]
server/Makefile.am
server/make-summary [moved from doc/make-summary with 100% similarity]
server/tripe-admin.5.in [moved from doc/tripe-admin.5.in with 100% similarity]
server/tripe.8.in [moved from doc/tripe.8.in with 100% similarity]
vars.am [new file with mode: 0644]
wireshark/Makefile.am

index d8ba279271b1304b2345f1d71152fbd919ba8086..a5ea3b1452af5093d64620a0305f69ac421d2115 100644 (file)
@@ -2,18 +2,10 @@ Makefile.in
 configure
 aclocal.m4
 build
-config.h.in
 stamp-h.in
 deb-build
 test
 COPYING
-config.guess
-config.sub
-install-sh
-ltmain.sh
-missing
-mkinstalldirs
-depcomp
 autom4te.cache
 slip-build
-
+config
diff --git a/.links b/.links
index 5ecd9c64ade274e86177f1b2a526c9216aa5bbdf..dd8b261faa0d195084617415c3eedc91394b0c16 100644 (file)
--- a/.links
+++ b/.links
@@ -1 +1,2 @@
 COPYING
+config/confsubst
index b765226f1bfb8aedd2e6cb8e40937fca1641895b..53085abd786b6481fd93878d4199991883f72f5a 100644 (file)
-## -*-makefile-*-
-##
-## Makefile for TrIPE
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-SUBDIRS = common client server proxy pkstream init doc @DIRS@
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = tripe.pc
-
-EXTRA_DIST = \
-       debian/rules debian/control debian/changelog debian/copyright \
-       debian/tripe.postinst debian/tripe.prerm debian/tripe.postrm
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+SUBDIRS                         =
+
+###--------------------------------------------------------------------------
+### Subdirectories.
+
+## Core components.
+SUBDIRS                        += common
+SUBDIRS                        += client
+SUBDIRS                        += server
+SUBDIRS                        += proxy
+SUBDIRS                        += pkstream
+SUBDIRS                        += init
+
+## Wireshark.
+if HAVE_WIRESHARK
+SUBDIRS                        += wireshark
+endif
+
+## Key-management.
+if HAVE_PYCATACOMB
+SUBDIRS                        += keys
+endif
+
+## Graphical monitor.
+if HAVE_PYGTK
+SUBDIRS                        += mon
+endif
+
+###--------------------------------------------------------------------------
+### The pkg-config file.
+
+pkgconfigdir            = $(libdir)/pkgconfig
+pkgconfig_DATA          = tripe.pc
+EXTRA_DIST             += tripe.pc.in
+CLEANFILES             += tripe.pc
+
+tripe.pc: tripe.pc.in Makefile
+       $(confsubst) $(srcdir)/tripe.pc.in >$@.new $(SUBSTITUTIONS) && \
+               mv $@.new $@
+
+###--------------------------------------------------------------------------
+### Release tweaking.
+
+## Distcheck tweaks.
+DISTCHECK_TUNNELS       = linux bsd unet slip
+
+DISTCHECK_CONFIGURE_FLAGS = \
+       --with-tunnel='$(DISTCHECK_TUNNELS)' \
+       --with-wireshark='$${libdir}/wireshark/plugins'
+
+## Release number.
+dist-hook::
+       echo $(VERSION) >$(distdir)/RELEASE
+
+## Additional build tools.
+EXTRA_DIST             += config/confsubst
+
+###--------------------------------------------------------------------------
+### Debian.
+
+## General stuff.
+EXTRA_DIST             += debian/rules
+EXTRA_DIST             += debian/control
+EXTRA_DIST             += debian/changelog
+EXTRA_DIST             += debian/copyright
+
+## pkstream
+EXTRA_DIST             += debian/pkstream.copyright
+EXTRA_DIST             += debian/pkstream.install
+
+## server and client
+EXTRA_DIST             += debian/tripe.README
+EXTRA_DIST             += debian/tripe.dirs
+EXTRA_DIST             += debian/tripe.install
+EXTRA_DIST             += debian/tripe.postinst
+EXTRA_DIST             += debian/tripe.logrotate
+
+## keys
+EXTRA_DIST             += debian/tripe-keys.install
+
+## monitor
+EXTRA_DIST             += debian/tripemon.install
+
+## wireshark
+EXTRA_DIST             += debian/tripe-wireshark.install
+
+
+###----- That's all, folks --------------------------------------------------
index 7f95a7584a10fad1665ab0189b46b074cb45b62a..cfef996fc4f95e73ede604fbd2cc0c59e52b9d3d 100644 (file)
@@ -1,34 +1,48 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE client
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = ../common/libtripe.a
-
-bin_PROGRAMS = tripectl
-
-tripectl_SOURCES = tripectl.c
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE client
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+bin_PROGRAMS            =
+man_MANS                =
+
+###--------------------------------------------------------------------------
+### Client program.
+
+bin_PROGRAMS           += tripectl
+
+tripectl_LDADD          = $(libtripe)
+tripectl_SOURCES        = tripectl.c
+
+## Manual page.
+man_MANS               += tripectl.1
+CLEANFILES             += tripectl.1
+EXTRA_DIST             += tripectl.1.in
+
+tripectl.1: tripectl.1.in Makefile
+       $(confsubst) $(srcdir)/tripectl.1.in >$@.new $(SUBSTITUTIONS) && \
+               mv $@.new $@
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from doc/tripectl.1.in
rename to client/tripectl.1.in
index 4007058d30be0258d923b10b1a732d899e740ab1..e329db15cd036bd2efd943b231cc27364c89031c 100644 (file)
@@ -1,32 +1,41 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE common source files
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-
-noinst_LIBRARIES = libtripe.a
-
-libtripe_a_SOURCES = protocol.h util.c util.h
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE common source files
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LIBRARIES        = libtripe.a
+
+###--------------------------------------------------------------------------
+### Library.
+
+libtripe_a_SOURCES      =
+
+## Protocol definitions.
+libtripe_a_SOURCES     += protocol.h
+
+## Miscellaneous utilties.
+libtripe_a_SOURCES     += util.c util.h
+
+###----- That's all, folks --------------------------------------------------
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..1c67cb7
--- /dev/null
@@ -0,0 +1,300 @@
+dnl -*-autoconf-*-
+dnl
+dnl Configuration script for TrIPE
+dnl
+dnl (c) 2001 Straylight/Edgeware
+dnl
+
+dnl ----- Licensing notice --------------------------------------------------
+dnl
+dnl This file is part of Trivial IP Encryption (TrIPE).
+dnl
+dnl TrIPE is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl TrIPE is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with TrIPE; if not, write to the Free Software Foundation,
+dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+dnl--------------------------------------------------------------------------
+dnl Initialization.
+
+mdw_AUTO_VERSION
+AC_INIT([tripe], AUTO_VERSION, [mdw@distorted.org.uk])
+AC_CONFIG_SRCDIR([server/tripe.h])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CC
+AM_PROG_CC_C_O
+AX_CFLAGS_WARN_ALL
+AC_CANONICAL_HOST
+AM_PROG_LIBTOOL
+
+dnl--------------------------------------------------------------------------
+dnl C programming environment.
+
+AC_CHECK_HEADERS([stdarg.h])
+
+AC_SEARCH_LIBS([socket], [socket])
+
+case "$host_os" in
+  linux)
+    AC_ARG_WITH([linux-includes],
+               AS_HELP_STRING(
+                 [--with-linux-includes=DIR],
+                 [Linux kernel includes]),
+               [CFLAGS="$CFLAGS -I$withval"], [:])
+    ;;
+esac
+
+PKG_CHECK_MODULES([mLib], [mLib >= 2.0.4])
+PKG_CHECK_MODULES([catacomb], [catacomb >= 2.1.1])
+
+CFLAGS="$CFLAGS $mLib_CFLAGS $catacomb_CFLAGS"
+LIBS="$LIBS $mLib_LIBS"
+
+dnl--------------------------------------------------------------------------
+dnl Directories to install things into.
+
+dnl TRIPE_DEFINE_PATH(VAR, ARG, HELP, DEFAULT, [DEFINE, DEFINEHELP])
+AC_DEFUN([TRIPE_DEFINE_PATH], [
+  AC_ARG_WITH([$1], AS_HELP_STRING([--with-$1=$2], [$3]),
+             [$1=$withval], [$1=$4])
+  AC_SUBST([$1])
+  m4_if([$5], [], [], [
+    mdw_DEFINE_PATHS([mdw_DEFINE_PATH([$5], [$][$1], [$6])])
+  ])
+])
+
+dnl Actual options.
+TRIPE_DEFINE_PATH(
+  [configdir], [DIR], [keys and other configuration [[LOCALSTATE/tripe]]],
+  ['${localstatedir}/tripe'],
+  [CONFIGDIR], [Look for keys and other configuration here.])
+
+TRIPE_DEFINE_PATH(
+  [socketdir], [DIR], [admin socket [[.]]], [.],
+  [SOCKETDIR], [Create or look for administration socket here.])
+
+TRIPE_DEFINE_PATH(
+  [pidfile], [FILE], [process-id [[./tripectl.pid]]], [tripectl.pid])
+
+TRIPE_DEFINE_PATH(
+  [initconfig], [FILE], [configuration for init script [[/etc/tripe.conf]]],
+  [/etc/tripe.conf])
+
+TRIPE_DEFINE_PATH(
+  [logfile], [FILE], [logging output [[./tripe.log]]], [tripe.log])
+
+dnl--------------------------------------------------------------------------
+dnl Other options.
+
+AC_ARG_WITH([tracing],
+           AS_HELP_STRING(
+             [--without-tracing],
+             [compile out tracing support (not recommended)]),
+           [test "$withval" = no &&
+             AC_DEFINE([NTRACE], [1], [Disable all tracing.])],
+           [:])
+
+dnl--------------------------------------------------------------------------
+dnl Tunnel devices.
+
+dnl Provide the user with a choice.
+AC_ARG_WITH([tunnel],
+           AS_HELP_STRING(
+             [--with-tunnel=KIND],
+             [kinds of tunnel device to use (linux, unet, bsd, slip)]),
+           [tun=$withval], [tun=auto])
+
+dnl If he doesn't choose, pick something sensible.
+if test "$tun" = auto; then
+  AC_CACHE_CHECK([tunnel drivers to use], [mdw_cv_tunnel], [
+    mdw_cv_tunnel=""
+    case $host_os in
+      linux*)
+       case `uname -r` in
+         [2.[4-9].*] | [2.[1-9][0-9]*.*] | [[3-9].*] | [[1-9][0-9]*.*])
+           mdw_cv_tunnel=linux
+           ;;
+         *)
+           mdw_cv_tunnel=unet
+           ;;
+       esac
+       ;;
+      *bsd*)
+       mdw_cv_tunnel=bsd
+       ;;
+    esac
+    mdw_cv_tunnel=$mdw_cv_tunnel${mdw_cv_tunnel:+ }slip
+  ])
+  tun=$mdw_cv_tunnel
+fi
+
+tunnels=""
+for i in $tun; do
+  case $i in
+    linux) AC_DEFINE([TUN_LINUX], [1],
+                    [Install the Linux TUN/TAP driver.]) ;;
+    bsd) AC_DEFINE([TUN_BSD], [1],
+                  [Install the BSD tunnel driver.]) ;;
+    unet) AC_DEFINE([TUN_UNET], [1],
+                   [Install the obsolete Linux Usernet driver.]) ;;
+    slip) ;;
+    *) AC_MSG_ERROR([Unknown tunnel type]) ;;
+  esac
+  tunnels="$tunnels&tun_$i, "
+done
+AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0],
+  [List of tunnel drivers to install.])
+
+dnl--------------------------------------------------------------------------
+dnl Python.
+
+dnl Find out whether Python exists at all.
+AM_PATH_PYTHON([2.4], [python=yes], [python=no])
+AM_CONDITIONAL([HAVE_PYTHON], [test $python = yes])
+
+dnl Find out whether we can use Catacomb and GTK.
+if test $python = yes; then
+  AC_PYTHON_MODULE([pygtk])
+  AC_PYTHON_MODULE([catacomb])
+fi
+AM_CONDITIONAL([HAVE_PYGTK], [test ${HAVE_PYMOD_PYGTK-no} = yes])
+AM_CONDITIONAL([HAVE_PYCATACOMB], [test ${HAVE_PYMOD_CATACOMB-no} = yes])
+
+dnl--------------------------------------------------------------------------
+dnl Wireshark.
+dnl
+dnl This is all distressingly ugly and complicated.  Why they can't just
+dnl provide a pkg-config dropping containing all the useful information about
+dnl the installation I don't know.
+
+WIRESHARK_CFLAGS=""
+: ${wireshark_plugindir=unknown}
+
+dnl Get the user to help.
+AC_ARG_WITH([wireshark],
+           AS_HELP_STRING(
+             [--with-wireshark[=DIR]],
+             [build and install Wireshark plugin]),
+           [case "$withval" in
+              no)  haveshark=no needshark=no ;;
+              yes) haveshark=yes needshark=yes ;;
+              *)   haveshark=yes needshark=yes
+                   wireshark_plugindir=$withval ;;
+           esac],
+           [haveshark=yes needshark=no])
+
+dnl Try to find the Wireshark installation directory the hard way.
+case "$haveshark,$wireshark_plugindir" in
+  yes,unknown)
+    AC_CACHE_CHECK([where to put Wireshark plugins],
+      [mdw_cv_wireshark_plugin_dir], [
+      mdw_cv_wireshark_plugin_dir="failed"
+      wsprefix=none
+      for i in "${prefix}" /usr/local /usr `echo $PATH | tr : " "`; do
+       if test -x "$i/bin/tshark"; then
+          wsprefix=$i
+          break
+       fi
+      done
+      if test "$wsprefix" != none; then
+       wsbin=$wsprefix/bin/tshark
+       wsver=`$wsbin -v | sed ['s/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q']`
+       dir=$wsprefix/lib/wireshark/plugins
+       test -d "$dir/$wsver" && dir="$dir/$wsver"
+       if test -d "$dir"; then
+         mdw_cv_wireshark_plugin_dir=$dir
+       fi
+      fi
+    ])
+    case $mdw_cv_wireshark_plugin_dir in
+      failed) haveshark=no ;;
+      *) wireshark_plugindir=$mdw_cv_wireshark_plugin_dir ;;
+    esac
+esac
+
+dnl If we're still interested, find Glib.
+case "$haveshark" in
+  yes) AM_PATH_GLIB([1.2.0], [], haveshark=false, [gmodule]) ;;
+esac
+
+dnl Find the include directory.  This would be much easier if they just
+dnl provided a pkg-config file.
+case "$haveshark" in
+  yes)
+    bad=yes
+    mdw_CFLAGS=$CFLAGS
+    wsprefix=`echo $wireshark_plugindir | sed 's:/lib/.*$::'`
+    AC_CACHE_CHECK([how to find the Wireshark headers],
+                  [mdw_cv_wireshark_includes], [
+      mdw_cv_wireshark_includes=failed
+      for i in \
+         "" \
+         "-I${wsprefix}/include/wireshark" \
+         "-I${wsprefix}/include" \
+         "-I${prefix}/include/wireshark" \
+         "-I${prefix}/include" \
+         "-I/usr/include/wireshark" \
+         "-I/usr/local/include/wireshark" \
+         "-I/usr/local/include"; do
+       CFLAGS="$GLIB_CFLAGS $i"
+       AC_TRY_COMPILE([
+#include <netinet/in.h>
+#include <glib.h>
+#include <wireshark/config.h>
+#include <wireshark/epan/packet.h>],
+       [dissector_handle_t dh; dh = create_dissector_handle(0, 0);],
+       [bad=no; break])
+      done
+      case "$bad" in
+       no) mdw_cv_wireshark_includes=$i ;;
+      esac
+      CFLAGS=$mdw_CFLAGS
+    ])
+    case "$mdw_cv_wireshark_includes" in
+      failed) haveshark=no ;;
+    esac
+esac
+
+case "$haveshark,$needshark" in
+  no,yes)
+    AC_MSG_ERROR([failed to configure Wireshark plugin])
+    ;;
+  yes,*)
+    WIRESHARK_CFLAGS="$CFLAGS $GLIB_CFLAGS $mdw_cv_wireshark_includes"
+    AC_SUBST(WIRESHARK_CFLAGS)
+    AC_SUBST(wireshark_plugindir)
+    ;;
+esac
+
+AM_CONDITIONAL([HAVE_WIRESHARK], [test "$haveshark" = yes])
+
+dnl--------------------------------------------------------------------------
+dnl Produce output.
+
+AC_CONFIG_HEADER([config/config.h])
+
+AC_CONFIG_FILES(
+  [Makefile]
+  [common/Makefile]
+  [client/Makefile]
+  [server/Makefile]
+  [proxy/Makefile]
+  [pkstream/Makefile]
+  [wireshark/Makefile]
+  [init/Makefile]
+  [keys/Makefile]
+  [mon/Makefile])
+AC_OUTPUT
+
+dnl ----- That's all, folks -------------------------------------------------
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index 6beb3b1..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-dnl -*-autoconf-*-
-dnl
-dnl Configuration script for TrIPE
-dnl
-dnl (c) 2001 Straylight/Edgeware
-dnl
-
-dnl ----- Licensing notice --------------------------------------------------
-dnl
-dnl This file is part of Trivial IP Encryption (TrIPE).
-dnl
-dnl TrIPE is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl TrIPE is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with TrIPE; if not, write to the Free Software Foundation,
-dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AC_INIT(server/tripe.c)
-AM_INIT_AUTOMAKE(tripe, 1.0.0pre7)
-AM_CONFIG_HEADER(common/config.h)
-AC_CANONICAL_HOST
-
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AM_PROG_LIBTOOL
-DIRS="" AC_SUBST([DIRS])
-
-AX_WITH_PYTHON([2.3], [missing])
-if test "$PYTHON" = "missing"; then
-  python=no
-else
-  python=yes
-   pyscripts='${PYTHONSCRIPTS}'
-   DIRS="$DIRS keys"
-   pymans='${PYTHONMANS}'
-fi
-AC_SUBST([pyscripts]) AC_SUBST([pymans])
-
-if test $python = yes; then
-  AC_CACHE_CHECK([for pygtk], [mdw_cv_pygtk], [
-    mdw_cv_pygtk=no
-    python -c >&5 2>&5 '
-import pygtk
-pygtk.require("2.0")
-import gtk
-' && mdw_cv_pygtk=yes
-  ])
-  if test $mdw_cv_pygtk = yes; then
-    pygtkscripts='${PYGTKSCRIPTS}'
-    DIRS="$DIRS mon"
-    pygtkmans='${PYGTKMANS}'
-  fi
-fi
-AC_SUBST([pygtkscripts]) AC_SUBST([pygtkmans])
-
-
-tun=auto
-AC_ARG_WITH([tunnel],
-[  --with-tunnel=KIND     kinds of tunnel device to use
-                           (linux, unet, bsd, slip)],
-[tun=$withval])
-
-if test "$tun" = auto; then
-  AC_CACHE_CHECK([tunnel drivers to use], [mdw_cv_tunnel], [
-    mdw_cv_tunnel=""
-    case $host_os in
-      linux*)
-       case `uname -r` in
-         [2.[4-9].*] | [2.[1-9][0-9]*.*] | [[3-9].*] | [[1-9][0-9]*.*])
-           mdw_cv_tunnel=linux
-           ;;
-         *)
-           mdw_cv_tunnel=unet
-           ;;
-       esac
-       ;;
-      *bsd*)
-       mdw_cv_tunnel=bsd
-       ;;
-    esac
-    mdw_cv_tunnel=$mdw_cv_tunnel${mdw_cv_tunnel:+ }slip
-  ])
-  tun=$mdw_cv_tunnel
-fi
-
-tunnels=""
-for i in $tun; do
-  case $i in
-    linux) AC_DEFINE([TUN_LINUX], [1],
-                    [Install the Linux TUN/TAP driver.]) ;;
-    bsd) AC_DEFINE([TUN_BSD], [1],
-                  [Install the BSD tunnel driver.]) ;;
-    unet) AC_DEFINE([TUN_UNET], [1],
-                   [Install the obsolete Linux Usernet driver.]) ;;
-    slip) ;;
-    *) AC_MSG_ERROR([Unknown tunnel type]) ;;
-  esac
-  tunnels="$tunnels&tun_$i, "
-done
-AC_SUBST(tun)
-AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0],
-  [List of tunnel drivers to install.])
-
-
-
-
-
-AC_CHECK_HEADERS([stdarg.h])
-AX_CFLAGS_WARN_ALL
-
-AC_ARG_WITH([tracing],
-[  --without-tracing      compile out tracing support (not recommended)],
-[test "$withval" = no && AC_DEFINE([NTRACE], [1], [Disable all tracing.])],
-[:])
-
-AC_ARG_WITH([linux-includes],
-[  --with-linux-includes=DIR
-                         search for Linux kernel includes in DIR],
-[CFLAGS="$CFLAGS -I$withval"],
-[:])
-
-AC_ARG_WITH([configdir],
-[  --with-configdir=DIR           look for keys and other configuration in DIR
-                         [default=/var/lib/tripe]],
-[configdir=$withval],
-[configdir=/var/lib/tripe])
-
-AC_ARG_WITH([socketdir],
-[  --with-socketdir=DIR           put admin socket in DIR [default=.]],
-[socketdir=$withval],
-[socketdir=.])
-
-AC_ARG_WITH([pidfile],
-[  --with-pidfile=FILE    make tripectl write its pid to FILE
-                         [default=./tripectl.pid]],
-[pidfile=$withval],
-[pidfile=tripectl.pid])
-
-AC_ARG_WITH([initconfig],
-[  --with-initconfig=FILE  read definitions from FILE in init script
-                         [default=/etc/tripe.conf]],
-[initconfig=$withval],
-[initconfig=/etc/tripe.conf])
-
-AC_ARG_WITH([logfile],
-[  --with-logfile=DIR     make tripectl write its log to FILE
-                         [default=./tripe.log]],
-[logfile=$withval],
-[logfile=tripe.log])
-
-WIRESHARK_CFLAGS=""
-WIRESHARK_PLUGIN_DIR="unknown"
-AC_ARG_WITH([wireshark],
-[  --with-wireshark       build and install Wireshark plugin],
-[case "$withval" in
-   no) wireshark=false requirewireshark=false;;
-   yes) wireshark=true; requirewireshark=true;;
-   *) wireshark=true requirewireshark=true WIRESHARK_PLUGIN_DIR=$withval;;
-esac],
-[wireshark=true requirewireshark=false])
-
-PKG_CHECK_MODULES(mLib, mLib >= 2.0.4)
-PKG_CHECK_MODULES(catacomb, catacomb >= 2.1.1)
-CFLAGS="$CFLAGS $mLib_CFLAGS $catacomb_CFLAGS"
-LIBS="$LIBS $mLib_LIBS"
-
-if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
-  AC_CACHE_CHECK([where to put Wireshark plugins],
-    [mdw_cv_wireshark_plugin_dir], [
-    mdw_cv_wireshark_plugin_dir="failed"
-    wsprefix=none
-    for i in "${prefix}" /usr/local /usr `echo $PATH | tr : " "`; do
-      if test -x "$i/bin/tshark"; then
-        wsprefix=$i
-        break
-      fi
-    done
-    if test "$wsprefix" != none; then
-      wsbin=$wsprefix/bin/tshark
-      wsver=`$wsbin -v | sed ['s/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q']`
-      dir=$wsprefix/lib/wireshark/plugins
-      test -d "$dir/$wsver" && dir="$dir/$wsver"
-      if test -d "$dir"; then
-       mdw_cv_wireshark_plugin_dir=$dir
-      fi
-    fi
-  ])
-  case $mdw_cv_wireshark_plugin_dir in
-    failed) wireshark=false;;
-    *) WIRESHARK_PLUGIN_DIR=$mdw_cv_wireshark_plugin_dir;;
-  esac
-fi
-
-if test "$wireshark" = true; then
-  AM_PATH_GLIB([1.2.0], [], wireshark=false, [gmodule])
-fi
-if test "$wireshark" = true; then
-  bad=true
-  mdw_CFLAGS=$CFLAGS
-  wsprefix=`echo $WIRESHARK_PLUGIN_DIR | sed 's:/lib/.*$::'`
-  AC_CACHE_CHECK([how to find the Wireshark headers],
-    [mdw_cv_wireshark_includes], [
-    mdw_cv_wireshark_includes=failed
-    for i in \
-       "" \
-       "-I${wsprefix}/include/wireshark" \
-       "-I${wsprefix}/include" \
-       "-I${prefix}/include/wireshark" \
-       "-I${prefix}/include" \
-       "-I/usr/include/wireshark" \
-       "-I/usr/local/include/wireshark" \
-       "-I/usr/local/include"; do
-      CFLAGS="$GLIB_CFLAGS $i"
-      AC_TRY_COMPILE([
-#include <netinet/in.h>
-#include <glib.h>
-#include <wireshark/config.h>
-#include <wireshark/epan/packet.h>
-], [
-       dissector_handle_t dh;
-       dh = create_dissector_handle(0, 0);
-      ], [bad=false; break])
-    done
-    if test $bad = false; then
-      mdw_cv_wireshark_includes=$i
-    fi
-    CFLAGS=$mdw_CFLAGS
-  ])
-  case $mdw_cv_wireshark_includes in
-    failed) wireshark=false;;
-  esac
-fi
-
-if test "$wireshark" = true; then
-  WIRESHARK_CFLAGS="$CFLAGS $GLIB_CFLAGS $mdw_cv_wireshark_includes"
-  AC_SUBST(WIRESHARK_CFLAGS)
-  AC_SUBST(WIRESHARK_PLUGIN_DIR)
-  DIRS="$DIRS wireshark"
-fi
-
-if test "$wireshark" = false -a "$requirewireshark" = true; then
-  AC_MSG_ERROR([failed to configure Wireshark plugin])
-fi
-
-AH_TEMPLATE([CONFIGDIR],
-           [Tripe should look here for keys and other configuration.])
-AH_TEMPLATE([SOCKETDIR],
-           [Tripe should make its administration socket here.])
-mdw_DEFINE_PATHS([
-  mdw_DEFINE_PATH([CONFIGDIR], [$configdir])
-  mdw_DEFINE_PATH([SOCKETDIR], [$socketdir])
-  AC_SUBST(socketdir) AC_SUBST(configdir) AC_SUBST(logfile) AC_SUBST(pidfile)
-  AC_SUBST(initconfig)
-])
-AC_OUTPUT( \
-       Makefile tripe.pc \
-       common/Makefile client/Makefile server/Makefile \
-       proxy/Makefile pkstream/Makefile \
-       doc/Makefile \
-         doc/tripe.8 doc/tripectl.1 doc/tripemon.1 \
-       wireshark/Makefile \
-       init/Makefile init/tripe-init \
-       keys/Makefile keys/tripe-keys \
-       mon/Makefile mon/tripemon)
-
-dnl ----- That's all, folks -------------------------------------------------
index 79c534b9f80f6101a540b52249544e2ac3dab148..9f9f3eff01792ef169dc2e09dbf563150a25b824 100644 (file)
@@ -1,12 +1,18 @@
+## General stuff.
 files
 tmp
 substvars
 *.substvars
 *.debhelper
+stamp-*
+compat
+
+## Individual packages
 pkstream
 tripe
+tripe.default
+tripe.init
 tripe-wireshark
 tripemon
 tripe-keys
-
 tripe-ethereal
index 615e021a0837ff33987ac98f555344484fbe0361..2d10e14f85d845f47159832af2511303e1f6cc68 100644 (file)
@@ -2,7 +2,7 @@ Source: tripe
 Section: net
 Priority: extra
 Maintainer: Mark Wooding <mdw@distorted.org.uk>
-Build-Depends: catacomb-dev (>= 2.1.0), mlib-dev (>= 2.0.3),
+Build-Depends: catacomb-dev (>= 2.1.1), mlib-dev (>= 2.0.4),
  tshark, wireshark-dev (>= 0.10.10), debhelper (>= 4.0.2)
 Standards-Version: 3.1.1
 
@@ -31,7 +31,7 @@ Description: Forward UDP packets over a stream
 
 Package: tripe-wireshark
 Architecture: any
-Depends: ${shlibs:Depends}, wireshark-common (= ${tripe:Wireshark-Version})
+Depends: wireshark-common (= ${tripe:Wireshark-Version})
 Description: Trivial IP Encryption: a simple virtual private network
  TrIPE is a simple VPN protocol.  It uses cryptography to ensure secrecy
  and authenticity of packets it sends and receives.
index 8f23ab6be20b65c3790fbd1087c520ba48cf3e13..2289d03f046e034d69cc4686efcb8aa07cc370a6 100644 (file)
@@ -1,2 +1,2 @@
-usr/bin/pkstream
-usr/share/man/man1/pkstream.1
+debian/tmp/usr/bin/pkstream
+debian/tmp/usr/share/man/man1/pkstream.1
index f17c0cb9a2001f0504552534c1db2769be89fb85..e48ae0731382fa8a88bdaca47d74d8d32e5f0b25 100755 (executable)
@@ -1,78 +1,51 @@
 #! /usr/bin/make -f
 
-export DH_COMPAT = 4
+CDBS = /usr/share/cdbs/1
 
-build:
-       rm -rf build deb-build
-       mkdir deb-build
-       cd deb-build; ../configure \
-               --prefix=/usr --mandir=/usr/share/man \
-               --with-tunnel="linux slip" \
-               --with-configdir=/etc/tripe \
-               --with-socketdir=/var/run \
-               --with-logfile=/var/log/tripe.log \
-               --with-pidfile=/var/run/tripectl.pid \
-               --with-initconfig=/etc/default/tripe \
-               --with-wireshark
-       make -C deb-build
-       touch build
+include $(CDBS)/rules/debhelper.mk
+include $(CDBS)/class/autotools.mk
 
-clean:
-       dh_clean
-       rm -rf deb-build build
+###--------------------------------------------------------------------------
+### General settings.
 
-install: build
-       dh_clean
-       make -C deb-build install DESTDIR=`pwd`/debian/tmp
-       mkdir -p debian/tmp/etc/tripe/peers
-       mkdir -p debian/tmp/etc/default
-       mkdir -p debian/tmp/etc/init.d
-       cp deb-build/init/tripe-init debian/tmp/etc/init.d/tripe
-       chmod 755 debian/tmp/etc/init.d/tripe
-       cp init/tripe.conf debian/tmp/etc/default/tripe
-       mkdir -p debian/tmp/usr/share/doc/tripe-keys/examples
-       cp keys/tripe-keys.master \
-               debian/tmp/usr/share/doc/tripe-keys/examples
-       dh_install --sourcedir=debian/tmp
-       mkdir -p debian/tripe-ethereal
+DEB_BUILDDIR = $(CURDIR)/build
 
-binary-indep: install
-       dh_testdir -i
-       dh_testroot -i
-       dh_compress -i
-       dh_installdocs -i
-       dh_installlogrotate -i
-       dh_gencontrol -i
-       dh_fixperms -i
-       dh_installdeb -i
-       dh_md5sums -i
-       dh_builddeb -i
+###--------------------------------------------------------------------------
+### Correct configuration.
 
-binary-arch: install
+## This will need changing on other kernels.
+default_tunnel = linux
+
+## Configuration arguments.
+DEB_CONFIGURE_EXTRA_FLAGS = \
+       --with-tunnel="$(default_tunnel) slip" \
+       --with-configdir="/etc/tripe" \
+       --with-socketdir="/var/run" \
+       --with-logfile="/var/log/tripe.log" \
+       --with-pidfile="/var/run/tripectl.pid" \
+       --with-initconfig="/etc/default/tripe" \
+       --with-wireshark
+
+###--------------------------------------------------------------------------
+### Install the startup scripts.
+
+install/tripe::
+       cp $(DEB_BUILDDIR)/init/tripe-init debian/tripe.init
+       cp $(DEB_SRCDIR)/init/tripe.conf debian/tripe.default
+
+cleanbuilddir::
+       rm -f debian/tripe.init debian/tripe.default
+
+###--------------------------------------------------------------------------
+### Wireshark plugin.
+
+## Grab the version we built against, so we can put it in the dependencies.
+install/tripe-wireshark::
        dpkg --status wireshark | \
                sed -n 's/^Version: */tripe:Wireshark-Version=/p' \
                >> debian/tripe-wireshark.substvars
-       dh_testdir -a
-       dh_testroot -a
-       dh_compress -a
-       dh_installdocs -a
-       dh_strip -a
-       dh_shlibdeps -a
-       dh_installlogrotate -a
-       dh_gencontrol -a
-       dh_fixperms -a
-       dh_installdeb -a
-       dh_md5sums -a
-       dh_builddeb -a
-
-binary: binary-indep binary-arch
 
-source:
-       rm -rf deb-build/*.tar.gz deb-build/=deb=
-       make -C deb-build dist
-       mkdir deb-build/=deb=
-       cd deb-build/=deb=; tar xvfz ../*.tar.gz
-       d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
-       rm -rf deb-build/=deb=
+## Don't track dependencies for the plugin.  We have it covered already.
+DEB_DH_SHLIBDEPS_ARGS_tripe-wireshark += -Xwireshark/plugins
 
-.PHONY: binary binary-arch binary-indep clean install source
+###----- That's all, folks --------------------------------------------------
index 6694f40d10fbb731e214e1c1d54d5ee2eb13fe8a..06cc965e68f9b59b00347b3c6a320ab9da2a493d 100644 (file)
@@ -1,4 +1,4 @@
-usr/bin/tripe-keys
-usr/share/man/man5/tripe-keys.conf.5
-usr/share/man/man8/tripe-keys.8
-usr/share/doc/tripe-keys
+debian/tmp/usr/sbin/tripe-keys
+debian/tmp/usr/share/man/man5/tripe-keys.conf.5
+debian/tmp/usr/share/man/man8/tripe-keys.8
+keys/tripe-keys.master usr/share/doc/tripe-keys/examples
index 8967025761cdee297a4792bcf660c5578e8367fa..1b5cf741a569c0fa2766a6c096ff376b6b88e308 100644 (file)
@@ -1 +1 @@
-usr/lib/wireshark
+debian/tmp/usr/lib/wireshark
diff --git a/debian/tripe.dirs b/debian/tripe.dirs
new file mode 100644 (file)
index 0000000..0048c94
--- /dev/null
@@ -0,0 +1 @@
+etc/tripe/peers
index 071b76c306d3e02beaf6f00cbb085812c96ad1c6..e68861de70a9a796f6f5c198a339838bc40fa792 100644 (file)
@@ -1,7 +1,6 @@
-usr/bin/tripectl
-usr/sbin/tripe
-usr/share/man/man1/tripectl.1
-usr/share/man/man5/tripe-admin.5
-usr/share/man/man8/tripe.8
-usr/lib/pkgconfig/tripe.pc
-etc
+debian/tmp/usr/bin/tripectl
+debian/tmp/usr/sbin/tripe
+debian/tmp/usr/share/man/man1/tripectl.1
+debian/tmp/usr/share/man/man5/tripe-admin.5
+debian/tmp/usr/share/man/man8/tripe.8
+debian/tmp/usr/lib/pkgconfig/tripe.pc
index 311664a80e9cdb639c24e453a12d2b0a8c1f716e..468f19691699dc52b6a84f305afbdf4d3cb90337 100644 (file)
@@ -7,8 +7,3 @@ if [ ! -c /dev/.devfsd ] && [ ! -c /dev/net/tun ]; then
 fi
 
 #DEBHELPER#
-
-if [ -x "/etc/init.d/tripe" ]; then
-  update-rc.d tripe defaults >/dev/null
-  invoke-rc.d tripe start
-fi
diff --git a/debian/tripe.postrm b/debian/tripe.postrm
deleted file mode 100644 (file)
index 7fff153..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ "$1" = "purge" ] ; then
-       update-rc.d tripe remove >/dev/null
-fi
-
-#DEBHELPER#
diff --git a/debian/tripe.prerm b/debian/tripe.prerm
deleted file mode 100644 (file)
index abeb5c8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ -x "/etc/init.d/tripe" ]; then
-       invoke-rc.d tripe stop
-fi
-
-#DEBHELPER#
index f573ab2c8930e9bddcf0ef49e9a5a2483b8b2d7f..6a313db62626f9b489f2fc827284fd13f8350e97 100644 (file)
@@ -1,2 +1,2 @@
-usr/bin/tripemon
-usr/share/man/man1/tripemon.1
+debian/tmp/usr/bin/tripemon
+debian/tmp/usr/share/man/man1/tripemon.1
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644 (file)
index bf79e01..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE documentation
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-
-CONST_MANS = pkstream.1 tripe-mitm.8
-AUTO_MANS = tripe.8 tripectl.1
-PYTHONMANS = tripe-keys.8 tripe-keys.conf.5
-PYGTKMANS = tripemon.1
-man_MANS = \
-       $(CONST_MANS) $(AUTO_MANS) tripe-admin.5 \
-       @pymans@ @pygtkmans@
-
-EXTRA_DIST = \
-       $(CONST_MANS) tripe-admin.5.in $(PYTHONMANS) $(PYGTKMANS) \
-       make-summary
-
-tripe-admin.5: tripe-admin.5.in make-summary
-       awk -f $(srcdir)/make-summary <$(srcdir)/tripe-admin.5.in >$@.new
-       mv $@.new $@
-
-##----- That's all, folks ---------------------------------------------------
index fce633dfa0b2634f60d9450d8b98b728be6a55a4..2d52819147f42bacf0b5e9438a9dd9b8c74bc489 100644 (file)
@@ -1,40 +1,52 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE startup scripts
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-configdir = @configdir@
-socketdir = @socketdir@
-logdir = @logdir@
-
-noinst_SCRIPTS = tripe-init
+### -*-makefile-*-
+###
+### Makefile for TrIPE startup scripts
+###
+### (c) 2001 Straylight/Edgeware
+###
 
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_SCRIPTS          =
+
+###--------------------------------------------------------------------------
+### Things to install.
+
+## Initialization script.
+## Nowhere sensible to put it; leave it uninstalled.
+noinst_SCRIPTS         += tripe-init
+EXTRA_DIST             += tripe-init.in
+CLEANFILES             += tripe-init
+
+tripe-init: tripe-init.in Makefile
+       $(confsubst) $(srcdir)/tripe-init.in >$@.new $(SUBSTITUTIONS) && \
+               chmod +x $@.new && mv $@.new $@
+
+## Configuration file for the script.
+EXTRA_DIST             += tripe.conf
+
+## Necessary directories.
 install-hook:
        for i in "$(configdir)" "$(socketdir)"; do \
-         case "$$i" in /*) $(mkinstalldirs) $(DESTDIR)$$i;; esac; \
+         case "$$i" in /*) $(mkdir_p) $(DESTDIR)$$i ;; esac; \
        done
 
-EXTRA_DIST = tripe.conf
-
-##----- That's all, folks ---------------------------------------------------
+###----- That's all, folks --------------------------------------------------
index 9df6e1792f8521a34f57958010ba84970a1ac6a6..9bbe384c4f308ade07342b3d2cf374e560e425e9 100644 (file)
@@ -1,33 +1,50 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE key management tool
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-
-PYTHONSCRIPTS = tripe-keys
-bin_SCRIPTS = @pyscripts@
-
-EXTRA_SCRIPTS = ${PYTHONSCRIPTS}
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE key management tool
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+sbin_SCRIPTS            =
+man_MANS                =
+
+###--------------------------------------------------------------------------
+### Key-management.
+
+## Key-management script.
+sbin_SCRIPTS           += tripe-keys
+EXTRA_DIST             += tripe-keys.in
+CLEANFILES             += tripe-keys
+
+tripe-keys: tripe-keys.in Makefile
+       $(confsubst) $(srcdir)/tripe-keys.in >$@.new $(SUBSTITUTIONS) && \
+               mv $@.new $@
+
+## Manual pages.
+man_MANS               += tripe-keys.8 tripe-keys.conf.5
+EXTRA_DIST             += tripe-keys.8 tripe-keys.conf.5
+
+## Examples.
+EXTRA_DIST             += tripe-keys.master
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from doc/tripe-keys.8
rename to keys/tripe-keys.8
similarity index 100%
rename from doc/tripe-keys.conf.5
rename to keys/tripe-keys.conf.5
index ff48384b162cd7705d39f49dd861f3ef142514f5..425a2a597629884ed41ef279e63e16065847a37c 100644 (file)
@@ -1,33 +1,53 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE graphical monitor
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-
-PYGTKSCRIPTS = tripemon
-bin_SCRIPTS = @pygtkscripts@
-
-EXTRA_SCRIPTS = ${PYGTKSCRIPTS}
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE graphical monitor
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+bin_SCRIPTS             =
+man_MANS                =
+
+###--------------------------------------------------------------------------
+### Graphical monitor.
+
+## Monitor script.
+bin_SCRIPTS            += tripemon
+EXTRA_DIST             += tripemon.in
+CLEANFILES             += tripemon
+
+tripemon: tripemon.in Makefile
+       $(confsubst) $(srcdir)/tripemon.in >$@.new $(SUBSTITUTIONS) && \
+               chmod +x $@.new && mv $@.new $@
+
+## Manual page.
+man_MANS               += tripemon.1
+CLEANFILES             += tripemon.1
+EXTRA_DIST             += tripemon.1.in
+
+tripemon.1: tripemon.1.in Makefile
+       $(confsubst) $(srcdir)/tripemon.1.in >$@.new $(SUBSTITUTIONS) && \
+               mv $@.new $@
+
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from doc/tripemon.1.in
rename to mon/tripemon.1.in
index d51021ac44bc9a56f4beb7c0309d0d4aab2c4242..d5fb6a900b667a2e31577d63729947d54f2f23fe 100644 (file)
@@ -1,33 +1,41 @@
-## -*-makefile-*-
-##
-## Makefile for packets-over-stream proxy
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-
-bin_PROGRAMS = pkstream
-
-pkstream_SOURCES = pkstream.c
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for UDP-packets-over-stream proxy
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+bin_PROGRAMS            =
+man_MANS                =
+
+###--------------------------------------------------------------------------
+### Packet-streaming proxy.
+
+bin_PROGRAMS           += pkstream
+
+pkstream_SOURCES        = pkstream.c
+
+man_MANS               += pkstream.1
+EXTRA_DIST             += pkstream.1
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from doc/pkstream.1
rename to pkstream/pkstream.1
index c3362988510c88064584ef24433f1aa4f30aab3b..77dbc9fc5a346ee1bf1ccd8bccb14e5f9f612220 100644 (file)
@@ -1,34 +1,42 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE malicious proxy
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = @catacomb_LIBS@
-
-bin_PROGRAMS = tripe-mitm
-
-tripe_mitm_SOURCES = tripe-mitm.c
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE malicious proxy
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+bin_PROGRAMS            =
+man_MANS                =
+
+###--------------------------------------------------------------------------
+### Proxy.
+
+bin_PROGRAMS           += tripe-mitm
+
+tripe_mitm_LDADD        = $(catacomb_LIBS)
+tripe_mitm_SOURCES      = tripe-mitm.c
+
+man_MANS               += tripe-mitm.8
+EXTRA_DIST             += tripe-mitm.8
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from doc/tripe-mitm.8
rename to proxy/tripe-mitm.8
index 08af0e45489d00c174d4aa124c875e28328cc9b2..1f4a3722f20143408250b10abc3d05eba2f4e83f 100644 (file)
@@ -1,40 +1,76 @@
-## -*-makefile-*-
-##
-## Makefile for TrIPE server
-##
-## (c) 2001 Straylight/Edgeware
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = ../common/libtripe.a $(catacomb_LIBS)
-configdir = @configdir@
-tun = @tun@
-
-sbin_PROGRAMS = tripe
-
-tripe_SOURCES = \
-       tripe.h \
-       servutil.c \
-       tripe.c admin.c peer.c keymgmt.c keyexch.c keyset.c chal.c \
-       tun-unet.c tun-bsd.c tun-linux.c tun-slip.c
-
-##----- That's all, folks ---------------------------------------------------
+### -*-makefile-*-
+###
+### Makefile for TrIPE server
+###
+### (c) 2001 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+sbin_PROGRAMS           =
+man_MANS                =
+
+###--------------------------------------------------------------------------
+### The main server.
+
+sbin_PROGRAMS          += tripe
+
+tripe_SOURCES           =
+tripe_LDADD             = $(libtripe) $(catacomb_LIBS)
+
+## Main header file.
+tripe_SOURCES          += tripe.h
+
+## Main sources.
+tripe_SOURCES          += servutil.c
+tripe_SOURCES          += keymgmt.c
+tripe_SOURCES          += keyset.c
+tripe_SOURCES          += keyexch.c
+tripe_SOURCES          += chal.c
+tripe_SOURCES          += peer.c
+tripe_SOURCES          += admin.c
+tripe_SOURCES          += tripe.c
+
+## Tunnel drivers.
+tripe_SOURCES          += tun-unet.c
+tripe_SOURCES          += tun-bsd.c
+tripe_SOURCES          += tun-linux.c
+tripe_SOURCES          += tun-slip.c
+
+## Server manual page.
+man_MANS               += tripe.8
+CLEANFILES             += tripe.8
+EXTRA_DIST             += tripe.8.in
+
+tripe.8: tripe.8.in Makefile
+       $(confsubst) $(srcdir)/tripe.8.in >$@.new $(SUBSTITUTIONS) && \
+               mv $@.new $@
+
+## The admin protocol manual page.
+man_MANS               += tripe-admin.5
+EXTRA_DIST             += tripe-admin.5.in make-summary
+CLEANFILES             += tripe-admin.5
+
+tripe-admin.5: tripe-admin.5.in make-summary
+       awk -f $(srcdir)/make-summary <$(srcdir)/tripe-admin.5.in >$@.new
+       mv $@.new $@
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from doc/make-summary
rename to server/make-summary
similarity index 100%
rename from doc/tripe-admin.5.in
rename to server/tripe-admin.5.in
similarity index 100%
rename from doc/tripe.8.in
rename to server/tripe.8.in
diff --git a/vars.am b/vars.am
new file mode 100644 (file)
index 0000000..4c2b815
--- /dev/null
+++ b/vars.am
@@ -0,0 +1,70 @@
+### -*-makefile-*-
+###
+### Definitions used throughout the build system
+###
+### (c) 2008 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Initial values of common variables.
+
+EXTRA_DIST              =
+
+CLEANFILES              =
+DISTCLEANFILES          =
+MAINTAINERCLEANFILES    =
+
+SUFFIXES                =
+
+###--------------------------------------------------------------------------
+### Include path.
+
+TRIPE_INCLUDES = \
+       -I$(top_builddir)/config.h \
+       -I$(top_srcdir)/common
+
+CPPFLAGS += $(TRIPE_INCLUDES)
+
+###--------------------------------------------------------------------------
+### Miscellanous useful definitions.
+
+## Library of common code.
+libtripe = $(top_builddir)/common/libtripe.a
+
+## Create a directory if it doesn't exist.
+mkdir_p = $(top_srcdir)/config/install-sh -d
+
+## Substitute tags in files.
+confsubst = $(top_srcdir)/config/confsubst
+
+###--------------------------------------------------------------------------
+### Standard configuration substitutions.
+
+SUBSTITUTIONS = \
+               prefix=$(prefix) exec_prefix=$(exec_prefix) \
+               libdir=$(libdir) includedir=$(includedir) \
+               bindir=$(bindir) sbindir=$(sbindir) \
+               configdir=$(configdir) socketdir=$(socketdir) \
+               initconfig=$(initconfig) \
+               pidfile=$(pidfile) logfile=$(logfile) \
+               PYTHON=$(PYTHON)
+
+###----- That's all, folks --------------------------------------------------
index c1680e23a91d8bf995eb6488afbdd4ce8534dc5a..ae3ccf4313a38f858ed35e83be3b599fac805b82 100644 (file)
@@ -1,37 +1,39 @@
-## -*-makefile-*-
-##
-## Makefile fragment for Wireshark plugin
-##
-## (c) 2003 Straylight/Edgeware
-##
+### -*-makefile-*-
+###
+### Makefile fragment for Wireshark plugin
+###
+### (c) 2003 Straylight/Edgeware
+###
 
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of Trivial IP Encryption (TrIPE).
-##
-## TrIPE is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## TrIPE is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with TrIPE; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-CFLAGS = @WIRESHARK_CFLAGS@
-plugindir = @WIRESHARK_PLUGIN_DIR@
+include $(top_srcdir)/vars.am
 
-plugin_LTLIBRARIES = tripe.la
+###--------------------------------------------------------------------------
+### Wireshark plugin.
 
-tripe_la_SOURCES = packet-tripe.c
-tripe_la_LDFLAGS = -module -avoid-version
-LIBS =
+CFLAGS                         += $(WIRESHARK_CFLAGS)
+LIBS                            =
 
-##----- That's all, folks ---------------------------------------------------
+wireshark_plugin_LTLIBRARIES    = tripe.la
+
+tripe_la_LDFLAGS                = -module -avoid-version
+tripe_la_SOURCES                = packet-tripe.c
+
+###----- That's all, folks --------------------------------------------------