Update package name and documentation

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
This commit is contained in:
Jan Engelhardt
2008-02-11 14:08:23 +01:00
parent 6d2998588d
commit fd845be2d4
4 changed files with 70 additions and 51 deletions

56
INSTALL
View File

@@ -1,24 +1,33 @@
Installation instructions for Xtables-addons
============================================
Xtables-addons uses the well-known configure(autotools) infrastructure
in combination with the kernel's Kbuild system.
$ ./configure
$ make
# make install
Prerequirements
===============
* iptables-devel 1.4.1
* xtables(-devel) 1.5.0
* kernel-source >= 2.6.19
* kernel-source >= 2.6.19 with prepared output directory
Compiling
=========
Configuring and compiling
=========================
./configure [options]
--with-kbuild=
Specifies the path to the kernel build output directory. We
need it for building the kernel extensions. For example, on
openSUSE:
--with-kbuild=/usr/src/linux-obj/x86_64/default
Specifies the path to the kernel build output directory. We need
it for building the kernel extensions. It defaults to
/lib/modules/$(running version)/build, which usually points to
the right directory. (If not, you need to install something.)
--with-ksource=
@@ -29,23 +38,30 @@ Compiling
--with-ksource=/usr/src/linux
--with-iptables=
--with-xtables=
Specifies the path to the directory where we may find
xtables.h, should it not be within the standard C compiler
include path, or if you want to override it. The directory
will be checked for xtables.h and include/xtables.h. (This is
to support the following specs:)
include path (/usr/include), or if you want to override it.
The directory will be checked for xtables.h and
include/xtables.h. (This is to support the following specs:)
--with-iptables=/usr/src/iptables
--with-iptables=/usr/src/iptables/include
--with-iptables=/opt/iptables/include
--with-xtables=/usr/src/xtables
--with-xtables=/usr/src/xtables/include
--with-xtables=/opt/xtables/include
--with-iptdir=
--with-libxtdir=
Specifies the path to where the newly built extensions should
be installed when `make install` is run. It uses the same
default as the iptables package, ${libexecdir}/iptables.
default as the Xtables package, ${libexecdir}/xtables.
If you want to enable debugging, use
./configure CFLAGS="-ggdb3 -O0"
(-O0 is used to turn off instruction reordering, which makes debugging
much easier.)
Note to distribution packagers
@@ -54,5 +70,5 @@ Note to distribution packagers
Except for --with-kbuild, distributions should not have a need to
supply any other flags (besides --prefix=/usr and perhaps
--libdir=/usr/lib64, etc.) to configure when all prerequired packages
are installed. If iptables-devel is installed, necessary headers
should be in /usr/include, so --with-iptables is not needed.
are installed. If xtables-devel is installed, necessary headers should
be in /usr/include, so --with-xtables is not needed.

15
README
View File

@@ -1,7 +1,10 @@
iptables-addons
===============
Xtables-addons
==============
iptables-addons is what previously has been patch-o-matic and
patch-o-matic-ng. Extensions that do not need immediate kernel
patching are collected here in this repository and can immediately be
built against a kernel and iptables.
Xtables-addons is the proclaimed successor to patch-o-matic(-ng). It
contains extensions that were not accepted in the main Xtables
package.
Xtables-addons is different from patch-o-matic in that you do not have
to patch or recompile either kernel or Xtables(iptables). But please
see the INSTALL file for the minimum requirements of this package.

View File

