1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
36 DL_FILE = dahdi-linux-$(VER)-with-vpmadt032-1.17.0.tar.gz
37 DL_FILE1 = dahdi-tools-$(TVER).tar.gz
39 THISAPP = dahdi-$(VER)
40 DL_FROM = $(URL_IPFIRE)
41 DIR_APP = $(DIR_SRC)/dahdi-linux-$(VER)
42 DIR_APP1 = $(DIR_SRC)/dahdi-tools-$(TVER)
51 TARGET = $(DIR_INFO)/$(THISAPP)-kmod-$(KVER)-$(VERSUFIX)
53 TARGET = $(DIR_INFO)/$(THISAPP)
57 ###############################################################################
59 ###############################################################################
61 objects = $(DL_FILE) $(DL_FILE1)
63 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
64 $(DL_FILE1) = $(DL_FROM)/$(DL_FILE1)
66 $(DL_FILE)_MD5 = 5cbabd47cf780305e2cba6ccec42c754
67 $(DL_FILE1)_MD5 = a018f452f3851a312ff51705ac44de37
71 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
73 download :$(patsubst %,$(DIR_DL)/%,$(objects))
75 md5 : $(subst %,%_MD5,$(objects))
80 ###############################################################################
81 # Downloading, checking, md5sum
82 ###############################################################################
84 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
87 $(patsubst %,$(DIR_DL)/%,$(objects)) :
90 $(subst %,%_MD5,$(objects)) :
93 ###############################################################################
94 # Installation Details
95 ###############################################################################
97 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
101 rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
102 cd $(DIR_APP) && make $(MAKETUNING) clean all KVERS=$(KVER)
103 cd $(DIR_APP) && make install-modules KVERS=$(KVER)-$(VERSUFIX)
106 rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
107 cd $(DIR_APP) && make $(MAKETUNING) clean all KVERS=$(KVER)
108 cd $(DIR_APP) && make install-devices install-include \
109 install-firmware install-xpp-firm KVERS=$(KVER)-$(VERSUFIX)
112 # remove previous generated symlink (if this a rebuild)
115 rm -rf $(DIR_APP1) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE1)
116 cd $(DIR_APP1) && ./configure --sysconfdir=/var/ipfire/asterisk
117 cd $(DIR_APP1) && make $(MAKETUNING) clean all
118 cd $(DIR_APP1) && make install
120 # Supress Error output because this erase the log
121 cd $(DIR_APP1) && make config 2>/dev/null
127 ln -sf ../init.d/dahdi /etc/rc.d/rc0.d/K30dahdi
128 ln -sf ../init.d/dahdi /etc/rc.d/rc6.d/K30dahdi
129 ln -sf ../init.d/dahdi /etc/rc.d/rc3.d/S15dahdi
130 mv -f /etc/dahdi/genconf_parameters /var/ipfire/asterisk/dahdi/
131 mv -f /etc/dahdi/init.conf /var/ipfire/asterisk/dahdi/
132 mv -f /etc/dahdi/modules /var/ipfire/asterisk/dahdi/
134 ln -s /var/ipfire/asterisk/dahdi /etc/dahdi
136 # make init.d-script work with ipfire
137 sed s/system=redhat/system=debian/ /etc/init.d/dahdi > /tmp/dahdi-temp
138 mv /tmp/dahdi-temp /etc/init.d/dahdi && chmod 755 /etc/init.d/dahdi
140 # add dummy-module (to get conference rooms work)
141 echo "#Dummy" >> /etc/dahdi/modules
142 echo "dahdi_dummy" >> /etc/dahdi/modules