]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/linux
SquashFS hinzugefuegt damit wir auf OpenVZ-Maschinen bauen koennen.
[people/pmueller/ipfire-2.x.git] / lfs / linux
index d1912387acdacfc622f7582d97d037b56aa689b7..97a3f6f6f0f5123014ade17d624abc918eed2d96 100644 (file)
--- a/lfs/linux
+++ b/lfs/linux
-###############################################################################\r
-# This file is part of the IPCop Firewall.                                    #\r
-#                                                                             #\r
-# IPCop is free software; you can redistribute it and/or modify               #\r
-# it under the terms of the GNU General Public License as published by        #\r
-# the Free Software Foundation; either version 2 of the License, or           #\r
-# (at your option) any later version.                                         #\r
-#                                                                             #\r
-# IPCop is distributed in the hope that it will be useful,                    #\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #\r
-# GNU General Public License for more details.                                #\r
-#                                                                             #\r
-# You should have received a copy of the GNU General Public License           #\r
-# along with IPCop; if not, write to the Free Software                        #\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #\r
-#                                                                             #\r
-# Makefiles are based on LFSMake, which is                                    #\r
-# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #\r
-#                                                                             #\r
-# Modifications by:                                                           #\r
-# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #\r
-#          - Modified Makefile for IPCop build                                #\r
-#                                                                             #\r
-# $Id: linux,v 1.42.2.57 2005/07/28 07:01:27 gespinasse Exp $\r
-#                                                                             #\r
-###############################################################################\r
-\r
-###############################################################################\r
-# Definitions\r
-###############################################################################\r
-\r
-include Config\r
-\r
-VER        = 2.4.31\r
-\r
-THISAPP    = linux-$(VER)\r
-DL_FILE    = $(THISAPP).tar.gz\r
-DL_FROM    = $(URL_KERNEL)/linux/kernel/v2.4\r
-DIR_APP    = $(DIR_SRC)/$(THISAPP)\r
-CFLAGS     =\r
-CXXFLAGS   =\r
-\r
-# Normal build or /tools build.\r
-#\r
-ifeq "$(ROOT)" ""\r
-ifeq "$(LFS_PASS)" "ipcop"\r
-ifeq "$(EMB)" ""\r
-  TARGET = $(DIR_INFO)/$(THISAPP)-ipcop\r
-endif\r
-ifeq "$(SMP)" "1"\r
-  TARGET = $(DIR_INFO)/$(THISAPP)-ipcop-smp\r
-endif\r
-ifeq "$(SMP)" "installer"\r
-  TARGET = $(DIR_INFO)/$(THISAPP)-ipcop-installer\r
-endif\r
-else\r
-  TARGET = $(DIR_INFO)/$(THISAPP)\r
-endif\r
-else\r
-  TARGET = $(DIR_INFO)/$(THISAPP)-tools\r
-endif\r
-\r
-###############################################################################\r
-# Top-level Rules\r
-###############################################################################\r
-objects =$(DL_FILE) \\r
-       openswan-1.0.10rc2.tar.gz \\r
-       iptables-1.3.5.tar.bz2 \\r
-       patch-o-matic-ng-20060206.tar.bz2 \\r
-       kbc_option_2420.patch \\r
-       net4801.kernel.patch_2.4.31 \\r
-       netfilter-layer7-v2.1.tar.gz\r
-\r
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)\r
-openswan-1.0.10rc2.tar.gz              = ftp://ftp.man.szczecin.pl/disks/disk0/security/network-security/ipsec/openswan/openswan-1.0.10rc2.tar.gz\r
-patch-o-matic-ng-20060206.tar.bz2      = ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20060206.tar.bz2\r
-iptables-1.3.5.tar.bz2                 = http://www.netfilter.org/files/iptables-1.3.5.tar.bz2\r
-kbc_option_2420.patch                   = http://developer.osdl.org/rddunlap/patches/kbc_option_2420.patch\r
-net4801.kernel.patch_2.4.31             = http://www.sk-tech.net/support/net4801.kernel.patch_2.4.31\r
-netfilter-layer7-v2.1.tar.gz                   = http://belnet.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.1.tar.gz\r
-\r
-$(DL_FILE)_MD5                         = ea3f99fc82617886059d58d0644dab26\r
-openswan-1.0.10rc2.tar.gz_MD5          = 20d51ff963da78f826f4e0f0ebc4bcef\r
-patch-o-matic-ng-20060206.tar.bz2_MD5  = eca9893afb753e331caddfe63142b566\r
-iptables-1.3.5.tar.bz2_MD5             = 00fb916fa8040ca992a5ace56d905ea5\r
-kbc_option_2420.patch_MD5               = 6d37870344f7fcf97ace1fbf43323c60\r
-net4801.kernel.patch_2.4.31_MD5         = c7d64e3caedb2f2b10e1c11db7f73a04\r
-netfilter-layer7-v2.1.tar.gz_MD5               = 551626a158c2a2cbfd937d27ecc7fac1\r
-\r
-install : $(TARGET)\r
-\r
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))\r
-\r
-download :$(patsubst %,$(DIR_DL)/%,$(objects))\r
-\r
-md5 : $(subst %,%_MD5,$(objects))\r
-\r
-###############################################################################\r
-# Downloading, checking, md5sum\r
-###############################################################################\r
-\r
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :\r
-       @$(CHECK)\r
-\r
-$(patsubst %,$(DIR_DL)/%,$(objects)) :\r
-       @$(LOAD)\r
-\r
-$(subst %,%_MD5,$(objects)) :\r
-       @$(MD5)\r
-\r
-###############################################################################\r
-# Installation Details\r
-###############################################################################\r
-\r
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))\r
-       @$(PREBUILD)\r
-       @rm -rf $(DIR_APP) $(DIR_SRC)/linux && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)\r
-       cd $(DIR_SRC) && ln -sf linux-$(VER) linux\r
-       cd $(DIR_APP) && sed -i -e 's/-Werror//' drivers/scsi/aic7xxx/Makefile\r
-\r
-       # Openswan\r
-       cd $(DIR_SRC) && rm -rf openswan-*\r
-       cd $(DIR_SRC) && tar xfz $(DIR_DL)/openswan-1.0.10rc2.tar.gz\r
-       cd $(DIR_SRC)/openswan-1.0.10rc2 && patch -Np1 < $(DIR_SRC)/src/patches/openswan-1.0.1-plutoctl.patch\r
-       cd $(DIR_SRC)/openswan-1.0.10rc2 && patch -Np1 < $(DIR_SRC)/src/patches/openswan-1.0.6-numif.patch\r
-       cd $(DIR_SRC)/openswan-1.0.10rc2 && sed -i 's+^KERNELSRC.*$$+KERNELSRC=$(ROOT)/usr/src/linux-$(VER)+' Makefile.inc\r
-       cd $(DIR_SRC)/openswan-1.0.10rc2 && sed -i -e 's/local\/sbin/local\/sbin:\/tools\/bin/' utils/patcher\r
-       cd $(DIR_SRC)/openswan-1.0.10rc2 && make insert\r
-       \r
-       # Patch-o-matic\r
-       cd $(DIR_SRC) && rm -rf iptables-*\r
-       cd $(DIR_SRC) && tar xfj $(DIR_DL)/iptables-1.3.5.tar.bz2 \r
-       cd $(DIR_SRC) && ln -sf iptables-1.3.5 iptables\r
-       cd $(DIR_SRC) && rm -rf patch-o-matic*\r
-       cd $(DIR_SRC) && tar xfj $(DIR_DL)/patch-o-matic-ng-20060206.tar.bz2\r
-       \r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ pending\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ base\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ h323-conntrack-nat\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ cuseeme-nat\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ mms-conntrack-nat\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ pptp-conntrack-nat\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ rtsp-conntrack\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ quake3-conntrack-nat\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ sip-conntrack-nat\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ip_queue_vwmark\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipp2p\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-01-output-hooks\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-02-input-hooks\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-03-policy-lookup\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-04-policy-checks\r
-       cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ TARPIT\r
-\r
-       #imq-patch\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.28-imq2.diff\r
-       \r
-       #layer7-patch\r
-       cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.1.tar.gz\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.1/kernel-2.4-layer7-2.1.patch\r
-\r
-ifeq "$(EMB)" "1"\r
-       #Emb-patches\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/kbc_option_2420.patch\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/net4801.kernel.patch_2.4.31\r
-endif\r
-\r
-ifeq "$(SMP)" ""\r
-       # Only do this once on the non-SMP pass\r
-       cd $(DIR_SRC) && tar czf $(DIR_DL)/iptables-fixed.tar.gz iptables-1.2.11\r
-endif\r
-\r
-       # Olitec isdn gazel patch\r
-       cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/linux-2.4.23-olitec-isdn.patch\r
-\r
-       # Fix /proc/stat output\r
-       cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/linux-2.4.26-proc-stat.patch\r
-\r
-       # Fix libata-core.c\r
-       # cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/linux-2.4.26-scsi.patch\r
-\r
-       # frandom patch\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.27-frandom-2.patch\r
-\r
-       # Propolice\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.27-ssp-1.patch\r
-\r
-       # Support ppp-2.4.3 multilink behavior (terminate when no channel is connected)\r
-       # need updated libpcap older than 0.8.3\r
-       # cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ppp_generic-ppp-2.4.3_multilink.patch\r
-\r
-       # R8169 clone D-link GSE-528T\r
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.29_r8169clone.patch\r
-\r
-       # Cleanup kernel source\r
-       cd $(DIR_APP) && make mrproper\r
-ifeq "$(ROOT)" ""\r
-ifeq "$(LFS_PASS)" "ipcop"\r
-ifeq "$(SMP)" ""\r
-       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config\r
-endif\r
-ifeq "$(SMP)" "1"\r
-       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config\r
-endif\r
-ifeq "$(SMP)" "installer"\r
-       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).installer $(DIR_APP)/.config\r
-       cd $(DIR_APP) && sed -i -e 's/-O2/-Os/g' Makefile\r
-endif\r
-\r
-       cd $(DIR_APP) && make CC="$(KGCC)" oldconfig\r
-       cd $(DIR_APP) && make CC="$(KGCC)" dep\r
-       cd $(DIR_APP) && make CC="$(KGCC)" clean\r
-       if [ "$(MACHINE)" = "i386" -a "$(EMB)" = "" ]; then \\r
-               cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \\r
-               cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-$(VER); \\r
-               cd $(DIR_APP) && cp System.map /boot/System.map-$(VER); \\r
-               ln -sf vmlinuz-$(VER) /boot/vmlinuz; \\r
-               ln -sf System.map-$(VER) /boot/System.map; \\r
-               cd $(DIR_APP) && make CC="$(KGCC)" modules; \\r
-               cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \\r
-       elif [ "$(MACHINE)" = "i386" -a "$(EMB)" = "1" ]; then \\r
-               cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =/EXTRAVERSION\ =\ -EMB/' Makefile; \\r
-               cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \\r
-               cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-$(VER)-EMB; \\r
-               cd $(DIR_APP) && cp System.map /boot/System.map-$(VER)-EMB; \\r
-               ln -sf vmlinuz-$(VER)-EMB /boot/vmlinuz-EMB; \\r
-               cd $(DIR_APP) && make CC="$(KGCC)" modules; \\r
-               cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \\r
-       elif [ "$(MACHINE)" = "i386" -a "$(EMB)" = "installer" ]; then \\r
-               cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \\r
-               cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-installer; \\r
-       elif [ "$(MACHINE)" = "alpha" ]; then \\r
-               cd $(DIR_APP) && make -j 3 CC="$(KGCC)" vmlinux; \\r
-               cd $(DIR_APP) && gzip -9c vmlinux > /boot/vmlinuz-$(VER); \\r
-               cd $(DIR_APP) && cp System.map /boot/System.map-$(VER); \\r
-               ln -sf vmlinuz-$(VER) /boot/vmlinuz; \\r
-               ln -sf System.map-$(VER) /boot/System.map; \\r
-               cd $(DIR_APP) && make CC="$(KGCC)" modules; \\r
-               cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \\r
-       fi\r
-       # remove symlinked pcmcia directory\r
-ifeq "$(SMP)" ""\r
-       rm -rf /lib/modules/$(VER)/pcmcia\r
-       find /lib/modules/$(VER)/ -name '*.o' -a -type f | xargs gzip -f9\r
-\r
-       # Move these SCSI drivers into same directory for probescsi.sh\r
-       mv -f  /lib/modules/$(VER)/kernel/drivers/scsi/aic7xxx/*     /lib/modules/$(VER)/kernel/drivers/scsi\r
-       rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/aic7xxx\r
-       mv -f  /lib/modules/$(VER)/kernel/drivers/scsi/aacraid/*     /lib/modules/$(VER)/kernel/drivers/scsi\r
-       rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/aacraid\r
-       mv -f  /lib/modules/$(VER)/kernel/drivers/scsi/sym53c8xx_2/* /lib/modules/$(VER)/kernel/drivers/scsi\r
-       rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/sym53c8xx_2\r
-endif\r
-ifeq "$(SMP)" "1"\r
-       rm -rf /lib/modules/$(VER)-smp/pcmcia\r
-       find /lib/modules/$(VER)-smp/ -name '*.o' -a -type f | xargs gzip -f9\r
-\r
-       # Move these SCSI drivers into same directory for probescsi.sh\r
-       mv -f  /lib/modules/$(VER)-smp/kernel/drivers/scsi/aic7xxx/*     /lib/modules/$(VER)-smp/kernel/drivers/scsi\r
-       rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/aic7xxx\r
-       mv -f  /lib/modules/$(VER)-smp/kernel/drivers/scsi/aacraid/*     /lib/modules/$(VER)-smp/kernel/drivers/scsi\r
-       rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/aacraid\r
-       mv -f  /lib/modules/$(VER)-smp/kernel/drivers/scsi/sym53c8xx_2/* /lib/modules/$(VER)-smp/kernel/drivers/scsi\r
-       rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/sym53c8xx_2\r
-endif\r
-\r
-ifeq "$(SMP)" ""\r
-       # Only do this once on the non-SMP pass\r
-       cd $(DIR_APP) && make mandocs\r
-       -mkdir -p /usr/share/man/man9/\r
-       cd $(DIR_APP) && cp -af Documentation/man/* /usr/share/man/man9/\r
-endif\r
-else\r
-       cd $(DIR_APP) && make include/linux/version.h\r
-       cd $(DIR_APP) && make symlinks\r
-       cd $(DIR_APP) && cp -HRf include/asm /usr/include\r
-       cd $(DIR_APP) && cp -Rf include/asm-generic /usr/include\r
-       cd $(DIR_APP) && cp -Rf include/linux /usr/include\r
-       touch /usr/include/linux/autoconf.h\r
-endif\r
-else\r
-       cd $(DIR_APP) && make include/linux/version.h\r
-       cd $(DIR_APP) && make symlinks\r
-       -mkdir -p /tools/include/asm\r
-       cd $(DIR_APP) && cp -f include/asm/* /tools/include/asm\r
-       cd $(DIR_APP) && cp -Rf include/asm-generic /tools/include\r
-       cd $(DIR_APP) && cp -Rf include/linux /tools/include\r
-       cd $(DIR_APP) && touch /tools/include/linux/autoconf.h\r
-endif\r
-       @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables*\r
-       @$(POSTBUILD)\r
+###############################################################################
+# This file is part of the IPCop Firewall.                                    #
+#                                                                             #
+# IPCop 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.                                         #
+#                                                                             #
+# IPCop 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 IPCop; if not, write to the Free Software                        #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
+#                                                                             #
+# Makefiles are based on LFSMake, which is                                    #
+# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 2.6.16
+PATCHLEVEL = 2.6.16.29
+
+THISAPP    = linux-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+CFLAGS     =
+CXXFLAGS   =
+
+# Normal build or SMP build.
+#
+ifeq "$(SMP)" "1"
+       TARGET = $(DIR_INFO)/linux-$(PATCHLEVEL)-ipfire-smp
+else
+       TARGET = $(DIR_INFO)/linux-$(PATCHLEVEL)-ipfire
+endif
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+objects =$(DL_FILE) \
+       openswan-2.4.7.kernel-2.6-natt.patch.gz \
+       openswan-2.4.7.kernel-2.6-klips.patch.gz \
+       iptables-1.3.5.tar.bz2 \
+       patch-o-matic-ng-20061210.tar.bz2 \
+       kbc_option_2420.patch \
+       net4801.kernel.patch_2.4.31 \
+       netfilter-layer7-v2.6.tar.gz \
+       patch-2.6.16-nath323-1.3.bz2 \
+       patch-$(PATCHLEVEL).gz
+
+$(DL_FILE)                                     = $(DL_FROM)/$(DL_FILE)
+patch-$(PATCHLEVEL).gz                 = $(DL_FROM)/patch-$(PATCHLEVEL).gz
+openswan-2.4.7.kernel-2.6-natt.patch.gz        = $(URL_IPFIRE)/openswan-2.4.7.kernel-2.6-natt.patch.gz
+openswan-2.4.7.kernel-2.6-klips.patch.gz       = $(URL_IPFIRE)/openswan-2.4.7.kernel-2.6-klips.patch.gz
+patch-o-matic-ng-20061210.tar.bz2      = $(URL_IPFIRE)/patch-o-matic-ng-20061210.tar.bz2
+iptables-1.3.5.tar.bz2                 = $(URL_IPFIRE)/iptables-1.3.5.tar.bz2
+kbc_option_2420.patch                  = $(URL_IPFIRE)/kbc_option_2420.patch
+net4801.kernel.patch_2.4.31                    = $(URL_IPFIRE)/net4801.kernel.patch_2.4.31
+netfilter-layer7-v2.6.tar.gz           = $(URL_IPFIRE)/netfilter-layer7-v2.6.tar.gz
+patch-2.6.16-nath323-1.3.bz2           = $(URL_IPFIRE)/patch-2.6.16-nath323-1.3.bz2
+
+$(DL_FILE)_MD5                                 = 50695965725367f39007023feac5e256
+patch-$(PATCHLEVEL).gz_MD5                             = 1355ebc25ea57df398d20e1c1726ec9b
+openswan-2.4.7.kernel-2.6-natt.patch.gz_MD5    = 980d8bbdb29a761b7f5aa852f373df62
+openswan-2.4.7.kernel-2.6-klips.patch.gz_MD5   = 5df0ffa2453488a407a23fc4ea4af879
+patch-o-matic-ng-20061210.tar.bz2_MD5          = 76edac76301b45f89e467b41c8cf4393
+iptables-1.3.5.tar.bz2_MD5                             = 00fb916fa8040ca992a5ace56d905ea5
+kbc_option_2420.patch_MD5                              = 6d37870344f7fcf97ace1fbf43323c60
+net4801.kernel.patch_2.4.31_MD5                        = c7d64e3caedb2f2b10e1c11db7f73a04
+netfilter-layer7-v2.6.tar.gz_MD5                       = 58135cd1aafaf4ae2fa478159206f064
+patch-2.6.16-nath323-1.3.bz2_MD5                       = f926409ff703a307baf54b57ab75d138
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) $(DIR_SRC)/linux && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       ln -s linux-$(VER) /usr/src/linux
+
+       # Update kernel to latest patchlevel
+       cd $(DIR_APP) && zcat $(DIR_DL)/patch-$(PATCHLEVEL).gz | patch -p1
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.16.27-utf8_input-1.patch
+       # Remove patch level in EXTRAVERSION.
+       # We want to avoid the need to supply a full kernel
+       # (installed in a different place) if only one part could be updated
+       cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =/' Makefile
+       cd $(DIR_APP) && sed -i -e 's/-Werror//' drivers/scsi/aic7xxx/Makefile
+       cd $(DIR_APP) && sed -i -e 's/gettext//' scripts/kconfig/lkc.h
+
+       # Openswan 2
+       cd $(DIR_SRC) && rm -rf openswan-*
+       cd $(DIR_SRC) && tar xfz $(DIR_DL)/openswan-2.4.7.tar.gz
+       cd $(DIR_APP) && gzip -dc $(DIR_DL)/openswan-2.4.7.kernel-2.6-natt.patch.gz | patch -Np1
+       cd $(DIR_APP) && gzip -dc $(DIR_DL)/openswan-2.4.7.kernel-2.6-klips.patch.gz | patch -Np1
+       cd $(DIR_SRC)/openswan-* && sed -i -e 's/INC_USRLOCAL=\/usr\/local/INC_USRLOCAL=\/usr/' Makefile.inc
+
+       # H323 conntrack
+       cd $(DIR_APP) && bunzip2 -cd $(DIR_DL)/patch-2.6.16-nath323-1.3.bz2 | patch -Np1
+
+       # SquashFS
+       cd $(DIR_SRC) && rm -rf squashfs*
+       cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.0.tar.gz
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.0/linux-2.6.15/squashfs3.0-patch
+
+       # Patch-o-matic
+       cd $(DIR_SRC) && rm -rf iptables-*
+       cd $(DIR_SRC) && tar xfj $(DIR_DL)/iptables-1.3.5.tar.bz2
+       cd $(DIR_SRC) && ln -sf iptables-1.3.5 iptables
+       cd $(DIR_SRC) && rm -rf patch-o-matic*
+       cd $(DIR_SRC) && tar xfj $(DIR_DL)/patch-o-matic-ng-20061210.tar.bz2
+       cd $(DIR_SRC)/patch-o-matic-ng* && \
+               ./runme --batch --kernel-path=$(ROOT)/usr/src/$(THISAPP)/ --iptables-path=$(ROOT)/usr/src/iptables/ \
+                       TARPIT sip-conntrack-nat rtsp-conntrack-nat \
+                       mms-conntrack-nat #quake3-conntrack-nat
+
+       # Layer7-patch
+       cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.6.tar.gz
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.6/for_older_kernels/kernel-2.6.13-2.6.16-layer7-2.2.patch
+
+       # ip_conntrack permissions from 440 to 444
+       cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/ip_conntrack_standalone-patch-for-ipfire.patch
+
+ifeq "$(SMP)" ""
+       # Only do this once on the non-SMP pass
+       cd $(DIR_SRC) && tar czf $(DIR_DL)/iptables-fixed.tar.gz iptables-1.3.5
+endif
+
+       # Bootsplash
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bootsplash-3.1.6-2.6.15.diff
+
+       # Cleanup kernel source
+       cd $(DIR_APP) && make mrproper
+
+ifeq "$(SMP)" ""
+       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
+endif
+ifeq "$(SMP)" "1"
+       cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config
+endif
+
+       cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
+       cd $(DIR_APP) && make CC="$(KGCC)" clean
+       if [ "$(SMP)" = "" ]; then \
+               cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage; \
+               cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER); \
+               cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER); \
+               cd $(DIR_APP) && cp -v .config /boot/config-$(VER); \
+               ln -sf vmlinuz-$(VER) /boot/vmlinuz; \
+               ln -sf System.map-$(VER) /boot/System.map; \
+               cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules; \
+               cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install; \
+               cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) module; \
+               cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) minstall; \
+       elif [ "$(SMP)" = "1" ]; then \
+               cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =/EXTRAVERSION\ =\ -smp/' Makefile; \
+               cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage; \
+               cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-smp; \
+               cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-smp; \
+               cd $(DIR_APP) && cp -v .config /boot/config-$(VER); \
+               ln -sf vmlinuz-$(VER)-smp /boot/vmlinuz-smp; \
+               cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules; \
+               cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install; \
+               cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) module; \
+               cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) minstall; \
+       fi
+
+       # remove symlinked pcmcia directory
+ifeq "$(SMP)" ""
+       rm -rf /lib/modules/$(VER)/pcmcia
+endif
+ifeq "$(SMP)" "1"
+       rm -rf /lib/modules/$(VER)-smp/pcmcia
+endif
+       @rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs*
+       @$(POSTBUILD)