Browse Source

Fixed iptables to properly build and install its development files

Note: I had to flag iptables as FPIC-QUIRK to assure that the installed libiptc
      will be PIC so that 3rd. party applications or libraries can link against
      it properly.
early
Christian Wiese 17 years ago
parent
commit
bf17423088
  1. 93
      network/iptables/iptables-1.3.8-make-devel.patch
  2. 19
      network/iptables/iptables.conf
  3. 4
      network/iptables/iptables.desc

93
network/iptables/iptables-1.3.8-make-devel.patch

@ -0,0 +1,93 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../iptables/iptables-1.3.8-make-devel.patch
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
# --- SDE-COPYRIGHT-NOTE-END ---
From 22ed966acfc06b635153015c5dd091a99faadd82 Mon Sep 17 00:00:00 2001
From: Christian Wiese <morfoh@opensde.org>
Date: Wed, 16 Jan 2008 19:45:28 +0200
Subject: [PATCH] Changed toplevel Makefile to install more development files
diff --git a/Makefile b/Makefile
index df04d35..d9d9182 100644
--- a/Makefile
+++ b/Makefile
@@ -118,6 +118,17 @@ LDLIBS += -lselinux
endif
endif
+# development files
+EXTRAS+=libiptables.a
+DEVEL_LIBS+=libiptables.a
+DEVEL_HEADERS+=include/iptables.h
+DEVEL_HEADERS+=include/iptables_common.h
+ifeq ($(DO_IPV6), 1)
+EXTRAS+=libip6tables.a
+DEVEL_LIBS+=libip6tables.a
+DEVEL_HEADERS+=include/ip6tables.h
+endif
+
.PHONY: default
default: print-extensions all
--
1.5.3.5
From 3f77fbc5db04b6b99c9439255b9ecb156284eca4 Mon Sep 17 00:00:00 2001
From: Christian Wiese <morfoh@opensde.org>
Date: Wed, 16 Jan 2008 20:02:35 +0200
Subject: [PATCH] Fixed toplevel Makefile to include targets for libiptables.a and libip6tables.a
diff --git a/Makefile b/Makefile
index d9d9182..4a1fb4f 100644
--- a/Makefile
+++ b/Makefile
@@ -136,6 +136,10 @@ default: print-extensions all
print-extensions:
@[ -n "$(OPTIONALS)" ] && echo Extensions found: $(OPTIONALS)
+libiptables.a: libiptables.a(iptables.o)
+
+libip6tables.a: libip6tables.a(ip6tables.o)
+
iptables.o: iptables.c
$(CC) $(CFLAGS) -DIPT_LIB_DIR=\"$(IPT_LIBDIR)\" -c -o $@ $<
--
1.5.3.5
From 87d1693db3f848bcead8f19caf474d5585987d64 Mon Sep 17 00:00:00 2001
From: Christian Wiese <morfoh@opensde.org>
Date: Wed, 16 Jan 2008 20:05:13 +0200
Subject: [PATCH] Changed libiptc Makefile to install libiptc.a
diff --git a/libiptc/Makefile b/libiptc/Makefile
index 180de13..01cc1fd 100644
--- a/libiptc/Makefile
+++ b/libiptc/Makefile
@@ -3,7 +3,7 @@
EXTRAS+=libiptc/libiptc.a
# libiptc is not a public interface and therefore not installed
-# DEVEL_LIBS+=libiptc/libiptc.a
+DEVEL_LIBS+=libiptc/libiptc.a
ifndef TOPLEVEL_INCLUDED
local:
--
1.5.3.5

19
network/iptables/iptables.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../iptables/iptables.conf
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2007 - 2008 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
@ -23,20 +23,21 @@ var_append makeopt ' ' "PREFIX=$root/$prefix"
var_append makeopt ' ' "BINDIR=$root/sbin"
var_append makeopt ' ' "KERNEL_DIR=$root/usr"
[ "$SDECFG_STATIC" == 1 ] && var_append makeopt ' ' "DO_MULTI=1 NO_SHARED_LIBS=1"
if [ "$SDECFG_STATIC" == 1 ] ; then
var_append makeopt ' ' "DO_MULTI=1 NO_SHARED_LIBS=1"
fi
makeinstopt="$makeopt install"
makeinstopt="PREFIX=$root/$prefix install"
iptables_install_devel() {
$MAKE $makeopt install-devel
cp -vf iptables.o "$root$libdir"
cp -vf include/{iptables,iptables_common}.h "$root$includedir/"
# libiptc headers are expected to be installed in /usr/include/libiptc
mkdir -vp "$root$includedir/libiptc"
cp -vf include/libiptc/{libiptc,ipt_kernel_headers}.h "$root$includedir/libiptc/"
}
[ "$SDECFG_PKG_IPTABLES_DEVEL" != 0 ] && hook_add postmake 5 'iptables_install_devel'
if [ "$SDECFG_PKG_IPTABLES_DEVEL" != 0 ] ; then
var_append makeinstopt ' ' "install-devel"
hook_add postmake 5 'iptables_install_devel'
fi
runconf=0

4
network/iptables/iptables.desc

@ -1,9 +1,8 @@
[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN ---
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../iptables/iptables.desc
[COPY] Copyright (C) 2006 - 2007 The OpenSDE Project
[COPY] Copyright (C) 2006 - 2008 The OpenSDE Project
[COPY] Copyright (C) 2004 - 2006 The T2 SDE Project
[COPY] Copyright (C) 1998 - 2003 Clifford Wolf
[COPY]
@ -29,6 +28,7 @@
[C] base/system
[F] DIETLIBC NOPARALLEL
[F] FPIC-QUIRK
[L] GPL
[S] Stable

Loading…
Cancel
Save