~vcs-imports/ipfire/ipfire-2.x

2 by ipfire
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: perl,v 1.9.2.13 2005/02/27 15:23:03 gespinasse Exp $
26
#                                                                             #
27
###############################################################################
28
29
###############################################################################
30
# Definitions
31
###############################################################################
32
33
include Config
34
35
VER        = 5.8.5
36
37
THISAPP    = perl-$(VER)
38
DL_FILE    = $(THISAPP).tar.gz
39
DL_FROM    = http://www.cpan.org/src
40
DIR_APP    = $(DIR_SRC)/$(THISAPP)
41
42
# Normal build or /tools build.
43
#
44
ifeq "$(ROOT)" ""
45
  TARGET = $(DIR_INFO)/$(THISAPP)
46
else
47
  TARGET = $(DIR_INFO)/$(THISAPP)-tools
48
endif
49
50
###############################################################################
51
# Top-level Rules
52
###############################################################################
53
54
objects = $(DL_FILE) perl-5.8.4-libc-1.patch
55
56
$(DL_FILE)                  = $(DL_FROM)/$(DL_FILE)
57
perl-5.8.4-libc-1.patch     = $(URL_LFS)/perl/perl-5.8.4-libc-1.patch
58
59
$(DL_FILE)_MD5              = 49baa8d7d29b4a9713c06edeb81e6b1b
60
perl-5.8.4-libc-1.patch_MD5 = f033161efa8b4b174ec6667e4e739efa
61
62
install : $(TARGET)
63
64
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
65
66
download :$(patsubst %,$(DIR_DL)/%,$(objects))
67
68
md5 : $(subst %,%_MD5,$(objects))
69
70
###############################################################################
71
# Downloading, checking, md5sum
72
###############################################################################
73
74
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
75
	@$(CHECK)
76
77
$(patsubst %,$(DIR_DL)/%,$(objects)) :
78
	@$(LOAD)
79
80
$(subst %,%_MD5,$(objects)) :
81
	@$(MD5)
82
83
###############################################################################
84
# Installation Details
85
###############################################################################
86
87
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
88
	@$(PREBUILD)
89
	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
90
	cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/perl-5.8.4-libc-1.patch
91
	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/perl.patch
92
	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/perl-5.8.5-perlio_debug_security.patch
93
	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/perl-5.8.5-tempfiles.patch
94
ifeq "$(ROOT)" ""
95
	cd $(DIR_APP) && ./configure.gnu --prefix=/usr -Dpager="/bin/less -isR" -Dd_dosuid -Ui_db -Ui_gdbm -Ui_ndbm -Ui_dbm -Dmyhostname=localhost
96
	cd $(DIR_APP) && make depend
97
	cd $(DIR_APP) && make
98
	cd $(DIR_APP) && make install
99
else
100
	cd $(DIR_APP) && ./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl POSIX' -Dd_dosuid -Ui_db -Ui_gdbm -Ui_ndbm -Ui_dbm -Dmyhostname=localhost
101
	cd $(DIR_APP) && make depend
102
	cd $(DIR_APP) && make 
103
	cd $(DIR_APP) && cp -f perl pod/pod2man /tools/bin
104
	-mkdir -p /tools/lib/perl5/$(VER)
105
	cd $(DIR_APP) && cp -Rf lib/* /tools/lib/perl5/$(VER)
106
endif
107
	@rm -rf $(DIR_APP)
108
	@$(POSTBUILD)