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