Files
bpfire/lfs/linux
ms 76ed51e8f6 OpenSwan RC nach den Vorgaben von "affect" installiert.
Zurueck zu ReiserFS, da wir mit Reiser4 noch ein paar Probleme haben und wir die Prioritaeten noch auf andere Sachen legen muessen. :'(


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@445 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-03-11 20:09:05 +00:00

205 lines
8.6 KiB
Plaintext

###############################################################################
# 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
PATCHLEVEL = .42
VER = 2.6.16.42
THISAPP = linux-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
CFLAGS =
CXXFLAGS =
# Normal build or SMP build.
#
ifeq "$(SMP)" "1"
TARGET = $(DIR_INFO)/linux-$(VER)-smp
else
TARGET = $(DIR_INFO)/linux-$(VER)
endif
###############################################################################
# Top-level Rules
###############################################################################
objects =$(DL_FILE) \
mISDN-CVS-2007-01-26.tar.bz2 \
squashfs3.2-r2.tar.gz \
iptables-1.3.7.tar.bz2 \
patch-o-matic-ng-20061210.tar.bz2 \
netfilter-layer7-v2.9.tar.gz \
patch-2.6.16-nath323-1.3.bz2
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
patch-o-matic-ng-20061210.tar.bz2 = $(URL_IPFIRE)/patch-o-matic-ng-20061210.tar.bz2
iptables-1.3.7.tar.bz2 = $(URL_IPFIRE)/iptables-1.3.7.tar.bz2
netfilter-layer7-v2.9.tar.gz = $(URL_IPFIRE)/netfilter-layer7-v2.9.tar.gz
patch-2.6.16-nath323-1.3.bz2 = $(URL_IPFIRE)/patch-2.6.16-nath323-1.3.bz2
squashfs3.2-r2.tar.gz = $(URL_IPFIRE)/squashfs3.2-r2.tar.gz
mISDN-CVS-2007-01-26.tar.bz2 = $(URL_IPFIRE)/mISDN-CVS-2007-01-26.tar.bz2
$(DL_FILE)_MD5 = 87e998bb87839b962702815dd5aecc73
patch-o-matic-ng-20061210.tar.bz2_MD5 = 76edac76301b45f89e467b41c8cf4393
iptables-1.3.7.tar.bz2_MD5 = dd965bdacbb86ce2a6498829fddda6b7
netfilter-layer7-v2.9.tar.gz_MD5 = ebf9043a5352ebe6dbd721989ef83dee
patch-2.6.16-nath323-1.3.bz2_MD5 = f926409ff703a307baf54b57ab75d138
squashfs3.2-r2.tar.gz_MD5 = bf360b92eba9e6d5610196ce2e02fcd1
mISDN-CVS-2007-01-26.tar.bz2_MD5 = 844c70dc851faffcae7549fd738c7b49
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 jxf $(DIR_DL)/$(DL_FILE)
ln -s linux-$(VER) /usr/src/linux
# Openswan 2
cd $(DIR_SRC) && rm -rf openswan-*
cd $(DIR_SRC) && tar xfvz $(DIR_DL)/openswan-2.4.8rc1.tar.gz
#cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openswan26_netkey.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openswan-2.4.8rc1.kernel-2.6-natt.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openswan-2.4.8rc1.kernel-2.6-klips.patch
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
# Reiser4
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/reiser4-for-2.6.16-5.patch
# SquashFS
cd $(DIR_SRC) && rm -rf squashfs*
cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.2-r2.tar.gz
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.2-r2/kernel-patches/linux-2.6.16/squashfs3.2-patch
# Patch-o-matic
cd $(DIR_SRC) && rm -rf iptables-* patch-o-matic*
cd $(DIR_SRC) && tar xfj $(DIR_DL)/iptables-1.3.7.tar.bz2
cd $(DIR_SRC) && ln -sf iptables-1.3.7 iptables
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/ \
sip-conntrack-nat rtsp-conntrack-nat \
mms-conntrack-nat
# Layer7-patch
cd $(DIR_SRC) && rm -rf $(DIR_SRC)/netfilter-layer7-v2.9
cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.9.tar.gz
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.9/for_older_kernels/kernel-2.6.13-2.6.16-layer7-2.2.patch
# Linux Intermediate Queueing Device
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.16-imq2.diff
# ip_conntrack permissions from 440 to 444
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/ip_conntrack_standalone-patch-for-ipfire.patch
# mISDN
cd $(DIR_SRC) && rm -rf mISDN-*
cd $(DIR_SRC) && tar xfj $(DIR_DL)/mISDN-CVS-2007-01-26.tar.bz2
cd $(DIR_SRC)/mISDN-CVS-2007-01-26 && yes 'yes' | ./std2kern -k /usr/src/linux
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.7
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
ifeq "$(SMP)" "1"
cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire-smp/' Makefile
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire-smp
cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire-smp
cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-ipfire
ln -sf vmlinuz-$(VER)-ipfire-smp /boot/vmlinuz-ipfire-smp
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
mkdir -p /usr/src/openswan-2.4.8rc1/modobj26/null
cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) module
cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) minstall
else
cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-ipfire/' Makefile
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-ipfire
cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-ipfire
cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-ipfire
ln -sf vmlinuz-$(VER)-ipfire /boot/vmlinuz-ipfire
ln -sf System.map-$(VER)-ipfire /boot/System.map-ipfire
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules
cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install
mkdir -p /usr/src/openswan-2.4.8rc1/modobj26/null
cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) module
cd $(DIR_SRC)/openswan-* && make KERNELSRC=/usr/src/$(THISAPP) CC=$(CC) minstall
endif
# remove symlinked pcmcia directory
-rm -rf /lib/modules/$(VER)-ipfire{,-smp}/pcmcia
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/mISDN-* $(DIR_SRC)/netfilter-layer7-*
@$(POSTBUILD)