1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
4 # IPCop is free software; you can redistribute it and/or modify #
5 # it under the terms of the GNU General Public License as published by #
6 # the Free Software Foundation; either version 2 of the License, or #
7 # (at your option) any later version. #
9 # IPCop is distributed in the hope that it will be useful, #
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12 # GNU General Public License for more details. #
14 # You should have received a copy of the GNU General Public License #
15 # along with IPCop; if not, write to the Free Software #
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
22 # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23 # - Modified Makefile for IPCop build #
25 # $Id: fcdsl2,v 1.9 2006/04/30 23:15:05 chepati Exp $
27 ###############################################################################
29 ###############################################################################
31 ###############################################################################
37 THISAPP = fcdsl2-$(VER)
38 DL_FILE = $(THISAPP).tar.gz
39 DL_FROM = $(URL_IPFIRE)
40 DIR_APP = $(DIR_SRC)/fritz
43 TARGET = $(DIR_INFO)/$(THISAPP)
45 TARGET = $(DIR_INFO)/$(THISAPP)-smp
48 ###############################################################################
50 ###############################################################################
54 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
56 $(DL_FILE)_MD5 = ba368e577418e181cffa7c69f960a8eb
60 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
62 download :$(patsubst %,$(DIR_DL)/%,$(objects))
64 md5 : $(subst %,%_MD5,$(objects))
66 ###############################################################################
67 # Downloading, checking, md5sum
68 ###############################################################################
70 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
73 $(patsubst %,$(DIR_DL)/%,$(objects)) :
76 $(subst %,%_MD5,$(objects)) :
79 ###############################################################################
80 # Installation Details
81 ###############################################################################
83 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
85 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
86 cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/fritz-dsl-gcc-4-fix.patch
87 #cd $(DIR_APP)/src && patch -Np2 < $(DIR_SRC)/src/patches/fcdslx-irqreturn.patch
89 cd $(DIR_APP) && sed -i \
90 -e 's/$$(shell uname -m)/$(MACHINE)/' \
91 -e 's/$$(shell uname -r)/$(KVER)/' \
92 -e 's/`uname -r`/$(KVER)/' \
93 -e 's/^\(CCFLAGS.*\)$$/\1 \\/' \
95 -include \$$(KRNLINCL)/config/modversions.h' \
97 -DMODVERSIONS \\' src/Makefile
98 cd $(DIR_APP) && sed -i -e 's/$$(shell uname -r)/$(KVER)/' Makefile
100 cd $(DIR_APP) && sed -i \
101 -e 's/$$(shell uname -m)/$(MACHINE)/' \
102 -e 's/$$(shell uname -r)/$(KVER)-smp/' \
103 -e 's/`uname -r`/$(KVER)-smp/' \
104 -e 's/^\(CCFLAGS.*\)$$/\1 \\/' \
106 -include \$$(KRNLINCL)/config/modversions.h' \
108 -DMODVERSIONS \\' src/Makefile
109 cd $(DIR_APP) && sed -i -e 's/$$(shell uname -r)/$(KVER)-smp/' Makefile
111 cd $(DIR_APP) && make CC=$(CC)
112 cd $(DIR_APP) && make CC=$(CC) install
116 cd $(DIR_APP) && install -m 0644 fds2base.bin /usr/lib/isdn
118 echo "# card file proto io irq mem cardnr options" > /etc/fcdsl/fcdsl2.conf
119 echo "fcdsl2 fds2base.bin - - - - -" >> /etc/fcdsl/fcdsl2.conf
120 -mkdir /etc/drdsl # install drdsl.ini from a 3.11.4 version as it has more lines than previous versions
121 cd $(DIR_APP) && install -m 0644 drdsl.ini /etc/drdsl
122 cd $(DIR_APP) && install -m 0755 drdsl /etc/drdsl