]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 MT |
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 # | |
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 |
ac07fd4d | 28 | VER = 6.10 |
cd1a2927 | 29 | |
be472d5a | 30 | THISAPP = $(PKG_NAME)-$(VER) |
ac07fd4d | 31 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 MT |
32 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
33 | ||
be472d5a | 34 | TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
cd1a2927 MT |
35 | |
36 | ############################################################################### | |
37 | # Top-level Rules | |
38 | ############################################################################### | |
dd714b8a | 39 | |
ac07fd4d | 40 | objects = $(DL_FILE) $(THISAPP)-uname-1.patch $(THISAPP)-i18n-1.patch |
cd1a2927 | 41 | |
cd1a2927 MT |
42 | install : $(TARGET) |
43 | ||
be472d5a | 44 | download : $(patsubst %,$(DIR_DL)/%,$(objects)) |
cd1a2927 MT |
45 | |
46 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
47 | @$(LOAD) | |
48 | ||
cd1a2927 MT |
49 | ############################################################################### |
50 | # Installation Details | |
51 | ############################################################################### | |
52 | ||
53 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
54 | @$(PREBUILD) | |
ac07fd4d | 55 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) |
be472d5a | 56 | |
ac07fd4d MT |
57 | ifeq "$(STAGE)" "toolchain" |
58 | cd $(DIR_APP) && ./configure --prefix=$(TOOLS_DIR) --enable-install-program=hostname | |
be472d5a MT |
59 | cd $(DIR_APP) && make -j $(PARALLELISM) |
60 | cd $(DIR_APP) && make install | |
3888140c | 61 | |
be472d5a | 62 | cd $(DIR_APP) && cp -v src/su $(TOOLS_DIR)/bin/su-tools |
3888140c MT |
63 | endif |
64 | ||
65 | ifeq "$(STAGE)" "base" | |
3888140c | 66 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-uname-1.patch |
3888140c MT |
67 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-i18n-1.patch |
68 | ||
ac07fd4d | 69 | cd $(DIR_APP) && ./configure --prefix=/usr --enable-install-program=hostname \ |
bc46151e | 70 | --enable-no-install-program=kill,uptime |
3888140c MT |
71 | cd $(DIR_APP) && make -j $(PARALLELISM) |
72 | cd $(DIR_APP) && make install | |
73 | ||
74 | mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin | |
75 | mv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} /bin | |
76 | mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin | |
77 | mv -v /usr/bin/chroot /usr/sbin | |
78 | mv -v /usr/bin/{head,sleep,nice} /bin | |
79 | endif | |
be472d5a | 80 | |
cd1a2927 MT |
81 | @rm -rf $(DIR_APP) |
82 | @$(POSTBUILD) |