Zwischencommit beim Umzug auf LFS 6.2.
[ipfire-2.x.git] / lfs / glibc
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 = 2.3.6
30
31 THISAPP = glibc-$(VER)
32 DL_FILE = $(THISAPP).tar.bz2
33 DL_FROM = $(URL_IPFIRE)
34 DIR_APP = $(DIR_SRC)/$(THISAPP)
35 CFLAGS =
36 CXXFLAGS =
37
38 # Normal build or /tools build.
39 #
40 ifeq "$(ROOT)" ""
41 TARGET = $(DIR_INFO)/$(THISAPP)
42 EXTRA_CONFIG = --prefix=/usr \
43 --disable-profile --enable-add-ons \
44 --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
45 EXTRA_MAKE =
46 EXTRA_INSTALL =
47 else
48 TARGET = $(DIR_INFO)/$(THISAPP)-tools
49 EXTRA_CONFIG = --prefix=/tools \
50 --disable-profile --enable-add-ons \
51 --enable-kernel=2.6.0 --with-binutils=/tools/bin \
52 --without-gd --with-headers=/tools/include \
53 --without-selinux
54 EXTRA_MAKE =
55 EXTRA_INSTALL =
56 endif
57
58 ###############################################################################
59 # Top-level Rules
60 ###############################################################################
61
62 objects = $(DL_FILE) \
63 glibc-libidn-$(VER).tar.bz2
64
65 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
66 glibc-libidn-$(VER).tar.bz2 = $(DL_FROM)/glibc-libidn-$(VER).tar.bz2
67
68 $(DL_FILE)_MD5 = bfdce99f82d6dbcb64b7f11c05d6bc96
69 glibc-libidn-$(VER).tar.bz2_MD5 = 49dbe06ce830fc73874d6b38bdc5b4db
70
71 install : $(TARGET)
72
73 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
74
75 download :$(patsubst %,$(DIR_DL)/%,$(objects))
76
77 md5 : $(subst %,%_MD5,$(objects))
78
79 ###############################################################################
80 # Downloading, checking, md5sum
81 ###############################################################################
82
83 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
84 @$(CHECK)
85
86 $(patsubst %,$(DIR_DL)/%,$(objects)) :
87 @$(LOAD)
88
89 $(subst %,%_MD5,$(objects)) :
90 @$(MD5)
91
92 ###############################################################################
93 # Installation Details
94 ###############################################################################
95
96 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
97 @$(PREBUILD)
98 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
99 @mkdir $(DIR_SRC)/glibc-build
100 ifeq "$(ROOT)" ""
101 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-linux_types-1.patch
102 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-inotify-1.patch
103 # This locale causes a loop on bash login - exclude it
104 cd $(DIR_APP) && sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
105 cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
106 scripts/test-installation.pl
107 endif
108 cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
109
110 ifeq "$(ROOT)" ""
111 touch /etc/ld.so.conf
112 cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
113 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
114 cp -v $(DIR_APP)/sysdeps/unix/sysv/linux/inotify.h /usr/include/sys
115 else
116 -mkdir /tools/etc
117 touch /tools/etc/ld.so.conf
118 cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
119 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
120 endif
121
122 # Creating the locales
123 ifeq "$(ROOT)" ""
124 mkdir -p /usr/lib/locale
125 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US
126 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8
127 cp -f /usr/share/zoneinfo/GMT /etc/localtime
128 endif
129 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
130 @$(POSTBUILD)