]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/fcdsl2
Calamaris-Proxy-Logdatei-Analyzer eingebaut.
[people/pmueller/ipfire-2.x.git] / lfs / fcdsl2
1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
3 # #
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. #
8 # #
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. #
13 # #
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 #
17 # #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20 # #
21 # Modifications by: #
22 # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23 # - Modified Makefile for IPCop build #
24 # #
25 # $Id: fcdsl2,v 1.9 2006/04/30 23:15:05 chepati Exp $
26 # #
27 ###############################################################################
28
29 ###############################################################################
30 # Definitions
31 ###############################################################################
32
33 include Config
34
35 VER = suse93-3.11-07
36
37 THISAPP = fcdsl2-$(VER)
38 DL_FILE = $(THISAPP).tar.gz
39 DL_FROM = $(URL_IPFIRE)
40 DIR_APP = $(DIR_SRC)/fritz
41
42 ifeq "$(SMP)" ""
43 TARGET = $(DIR_INFO)/$(THISAPP)
44 else
45 TARGET = $(DIR_INFO)/$(THISAPP)-smp
46 endif
47
48 ###############################################################################
49 # Top-level Rules
50 ###############################################################################
51
52 objects = $(DL_FILE)
53
54 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
55
56 $(DL_FILE)_MD5 = ba368e577418e181cffa7c69f960a8eb
57
58 install : $(TARGET)
59
60 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
61
62 download :$(patsubst %,$(DIR_DL)/%,$(objects))
63
64 md5 : $(subst %,%_MD5,$(objects))
65
66 ###############################################################################
67 # Downloading, checking, md5sum
68 ###############################################################################
69
70 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
71 @$(CHECK)
72
73 $(patsubst %,$(DIR_DL)/%,$(objects)) :
74 @$(LOAD)
75
76 $(subst %,%_MD5,$(objects)) :
77 @$(MD5)
78
79 ###############################################################################
80 # Installation Details
81 ###############################################################################
82
83 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
84 @$(PREBUILD)
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
88 ifeq "$(SMP)" ""
89 cd $(DIR_APP) && sed -i \
90 -e 's/$$(shell uname -m)/$(MACHINE)/' \
91 -e 's/$$(shell uname -r)/$(KVER)-ipfire/' \
92 -e 's/`uname -r`/$(KVER)-ipfire/' \
93 -e 's/^\(CCFLAGS.*\)$$/\1 \\/' \
94 -e '\+^CCFLAGS+a\ \
95 -include \$$(KRNLINCL)/config/modversions.h' \
96 -e '/^DEFINES/a\ \
97 -DMODVERSIONS \\' src/Makefile
98 cd $(DIR_APP) && sed -i -e 's/$$(shell uname -r)/$(KVER)-ipfire/' Makefile
99 else
100 cd $(DIR_APP) && sed -i \
101 -e 's/$$(shell uname -m)/$(MACHINE)/' \
102 -e 's/$$(shell uname -r)/$(KVER)-ipfire-smp/' \
103 -e 's/`uname -r`/$(KVER)-ipfire-smp/' \
104 -e 's/^\(CCFLAGS.*\)$$/\1 \\/' \
105 -e '\+^CCFLAGS+a\ \
106 -include \$$(KRNLINCL)/config/modversions.h' \
107 -e '/^DEFINES/a\ \
108 -DMODVERSIONS \\' src/Makefile
109 cd $(DIR_APP) && sed -i -e 's/$$(shell uname -r)/$(KVER)-ipfire-smp/' Makefile
110 endif
111 cd $(DIR_APP) && make CC=$(CC)
112 cd $(DIR_APP) && make CC=$(CC) install
113
114 ifeq "$(SMP)" ""
115 -mkdir /usr/lib/isdn
116 cd $(DIR_APP) && install -m 0644 fds2base.bin /usr/lib/isdn
117 -mkdir /etc/fcdsl
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
123 endif
124 @rm -rf $(DIR_APP)
125 @$(POSTBUILD)