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 ###############################################################################
30 THISAPP = $(PKG_NAME)-$(VER)
31 DL_FILE = $(THISAPP).tar.bz2
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
34 TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
36 XMLPARSER = XML-Parser-2.34
38 ###############################################################################
40 ###############################################################################
42 objects = $(DL_FILE) $(THISAPP)-libc-2.patch $(XMLPARSER).tar.gz \
43 $(THISAPP)-asm-page-h-compile-failure.patch
52 ###############################################################################
53 # Installation Details
54 ###############################################################################
56 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
58 @rm -rf $(DIR_APP) $(DIR_SRC)/$(XMLPARSER) && \
59 cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
61 ifeq "$(STAGE)" "toolchain"
62 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-libc-2.patch
63 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-asm-page-h-compile-failure.patch
64 cd $(DIR_APP) && mv -v makedepend.SH{,.orig}
65 cd $(DIR_APP) && sed 's/command /command[ -]/' makedepend.SH.orig > makedepend.SH
67 cd $(DIR_APP) && ./configure.gnu --prefix=$(TOOLS_DIR) -Dstatic_ext='Data/Dumper Fcntl IO POSIX'
69 cd $(DIR_APP) && make perl utilities ext/Errno/pm_to_blib $(PARALLELISMFLAGS)
71 cd $(DIR_APP) && cp -v perl pod/pod2man $(TOOLS_DIR)/bin
72 -mkdir -pv $(TOOLS_DIR)/lib/perl5/$(VER)
73 cd $(DIR_APP) && cp -Rv lib/* $(TOOLS_DIR)/lib/perl5/$(VER)
76 ifeq "$(STAGE)" "base"
77 echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
79 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-asm-page-h-compile-failure.patch
81 cd $(DIR_APP) && sed -i 's/command /command[ -]/' makedepend.SH
82 cd $(DIR_APP) && ./configure.gnu --prefix=/usr \
83 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 \
84 -Dpager="/usr/bin/less -isR"
86 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
87 cd $(DIR_APP) && make install
92 ifeq "$(STAGE)" "ipfire"
93 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(XMLPARSER).tar.gz
94 cd $(DIR_SRC)/$(XMLPARSER) && perl Makefile.PL
95 cd $(DIR_SRC)/$(XMLPARSER) && make
96 cd $(DIR_SRC)/$(XMLPARSER) && make install
99 @rm -rf $(DIR_APP) $(DIR_SRC)/$(XMLPARSER)