]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - lfs/asterisk
HinzugefĆ¼gt:
[people/teissler/ipfire-2.x.git] / lfs / asterisk
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 ###############################################################################
22
23 ###############################################################################
24 # Definitions
25 ###############################################################################
26
27 include Config
28
29 VER = 1.2.7.1
30
31 THISAPP = asterisk-$(VER)
32 DL_FILE = $(THISAPP).tar.gz
33 DL_FROM = http://www.asterisk-support.de/mirror/asterisk-1.2.7.1
34 DIR_APP = $(DIR_SRC)/$(THISAPP)
35 TARGET = $(DIR_INFO)/$(THISAPP)
36
37 ASTERISK = $(THISAPP)
38 ZAPTEL = zaptel-1.2.5
39 BRISTUFF = bristuff-0.3.0-PRE-1o
40 LIBPRI = libpri-1.2.2
41 SPANDSP = spandsp-0.0.2pre25
42 OH323 = asterisk-oh323-0.7.3
43
44 ###############################################################################
45 # Top-level Rules
46 ###############################################################################
47
48 objects = $(DL_FILE) \
49 $(ZAPTEL).tar.gz \
50 $(BRISTUFF).tar.gz \
51 $(LIBPRI).tar.gz \
52 $(OH323).tar.gz \
53 app_rxfax.c \
54 app_txfax.c \
55 apps_Makefile.patch
56
57 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
58 $(ZAPTEL).tar.gz = http://www.asterisk-support.de/mirror/zaptel/$(ZAPTEL).tar.gz
59 $(BRISTUFF).tar.gz = http://www.junghanns.net/downloads/$(BRISTUFF).tar.gz
60 $(LIBPRI).tar.gz = http://www.asterisk-support.de/mirror/libpri/$(LIBPRI).tar.gz
61 app_rxfax.c = http://soft-switch.org/downloads/spandsp/$(SPANDSP)/asterisk-1.2.x/app_rxfax.c
62 app_txfax.c = http://soft-switch.org/downloads/spandsp/$(SPANDSP)/asterisk-1.2.x/app_txfax.c
63 apps_Makefile.patch = http://soft-switch.org/downloads/spandsp/$(SPANDSP)/asterisk-1.2.x/apps_Makefile.patch
64 $(OH323).tar.gz = http://www.inaccessnetworks.com/projects/asterisk-oh323/download/$(OH323).tar.gz
65
66 $(DL_FILE)_MD5 = 5c4b473eee2fbc2cb9e346f0564ef970
67 $(ZAPTEL).tar.gz_MD5 = 8c8561259d29a314aa5a076050124697
68 $(BRISTUFF).tar.gz_MD5 = 93bb8a5661aaf3022cf4a102ea061f83
69 $(LIBPRI).tar.gz_MD5 = efce9c3699110588df5e4cf09eae01d9
70 app_rxfax.c_MD5 = ab6983b51c412883545b36993d704999
71 app_txfax.c_MD5 = 8c8fcb263b76897022b4c28052a7b439
72 apps_Makefile.patch_MD5 = 6b0faa7a7cf8613962b17c23ee5a1583
73 $(OH323).tar.gz_MD5 = 66dc098a20ac11f098edbbaed307c085
74
75 install : $(TARGET)
76
77 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
78
79 download :$(patsubst %,$(DIR_DL)/%,$(objects))
80
81 md5 : $(subst %,%_MD5,$(objects))
82
83 dist:
84 make-packages.sh asterisk $(THISAPP)
85
86 ###############################################################################
87 # Downloading, checking, md5sum
88 ###############################################################################
89
90 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
91 @$(CHECK)
92
93 $(patsubst %,$(DIR_DL)/%,$(objects)) :
94 @$(LOAD)
95
96 $(subst %,%_MD5,$(objects)) :
97 @$(MD5)
98
99 ###############################################################################
100 # Installation Details
101 ###############################################################################
102
103 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
104 @$(PREBUILD)
105 @rm -rf $(DIR_SRC)/$(BRISTUFF)
106 # Decompress the source-code
107 cd $(DIR_SRC) && \
108 tar zxf $(DIR_DL)/$(BRISTUFF).tar.gz -C $(DIR_SRC) && \
109 cd $(DIR_SRC)/$(BRISTUFF) && \
110 tar xfz $(DIR_DL)/$(ZAPTEL).tar.gz && \
111 tar xfz $(DIR_DL)/$(LIBPRI).tar.gz && \
112 tar xfz $(DIR_DL)/$(ASTERISK).tar.gz && \
113 tar xfz $(DIR_DL)/$(OH323).tar.gz
114
115 # Build Zaptel
116 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && \
117 patch -Np1 < $(DIR_SRC)/src/patches/zaptel.patch && \
118 make clean && \
119 make all KVERS=$(KVER)-smp && \
120 make install KVERS=$(KVER)-smp && \
121 make clean && \
122 make all KVERS=$(KVER) && \
123 make install KVERS=$(KVER)
124 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 zaptel.h /usr/include/linux/zaptel.h
125 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 zconfig.h /usr/include/linux/zconfig.h
126 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 ecdis.h /usr/include/linux/ecdis.h
127 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 fasthdlc.h /usr/include/linux/fasthdlc.h
128 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 kb1ec.h /usr/include/linux/kb1ec.h
129 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 kb1ec_const.h /usr/include/linux/kb1ec_const.h
130 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 biquad.h /usr/include/linux/biquad.h
131 cd $(DIR_SRC)/$(BRISTUFF)/$(ZAPTEL) && install -D -m 644 arith.h /usr/include/linux/arith.h
132 ln -nf -v /usr/include/linux/zaptel.h /usr/include/zaptel.h
133 ln -nf -v /usr/include/linux/zconfig.h /usr/include/zconfig.h
134 ln -nf -v /usr/include/linux/ecdis.h /usr/include/ecdis.h
135 ln -nf -v /usr/include/linux/fasthdlc.h /usr/include/fasthdlc.h
136 ln -nf -v /usr/include/linux/kb1ec.h /usr/include/kb1ec.h
137 ln -nf -v /usr/include/linux/kb1ec_const.h /usr/include/kb1ec_const.h
138 ln -nf -v /usr/include/linux/biquad.h /usr/include/biquad.h
139 ln -nf -v /usr/include/linux/arith.h /usr/include/arith.h
140
141 # Build Libpri
142 cd $(DIR_SRC)/$(BRISTUFF)/$(LIBPRI) && \
143 patch -Np1 < $(DIR_SRC)/src/patches/libpri.patch && \
144 make clean all KVERS=$(KVER) && \
145 make install KVERS=$(KVER)
146
147 # Build libgsmat
148 cd $(DIR_SRC)/$(BRISTUFF)/libgsmat-0.0.1 && \
149 make clean all && \
150 make install
151
152 # Build uno/duo/quad GSM PCI driver
153 cd $(DIR_SRC)/$(BRISTUFF)/ztgsm && \
154 make clean linux24 && \
155 install -D -m 644 ztgsm.o /lib/modules/$(KVER)/misc/ztgsm.o
156
157 # Build qozap
158 cd $(DIR_SRC)/$(BRISTUFF)/qozap && \
159 make clean linux24 && \
160 install -D -m 644 qozap.o /lib/modules/$(KVER)/misc/qozap.o
161
162 # Build cwain
163 cd $(DIR_SRC)/$(BRISTUFF)/cwain && \
164 make clean linux24 && \
165 install -D -m 644 cwain.o /lib/modules/$(KVER)/misc/cwain.o
166
167 # Build zaphfc
168 cd $(DIR_SRC)/$(BRISTUFF)/zaphfc && \
169 patch -Np1 < $(DIR_SRC)/src/patches/zaphfc_0.3.0-PRE-1o_florz-12.diff && \
170 cd $(DIR_SRC)/$(BRISTUFF)/zaphfc && make clean linux24 && \
171 install -D -m 644 zaphfc.o /lib/modules/$(KVER)/misc/zaphfc.o
172
173 # Build Asterisk
174 cd $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK) && patch -Np1 < $(DIR_SRC)/src/patches/asterisk.patch
175 ### FAX geht noch nicht mit Asterisk 1.2.7.1
176 # cp -fv $(DIR_DL)/app_{r,t}xfax.c $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK)/apps && \
177 # cd $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK)/apps && patch < $(DIR_DL)/apps_Makefile.patch
178 cd $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK) && make clean
179 cd $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK) && make all
180 cd $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK) && make install
181 cd $(DIR_SRC)/$(BRISTUFF)/$(ASTERISK) && make samples
182
183 # Build OH323
184 cd $(DIR_SRC)/$(BRISTUFF)/$(OH323) && \
185 make ASTERISKINCDIR=$(DIR_SRC)/$(BRISTUFF)/$(ASTERISK)/include OH323WRAPLIBDIR=/usr/lib && \
186 make install ASTERISKINCDIR=$(DIR_SRC)/$(BRISTUFF)/$(ASTERISK)/include OH323WRAPLIBDIR=/usr/lib
187 @rm -rf $(DIR_SRC)/$(BRISTUFF) ## Do not delete any more cause to save time on a recompile: $(DIR_SRC)/{pwlib,openh323}
188 @$(POSTBUILD)
189