]>
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 |
884d0eec | 28 | PKG_VER = 7.4 |
8985a698 | 29 | PKG_REL = 0 |
cd1a2927 | 30 | |
8985a698 | 31 | THISAPP = $(PKG_NAME)-$(PKG_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 | |
49c3ccf8 | 39 | CORE = yes |
ca3b535c MT |
40 | EXTRA = no |
41 | DEBUG = no | |
ff1554b5 | 42 | BUILD_DEPS = |
8fdbab85 AF |
43 | |
44 | # Don't check deps at toolchain build | |
45 | ifneq "$(STAGE)" "toolchain" | |
46 | DEPS = attr libcap2 ncurses pam shadow util-linux-ng | |
47 | endif | |
ca3b535c MT |
48 | |
49 | URL = http://www.gnu.org/software/coreutils/ | |
50 | LICENSE = GPLv3+ | |
51 | SHORT_DESC = A set of basic GNU tools commonly used in shell scripts. | |
52 | ||
53 | define LONG_DESC | |
54 | These are the GNU core utilities. This package is the combination of \ | |
55 | the old GNU fileutils, sh-utils, and textutils packages. | |
56 | endef | |
57 | ||
f63bd621 | 58 | CFLAGS += -D_GNU_SOURCE=1 -fno-strict-aliasing |
cc32ff2a | 59 | |
cd1a2927 MT |
60 | ############################################################################### |
61 | # Top-level Rules | |
62 | ############################################################################### | |
dd714b8a | 63 | |
ca3b535c MT |
64 | objects = $(DL_FILE) \ |
65 | $(THISAPP)-uname_PIC-1.patch \ | |
c26bc258 | 66 | $(THISAPP)-i18n-1.patch |
cd1a2927 | 67 | |
ca3b535c MT |
68 | download: $(objects) |
69 | ||
2d48b10b MT |
70 | info: |
71 | $(DO_PKG_INFO) | |
72 | ||
ca3b535c | 73 | install: $(OBJECT) |
cd1a2927 | 74 | |
ca3b535c MT |
75 | package: |
76 | @$(DO_PACKAGE) | |
cd1a2927 | 77 | |
ca3b535c | 78 | $(objects): |
cd1a2927 MT |
79 | @$(LOAD) |
80 | ||
cd1a2927 MT |
81 | ############################################################################### |
82 | # Installation Details | |
83 | ############################################################################### | |
84 | ||
ca3b535c | 85 | $(OBJECT): $(objects) |
cd1a2927 | 86 | @$(PREBUILD) |
ca3b535c | 87 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) |
884d0eec MT |
88 | |
89 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-i18n-1.patch | |
bfc6cdc7 | 90 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-uname_PIC-1.patch |
ca3b535c | 91 | |
ac07fd4d | 92 | ifeq "$(STAGE)" "toolchain" |
88068980 | 93 | cd $(DIR_APP) && \ |
2277a872 | 94 | gl_cv_func_printf_directive_n=no \ |
88068980 MT |
95 | ./configure \ |
96 | $(CONFIGURE_ARCH) \ | |
97 | --prefix=$(TOOLS_DIR) \ | |
98 | --enable-install-program=hostname | |
3d84c75d | 99 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) |
be472d5a | 100 | cd $(DIR_APP) && make install |
88068980 | 101 | |
be472d5a | 102 | cd $(DIR_APP) && cp -v src/su $(TOOLS_DIR)/bin/su-tools |
3888140c MT |
103 | endif |
104 | ||
105 | ifeq "$(STAGE)" "base" | |
ca3b535c | 106 | cd $(DIR_APP) && \ |
2277a872 | 107 | gl_cv_func_printf_directive_n=no \ |
ca3b535c | 108 | ./configure \ |
a223135c | 109 | $(CONFIGURE_ARCH) \ |
ca3b535c | 110 | --prefix=/usr \ |
f63bd621 MT |
111 | --enable-largefile \ |
112 | --enable-install-program=arch,hostname,su \ | |
ca3b535c | 113 | --enable-no-install-program=kill,uptime |
f63bd621 MT |
114 | |
115 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) \ | |
116 | CPPFLAGS="-DUSE_PAM" su_LDFLAGS="-pie -lpam -lpam_misc" | |
3888140c | 117 | cd $(DIR_APP) && make install |
884d0eec | 118 | |
3888140c MT |
119 | mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin |
120 | mv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} /bin | |
d8e1e334 | 121 | mv -v /usr/bin/{rmdir,stty,sync,touch,true,uname} /bin |
3888140c MT |
122 | mv -v /usr/bin/chroot /usr/sbin |
123 | mv -v /usr/bin/{head,sleep,nice} /bin | |
be915dd2 | 124 | |
f63bd621 MT |
125 | cd $(DIR_APP) && install -m 4755 src/su /bin |
126 | ||
be915dd2 MT |
127 | # Dump /etc/dircolors. |
128 | dircolors -p > /etc/dircolors | |
213e1832 MT |
129 | |
130 | # PAM | |
f63bd621 | 131 | cp -vf $(DIR_CONFIG)/pam.d/su{,-l} /etc/pam.d |
3888140c | 132 | endif |
884d0eec | 133 | |
cd1a2927 MT |
134 | @rm -rf $(DIR_APP) |
135 | @$(POSTBUILD) |