@@ -1,5 +1,5 @@
AC_INIT([iptables-addons], [1.4.1])
AC_INIT([xtables-addons], [1.5.0])
AC_CONFIG_HEADERS([config.h])
AC_PROG_INSTALL
AM_INIT_AUTOMAKE
@@ -18,29 +18,29 @@ AC_ARG_WITH([ksource],
AS_HELP_STRING([--with-ksource=PATH],
[Path to kernel source directory [[/lib/modules/CURRENT/source]]]),
[ksourcedir="$withval"])
AC_ARG_WITH([iptables],
AS_HELP_STRING([--with-iptables=PATH],
[Path to the iptables includes [[PREFIX/include]]]),
[iptables_location="$withval"])
AC_ARG_WITH([iptdir],
AS_HELP_STRING([--with-iptdir=PATH],
[Path to iptables modules [[LIBEXECDIR/iptables]]]),
[iptdir="$withval"],
[iptdir='${libexecdir}/iptables'])
AC_ARG_WITH([xtables],
AS_HELP_STRING([--with-xtables=PATH],
[Path to the Xtables includes [[none]]]),
[xtables_location="$withval"])
AC_ARG_WITH([xtlibdir],
AS_HELP_STRING([--with-xtlibdir=PATH],
[Path where to install Xtables extensions [[LIBEXECDIR/xtables]]]),
[xtlibdir="$withval"],
[xtlibdir='${libexecdir}/xtables'])
AC_CHECK_HEADER([netinet/ip6.h], [], [AC_MSG_ERROR(but we need that for IPv6)])
AC_MSG_CHECKING([xtables.h presence])
if [[ -n "$iptables_location" ]]; then
if [[ -f "$iptables_location/xtables.h" ]]; then
AC_MSG_RESULT([$iptables_location/xtables.h])
iptables_CFLAGS="-I$iptables_location";
elif [[ -f "$iptables_location/include/xtables.h" ]]; then
AC_MSG_RESULT([$iptables_location/include/xtables.h])
iptables_CFLAGS="-I$iptables_location/include";
if [[ -n "$xtables_location" ]]; then
if [[ -f "$xtables_location/xtables.h" ]]; then
AC_MSG_RESULT([$xtables_location/xtables.h])
xtables_CFLAGS="-I $xtables_location";
elif [[ -f "$xtables_location/include/xtables.h" ]]; then
AC_MSG_RESULT([$xtables_location/include/xtables.h])
xtables_CFLAGS="-I $xtables_location/include";
fi;
fi;
if [[ -z "$iptables_CFLAGS" ]]; then
if [[ -z "$xtables_CFLAGS" ]]; then
if [[ -f "$includedir/xtables.h" ]]; then
AC_MSG_RESULT([$includedir/xtables.h])
else
@@ -52,11 +52,11 @@ regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
-Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
-DIPT_LIB_DIR=\\\"\${iptdir}\\\" -DIP6T_LIB_DIR=\\\"\${iptdir}\\\"";
kinclude_CFLAGS="-I\"$kbuilddir/include\" -I\"$ksourcedir/include\"";
-DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\"";
kinclude_CFLAGS="-I $kbuilddir/include -I $ksourcedir/include";
AC_SUBST([regular_CFLAGS iptables_CFLAGS kinclude_CFLAGS])
AC_SUBST([regular_CFLAGS xtables_CFLAGS kinclude_CFLAGS])
AC_SUBST([kbuilddir])
AC_SUBST([ksourcedir])
AC_SUBST([iptdir])
AC_SUBST([xtlibdir])
AC_OUTPUT([Makefile extensions/Makefile])

View File

@@ -4,12 +4,12 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
abssrcdir = $(shell readlink -f ${srcdir})
regular_CFLAGS := @regular_CFLAGS@
iptables_CFLAGS := @iptables_CFLAGS@
xtables_CFLAGS := @xtables_CFLAGS@
kinclude_CFLAGS := @kinclude_CFLAGS@
AM_CFLAGS = ${regular_CFLAGS} ${iptables_CFLAGS} ${kinclude_CFLAGS} \
AM_CFLAGS = ${regular_CFLAGS} ${xtables_CFLAGS} ${kinclude_CFLAGS} \
-D_INIT=$*_init
AM_LDFLAGS = -module -avoid-version
ipt_LTLIBRARIES = \
xtlib_LTLIBRARIES = \
libxt_LOGMARK.la \
libxt_TARPIT.la \
libxt_TEE.la