|
1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
4 # The contents of this file are subject to the terms of the |
|
5 # Common Development and Distribution License (the "License"). |
|
6 # You may not use this file except in compliance with the License. |
|
7 # |
|
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 # or http://www.opensolaris.org/os/licensing. |
|
10 # See the License for the specific language governing permissions |
|
11 # and limitations under the License. |
|
12 # |
|
13 # When distributing Covered Code, include this CDDL HEADER in each |
|
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 # If applicable, add the following below this CDDL HEADER, with the |
|
16 # fields enclosed by brackets "[]" replaced with your own identifying |
|
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 include ../../make-rules/shared-macros.mk |
|
24 |
|
25 COMPONENT_NAME= coreutils |
|
26 COMPONENT_VERSION= 8.5 |
|
27 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
28 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
29 COMPONENT_ARCHIVE_HASH= sha1:939144f16d05691753a87134436dd2bb8ea89851 |
|
30 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/coreutils/$(COMPONENT_ARCHIVE) |
|
31 |
|
32 include ../../make-rules/prep.mk |
|
33 include ../../make-rules/configure.mk |
|
34 include ../../make-rules/ips.mk |
|
35 |
|
36 CONFIGURE_PREFIX = /usr/gnu |
|
37 CONFIGURE_OPTIONS += --libdir=/usr/lib |
|
38 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
|
39 CONFIGURE_OPTIONS += CPPFLAGS=-I/usr/include/gmp |
|
40 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
41 |
|
42 include ../../make-rules/shared-targets.mk |
|
43 |
|
44 # common targets |
|
45 build: $(BUILD_32) |
|
46 |
|
47 CMDS_NONCONFLICTING=\[ base64 dir dircolors md5sum nproc pinky \ |
|
48 printenv ptx readlink seq sha1sum sha224sum sha256sum sha384sum sha512sum \ |
|
49 shred shuf stat stdbuf tac timeout truncate users vdir whoami |
|
50 |
|
51 MANS_NONCONFLICTING=base64.1 dir.1 dircolors.1 md5sum.1 nproc.1 pinky.1 \ |
|
52 printenv.1 ptx.1 readlink.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 \ |
|
53 sha384sum.1 sha512sum.1 shred.1 shuf.1 stat.1 stdbuf.1 tac.1 \ |
|
54 timeout.1 truncate.1 users.1 vdir.1 whoami.1 |
|
55 |
|
56 NEEDMV=if [ -e $(1) ]; then $(RM) $(2); /usr/bin/mv $(1) $(2); fi |
|
57 RMDIR=/usr/bin/rmdir |
|
58 |
|
59 install: $(PROTOUSRBINDIR) $(PROTOUSRSHAREMAN1DIR) $(INSTALL_32) |
|
60 for command in $(CMDS_NONCONFLICTING); do \ |
|
61 $(call NEEDMV,$(PROTOGNUBIN)/$$command,\ |
|
62 $(PROTOUSRBINDIR)/$$command) \ |
|
63 done |
|
64 for manpage in $(COMPONENT_SRC)/man/*.1; do \ |
|
65 sed -f oracleman-stability $$manpage > \ |
|
66 $(PROTO_DIR)/$(GNUSHAREMAN1)/`basename $$manpage`; \ |
|
67 done |
|
68 for manpage in $(MANS_NONCONFLICTING); do \ |
|
69 $(call NEEDMV,$(PROTOGNUSHAREMAN1)/$$manpage,\ |
|
70 $(PROTOUSRSHAREMAN1DIR)/$$manpage); \ |
|
71 done |
|
72 # |
|
73 # whoami is in both /usr/bin and /usr/gnu/bin; mistake? |
|
74 # |
|
75 $(CP) $(PROTOUSRBINDIR)/whoami $(PROTOGNUBIN)/whoami |
|
76 $(CP) $(PROTOUSRSHAREMAN1DIR)/whoami.1 $(PROTOGNUSHAREMAN1)/whoami.1 |
|
77 $(call NEEDMV,$(PROTOGNUBIN)/install,$(PROTOUSRBINDIR)/ginstall) |
|
78 $(call NEEDMV,$(PROTOGNUSHAREMAN1)/install.1,\ |
|
79 $(PROTOUSRSHAREMAN1DIR)/ginstall.1) |
|
80 $(call NEEDMV,$(PROTOUSRLIBDIR)/coreutils/libstdbuf.so,\ |
|
81 $(PROTOUSRLIBDIR)/libstdbuf.so) |
|
82 -$(RMDIR) $(PROTOUSRLIBDIR)/coreutils |
|
83 $(RM) $(PROTOGNUBIN)/chcon |
|
84 $(RM) $(PROTOGNUBIN)/runcon |
|
85 $(RM) $(PROTOGNUSHAREMAN1)/chcon.1 |
|
86 $(RM) $(PROTOGNUSHAREMAN1)/runcon.1 |
|
87 $(RM) $(PROTOUSRLIBDIR)/charset.alias |
|
88 |
|
89 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
90 |
|
91 test: build |
|
92 @cd $(BUILD_DIR_32); $(MAKE) check |
|
93 |
|
94 include ../../make-rules/depend.mk |