]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
ca3b535c | 4 | # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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 # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
be472d5a | 27 | PKG_NAME = coreutils |
c26bc258 | 28 | VER = 7.0 |
ca3b535c | 29 | PKG_VER = 0 |
cd1a2927 | 30 | |
be472d5a | 31 | THISAPP = $(PKG_NAME)-$(VER) |
ac07fd4d | 32 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 MT |
33 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
34 | ||
6679675b | 35 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
cd1a2927 | 36 | |
ca3b535c MT |
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 | ||
cc32ff2a MT |
52 | CFLAGS += -fno-strict-aliasing |
53 | ||
cd1a2927 MT |
54 | ############################################################################### |
55 | # Top-level Rules | |
56 | ############################################################################### | |
dd714b8a | 57 | |
ca3b535c MT |
58 | objects = $(DL_FILE) \ |
59 | $(THISAPP)-uname_PIC-1.patch \ | |
c26bc258 | 60 | $(THISAPP)-i18n-1.patch |
cd1a2927 | 61 | |
ca3b535c MT |
62 | download: $(objects) |
63 | ||
2d48b10b MT |
64 | info: |
65 | $(DO_PKG_INFO) | |
66 | ||
ca3b535c | 67 | install: $(OBJECT) |
cd1a2927 | 68 | |
ca3b535c MT |
69 | package: |
70 | @$(DO_PACKAGE) | |
cd1a2927 | 71 | |
ca3b535c | 72 | $(objects): |
cd1a2927 MT |
73 | @$(LOAD) |
74 | ||
cd1a2927 MT |
75 | ############################################################################### |
76 | # Installation Details | |
77 | ############################################################################### | |
78 | ||
ca3b535c | 79 | $(OBJECT): $(objects) |
cd1a2927 | 80 | @$(PREBUILD) |
ca3b535c MT |
81 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) |
82 | ||
ac07fd4d | 83 | ifeq "$(STAGE)" "toolchain" |
88068980 MT |
84 | cd $(DIR_APP) && \ |
85 | ./configure \ | |
86 | $(CONFIGURE_ARCH) \ | |
87 | --prefix=$(TOOLS_DIR) \ | |
88 | --enable-install-program=hostname | |
3d84c75d | 89 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) |
be472d5a | 90 | cd $(DIR_APP) && make install |
88068980 | 91 | |
be472d5a | 92 | cd $(DIR_APP) && cp -v src/su $(TOOLS_DIR)/bin/su-tools |
3888140c MT |
93 | endif |
94 | ||
95 | ifeq "$(STAGE)" "base" | |
e2fc6a89 | 96 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-uname_PIC-1.patch |
3888140c MT |
97 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-i18n-1.patch |
98 | ||
ca3b535c MT |
99 | cd $(DIR_APP) && \ |
100 | ./configure \ | |
a223135c | 101 | $(CONFIGURE_ARCH) \ |
ca3b535c MT |
102 | --prefix=/usr \ |
103 | --enable-install-program=hostname \ | |
104 | --enable-no-install-program=kill,uptime | |
3d84c75d | 105 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) |
3888140c MT |
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,true,uname} /bin | |
111 | mv -v /usr/bin/chroot /usr/sbin | |
112 | mv -v /usr/bin/{head,sleep,nice} /bin | |
be915dd2 MT |
113 | |
114 | # Dump /etc/dircolors. | |
115 | dircolors -p > /etc/dircolors | |
3888140c | 116 | endif |
be472d5a | 117 | |
cd1a2927 MT |
118 | @rm -rf $(DIR_APP) |
119 | @$(POSTBUILD) |