]>
Commit | Line | Data |
---|---|---|
166a6c21 MT |
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 | ||
a7c97434 | 25 | include $(PKGROOT)/Include |
166a6c21 MT |
26 | |
27 | PKG_NAME = coreutils | |
d4347a37 | 28 | PKG_VER = 8.12 |
49b5bc27 | 29 | PKG_REL = 2 |
166a6c21 MT |
30 | |
31 | PKG_MAINTAINER = | |
b42a752b | 32 | PKG_GROUPS = Base System/Base |
166a6c21 MT |
33 | PKG_URL = http://www.gnu.org/software/coreutils/ |
34 | PKG_LICENSE = GPLv3+ | |
35 | PKG_SUMMARY = A set of basic GNU tools commonly used in shell scripts. | |
36 | ||
37 | define PKG_DESCRIPTION | |
38 | These are the GNU core utilities. This package is the combination of \ | |
39 | the old GNU fileutils, sh-utils, and textutils packages. | |
40 | endef | |
41 | ||
cd5121cd MT |
42 | PKG_BUILD_DEPS+= autoconf automake e2fsprogs-devel gmp-devel libacl-devel \ |
43 | libattr-devel libcap-devel libselinux-devel ncurses-devel pam-devel | |
166a6c21 | 44 | |
3badd2da | 45 | PKG_TARBALL = $(THISAPP).tar.xz |
166a6c21 | 46 | |
166a6c21 MT |
47 | CFLAGS += -D_GNU_SOURCE=1 -fno-strict-aliasing |
48 | ||
42ce981f SS |
49 | CONFIGURE_OPTIONS += \ |
50 | --enable-pam \ | |
1d1a6603 | 51 | --enable-selinux \ |
42ce981f SS |
52 | --enable-largefile \ |
53 | --enable-install-program=arch,hostname,su \ | |
54 | --enable-no-install-program=kill,uptime | |
166a6c21 | 55 | |
42ce981f SS |
56 | define STAGE_PREPARE_CMDS |
57 | cd $(DIR_APP) && aclocal -I m4 | |
58 | cd $(DIR_APP) && autoconf --force | |
17c0ee8a | 59 | endef |
166a6c21 | 60 | |
08eacf79 SS |
61 | define STAGE_TEST |
62 | cd $(DIR_APP) && make check | |
63 | endef | |
e7a5bed3 | 64 | |
42ce981f | 65 | define STAGE_INSTALL_CMDS |
cde35c12 | 66 | -mkdir -pv $(BUILDROOT)/{bin,etc/profile.d,usr/sbin} |
166a6c21 MT |
67 | mv -v $(BUILDROOT)/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $(BUILDROOT)/bin |
68 | mv -v $(BUILDROOT)/usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} $(BUILDROOT)/bin | |
69 | mv -v $(BUILDROOT)/usr/bin/{rmdir,stty,sync,touch,true,uname} $(BUILDROOT)/bin | |
70 | mv -v $(BUILDROOT)/usr/bin/chroot $(BUILDROOT)/usr/sbin | |
71 | mv -v $(BUILDROOT)/usr/bin/{head,sleep,nice} $(BUILDROOT)/bin | |
72 | ||
49b5bc27 MT |
73 | # Reinstall su in /bin |
74 | -rm -rfv $(BUILDROOT)/usr/bin/su | |
166a6c21 MT |
75 | cd $(DIR_APP) && install -m 4755 src/su $(BUILDROOT)/bin |
76 | ||
1034db5f MT |
77 | # Dump /etc/DIR_COLORS |
78 | dircolors -p > $(BUILDROOT)/etc/DIR_COLORS | |
79 | cp -vf $(DIR_SOURCE)/profile.d/* $(BUILDROOT)/etc/profile.d/ | |
e35eb77b MT |
80 | |
81 | # Capabilities | |
82 | chmod u-s $(BUILDROOT)/bin/su | |
83 | setcap cap_setgid,cap_setuid+ep $(BUILDROOT)/bin/su | |
17c0ee8a | 84 | endef |