]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - lfs/coreutils
Changed name to IPFire-3.0-alpha1 (Lechery).
[people/arne_f/ipfire-3.x.git] / lfs / coreutils
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 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
25 include Config
26
27 PKG_NAME = coreutils
28 PKG_VER = 7.0
29 PKG_REL = 0
30
31 THISAPP = $(PKG_NAME)-$(PKG_VER)
32 DL_FILE = $(THISAPP).tar.gz
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
34
35 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
36
37 MAINTAINER =
38 GROUP = System/Base
39 EXTRA = no
40 DEBUG = no
41 DEPS =
42
43 URL = http://www.gnu.org/software/coreutils/
44 LICENSE = GPLv3+
45 SHORT_DESC = A set of basic GNU tools commonly used in shell scripts.
46
47 define LONG_DESC
48 These are the GNU core utilities. This package is the combination of \
49 the old GNU fileutils, sh-utils, and textutils packages.
50 endef
51
52 CFLAGS += -fno-strict-aliasing
53
54 ###############################################################################
55 # Top-level Rules
56 ###############################################################################
57
58 objects = $(DL_FILE) \
59 $(THISAPP)-uname_PIC-1.patch \
60 $(THISAPP)-i18n-1.patch
61
62 download: $(objects)
63
64 info:
65 $(DO_PKG_INFO)
66
67 install: $(OBJECT)
68
69 package:
70 @$(DO_PACKAGE)
71
72 $(objects):
73 @$(LOAD)
74
75 ###############################################################################
76 # Installation Details
77 ###############################################################################
78
79 $(OBJECT): $(objects)
80 @$(PREBUILD)
81 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE)
82
83 ifeq "$(STAGE)" "toolchain"
84 cd $(DIR_APP) && \
85 ./configure \
86 $(CONFIGURE_ARCH) \
87 --prefix=$(TOOLS_DIR) \
88 --enable-install-program=hostname
89 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
90 cd $(DIR_APP) && make install
91
92 cd $(DIR_APP) && cp -v src/su $(TOOLS_DIR)/bin/su-tools
93 endif
94
95 ifeq "$(STAGE)" "base"
96 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-uname_PIC-1.patch
97 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-i18n-1.patch
98
99 cd $(DIR_APP) && \
100 ./configure \
101 $(CONFIGURE_ARCH) \
102 --prefix=/usr \
103 --enable-install-program=hostname \
104 --enable-no-install-program=kill,uptime
105 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
106 cd $(DIR_APP) && make install
107
108 mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
109 mv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} /bin
110 mv -v /usr/bin/{rmdir,stty,sync,touch,true,uname} /bin
111 mv -v /usr/bin/chroot /usr/sbin
112 mv -v /usr/bin/{head,sleep,nice} /bin
113
114 # Dump /etc/dircolors.
115 dircolors -p > /etc/dircolors
116 endif
117
118 @rm -rf $(DIR_APP)
119 @$(POSTBUILD)