]> git.ipfire.org Git - ipfire-2.x.git/blame_incremental - lfs/gettext
Add ddrescue package.
[ipfire-2.x.git] / lfs / gettext
... / ...
CommitLineData
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
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. #
10# #
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. #
15# #
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/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
27VER = 0.14.5
28
29THISAPP = gettext-$(VER)
30DL_FILE = $(THISAPP).tar.gz
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/$(THISAPP)
33
34# Normal build or /tools build.
35#
36ifeq "$(ROOT)" ""
37ifeq "$(LFS_PASS)" "install"
38 TARGET = $(DIR_INFO)/$(THISAPP)-install
39else
40 TARGET = $(DIR_INFO)/$(THISAPP)
41 EXTRA_CONFIG = --prefix=/usr --disable-nls
42 EXTRA_MAKE =
43 EXTRA_INSTALL =
44endif
45else
46 TARGET = $(DIR_INFO)/$(THISAPP)-tools
47 EXTRA_CONFIG = --prefix=/tools --disable-shared --disable-nls
48 EXTRA_MAKE =
49 EXTRA_INSTALL =
50endif
51
52###############################################################################
53# Top-level Rules
54###############################################################################
55
56objects = $(DL_FILE)
57
58$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
59
60$(DL_FILE)_MD5 = e2f6581626a22a0de66dce1d81d00de3
61
62install : $(TARGET)
63
64check : $(patsubst %,$(DIR_CHK)/%,$(objects))
65
66download :$(patsubst %,$(DIR_DL)/%,$(objects))
67
68md5 : $(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)
90ifeq "$(ROOT)" ""
91ifeq "$(LFS_PASS)" "install"
92 cd $(DIR_APP) && ./configure --prefix=/ --libdir=/lib \
93 --with-included-gettext --disable-rpath \
94 --enable-relocatable --disable-shared
95 cd $(DIR_APP)/gettext-runtime && make CFLAGS="-Os -fomit-frame-pointer" -C intl/
96 cd $(DIR_APP)/gettext-runtime && make CFLAGS="-Os -fomit-frame-pointer" \
97 DESTDIR=/opt/$(MACHINE)-uClibc -C intl/ install
98else
99 cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
100 cd $(DIR_APP) && make $(EXTRA_MAKE)
101 cd $(DIR_APP) && make $(EXTRA_INSTALL) install
102endif
103else
104 cd $(DIR_APP)/gettext-tools && ./configure $(EXTRA_CONFIG)
105 cd $(DIR_APP)/gettext-tools && make -C lib
106 cd $(DIR_APP)/gettext-tools && make -C src msgfmt
107 cd $(DIR_APP)/gettext-tools && cp -v src/msgfmt /tools/bin
108endif
109 @rm -rf $(DIR_APP)
110 @$(POSTBUILD)