]>
Commit | Line | Data |
---|---|---|
cd1a2927 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 | # # | |
cd1a2927 MT |
21 | ############################################################################### |
22 | ||
23 | ############################################################################### | |
24 | # Definitions | |
25 | ############################################################################### | |
26 | ||
27 | include Config | |
28 | ||
dd714b8a | 29 | VER = 2.3.6 |
cd1a2927 | 30 | |
dd714b8a | 31 | THISAPP = glibc-$(VER) |
cd1a2927 | 32 | DL_FILE = $(THISAPP).tar.bz2 |
7a98bae5 | 33 | DL_FROM = $(URL_IPFIRE) |
cd1a2927 MT |
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 \ | |
dd714b8a MT |
43 | --disable-profile --enable-add-ons \ |
44 | --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc | |
cd1a2927 MT |
45 | EXTRA_MAKE = |
46 | EXTRA_INSTALL = | |
47 | else | |
48 | TARGET = $(DIR_INFO)/$(THISAPP)-tools | |
49 | EXTRA_CONFIG = --prefix=/tools \ | |
dd714b8a MT |
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 | |
cd1a2927 MT |
54 | EXTRA_MAKE = |
55 | EXTRA_INSTALL = | |
56 | endif | |
57 | ||
58 | ############################################################################### | |
59 | # Top-level Rules | |
60 | ############################################################################### | |
61 | ||
dd714b8a MT |
62 | objects = $(DL_FILE) \ |
63 | glibc-libidn-$(VER).tar.bz2 | |
cd1a2927 MT |
64 | |
65 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
dd714b8a | 66 | glibc-libidn-$(VER).tar.bz2 = $(DL_FROM)/glibc-libidn-$(VER).tar.bz2 |
cd1a2927 | 67 | |
dd714b8a MT |
68 | $(DL_FILE)_MD5 = bfdce99f82d6dbcb64b7f11c05d6bc96 |
69 | glibc-libidn-$(VER).tar.bz2_MD5 = 49dbe06ce830fc73874d6b38bdc5b4db | |
cd1a2927 MT |
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) | |
cd1a2927 | 99 | @mkdir $(DIR_SRC)/glibc-build |
dd714b8a MT |
100 | cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-2.3.6-linux_types-1.patch |
101 | cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-2.3.6-inotify-1.patch | |
102 | # This locale causes a loop on bash login - exclude it | |
103 | cd $(DIR_APP) && sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED | |
104 | cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \ | |
105 | scripts/test-installation.pl | |
106 | ||
cd1a2927 MT |
107 | cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG) |
108 | ifeq "$(ROOT)" "" | |
109 | touch /etc/ld.so.conf | |
dd714b8a | 110 | cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE) |
cd1a2927 | 111 | cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install |
dd714b8a | 112 | cp -v $(DIR_APP)/sysdeps/unix/sysv/linux/inotify.h /usr/include/sys |
cd1a2927 MT |
113 | else |
114 | -mkdir /tools/etc | |
115 | touch /tools/etc/ld.so.conf | |
dd714b8a MT |
116 | cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE) |
117 | cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install | |
cd1a2927 MT |
118 | endif |
119 | ||
120 | # Creating the locales | |
121 | ifeq "$(ROOT)" "" | |
122 | mkdir -p /usr/lib/locale | |
123 | else | |
124 | mkdir -p /tools/lib/locale | |
125 | endif | |
126 | cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US | |
127 | cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8 | |
dd714b8a | 128 | cd $(DIR_SRC)/glibc-build && make localedata/install-locales |
cd1a2927 MT |
129 | |
130 | # Configuring Glibc | |
131 | ifeq "$(ROOT)" "" | |
132 | cp -f /usr/share/zoneinfo/GMT /etc/localtime | |
133 | endif | |
134 | # Cleanup | |
135 | @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build | |
136 | @$(POSTBUILD) |