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 ###############################################################################
29 THISAPP = glibc-$(VER)
30 DL_FILE = $(THISAPP).tar.bz2
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
36 # Normal build or /tools build.
39 TARGET = $(DIR_INFO)/$(THISAPP)
40 EXTRA_CONFIG = --prefix=/usr \
41 --disable-profile --enable-add-ons \
42 --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
46 TARGET = $(DIR_INFO)/$(THISAPP)-tools
47 EXTRA_CONFIG = --prefix=/tools \
48 --disable-profile --enable-add-ons \
49 --enable-kernel=2.6.0 --with-binutils=/tools/bin \
50 --without-gd --with-headers=/tools/include \
56 ###############################################################################
58 ###############################################################################
60 objects = $(DL_FILE) \
61 glibc-libidn-$(VER).tar.bz2
63 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
64 glibc-libidn-$(VER).tar.bz2 = $(DL_FROM)/glibc-libidn-$(VER).tar.bz2
66 $(DL_FILE)_MD5 = bfdce99f82d6dbcb64b7f11c05d6bc96
67 glibc-libidn-$(VER).tar.bz2_MD5 = 49dbe06ce830fc73874d6b38bdc5b4db
71 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
73 download :$(patsubst %,$(DIR_DL)/%,$(objects))
75 md5 : $(subst %,%_MD5,$(objects))
77 ###############################################################################
78 # Downloading, checking, md5sum
79 ###############################################################################
81 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
84 $(patsubst %,$(DIR_DL)/%,$(objects)) :
87 $(subst %,%_MD5,$(objects)) :
90 ###############################################################################
91 # Installation Details
92 ###############################################################################
94 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
96 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
97 @mkdir $(DIR_SRC)/glibc-build
98 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-dont_use_origin_on_privil_exec.patch
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
108 cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
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
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
122 # Creating the locales
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
129 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build