summaryrefslogtreecommitdiffstats
path: root/meta/packages/coreutils
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/coreutils
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/coreutils')
-rw-r--r--meta/packages/coreutils/coreutils-5.1.3/install-cross.patch27
-rw-r--r--meta/packages/coreutils/coreutils-5.1.3/man.patch42
-rw-r--r--meta/packages/coreutils/coreutils-native_5.1.3.bb7
-rw-r--r--meta/packages/coreutils/coreutils_5.1.3.bb85
4 files changed, 161 insertions, 0 deletions
diff --git a/meta/packages/coreutils/coreutils-5.1.3/install-cross.patch b/meta/packages/coreutils/coreutils-5.1.3/install-cross.patch
new file mode 100644
index 0000000000..98ba3d916c
--- /dev/null
+++ b/meta/packages/coreutils/coreutils-5.1.3/install-cross.patch
@@ -0,0 +1,27 @@
1--- src/install.c~ 2003-08-09 18:46:45.000000000 +0100
2+++ src/install.c 2004-03-27 18:38:45.000000000 +0000
3@@ -516,7 +516,14 @@
4 strip (const char *path)
5 {
6 int status;
7- pid_t pid = fork ();
8+ pid_t pid;
9+ char *strip_name;
10+
11+ strip_name = getenv ("STRIP");
12+ if (strip_name == NULL)
13+ strip_name = "strip";
14+
15+ pid = fork ();
16
17 switch (pid)
18 {
19@@ -524,7 +531,7 @@
20 error (EXIT_FAILURE, errno, _("fork system call failed"));
21 break;
22 case 0: /* Child. */
23- execlp ("strip", "strip", path, NULL);
24+ execlp (strip_name, "strip", path, NULL);
25 error (EXIT_FAILURE, errno, _("cannot run strip"));
26 break;
27 default: /* Parent. */
diff --git a/meta/packages/coreutils/coreutils-5.1.3/man.patch b/meta/packages/coreutils/coreutils-5.1.3/man.patch
new file mode 100644
index 0000000000..b067c380e2
--- /dev/null
+++ b/meta/packages/coreutils/coreutils-5.1.3/man.patch
@@ -0,0 +1,42 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- coreutils-5.1.3/configure.ac~man 2004-01-25 16:57:15.000000000 -0600
7+++ coreutils-5.1.3/configure.ac 2004-06-29 14:22:10.000000000 -0500
8@@ -232,6 +232,20 @@
9 AM_GNU_GETTEXT([external], [need-ngettext])
10 AM_GNU_GETTEXT_VERSION(0.13.1)
11
12+AC_MSG_CHECKING([whether to build man pages])
13+AC_ARG_WITH(manpages,
14+ AS_HELP_STRING([--with-manpages],
15+ [Enable building of manpages (default=yes)]),
16+ [cu_cv_build_manpages=$enableval],
17+ [cu_cv_build_manpages=yes])
18+# help2man doesn't work when crosscompiling, as it needs to run the
19+# binary that was built.
20+if test x"$cross_compiling" = x"yes"; then
21+ cu_cv_build_manpages=no
22+fi
23+AC_MSG_RESULT($cu_cv_build_manpages)
24+AM_CONDITIONAL(ENABLE_MANPAGES, test x"$cu_cv_build_manpages" = x"yes")
25+
26 AC_CONFIG_FILES(
27 Makefile
28 doc/Makefile
29--- coreutils-5.1.3/Makefile.am~man 2003-11-09 14:23:02.000000000 -0600
30+++ coreutils-5.1.3/Makefile.am 2004-06-29 14:18:14.000000000 -0500
31@@ -1,6 +1,11 @@
32 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
33
34+if ENABLE_MANPAGES
35 SUBDIRS = lib src doc man m4 po tests
36+else
37+SUBDIRS = lib src doc m4 po tests
38+endif
39+
40 EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
41 .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
42 .x-sc_space_tab .x-sc_sun_os_names \
diff --git a/meta/packages/coreutils/coreutils-native_5.1.3.bb b/meta/packages/coreutils/coreutils-native_5.1.3.bb
new file mode 100644
index 0000000000..74b39541fa
--- /dev/null
+++ b/meta/packages/coreutils/coreutils-native_5.1.3.bb
@@ -0,0 +1,7 @@
1SECTION = "base"
2
3FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/coreutils-${PV}"
4S = "${WORKDIR}/coreutils-${PV}"
5
6include coreutils_${PV}.bb
7inherit native
diff --git a/meta/packages/coreutils/coreutils_5.1.3.bb b/meta/packages/coreutils/coreutils_5.1.3.bb
new file mode 100644
index 0000000000..31af80907d
--- /dev/null
+++ b/meta/packages/coreutils/coreutils_5.1.3.bb
@@ -0,0 +1,85 @@
1LICENSE = "GPL"
2SECTION = "base"
3DESCRIPTION = "A collection of core GNU utilities."
4RREPLACES = "textutils shellutils fileutils"
5RPROVIDES = "textutils shellutils fileutils"
6PR = "r7"
7
8SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \
9 file://install-cross.patch;patch=1;pnum=0 \
10 file://man.patch;patch=1"
11
12inherit autotools
13
14# [ gets a special treatment and is not included in this
15bindir_progs = "basename cksum comm csplit cut dir dircolors dirname du \
16 env expand expr factor fmt fold groups head hostid id install \
17 join link logname md5sum mkfifo nice nl nohup od paste pathchk \
18 pinky pr printenv printf ptx readlink seq sha1sum shred sort \
19 split stat sum tac tail tee test tr tsort tty unexpand uniq \
20 unlink users vdir wc who whoami yes \
21 "
22
23# hostname gets a special treatment and is not included in this
24base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \
25 ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \
26 true uname \
27 "
28
29sbindir_progs= "chroot"
30
31do_install () {
32 autotools_do_install
33
34 # Renaming the utilities that should go in /usr/bin
35 for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
36
37 # Renaming and moving the utilities that should go in /bin (FHS)
38 install -d ${D}${base_bindir}
39 for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
40
41 # Renaming and moving the utilities that should go in /usr/sbin (FHS)
42 install -d ${D}${sbindir}
43 for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
44
45 # [ requires special handling because [.coreutils will cause the sed stuff
46 # in update-alternatives to fail, therefore use lbracket - the name used
47 # for the actual source file.
48 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
49 # hostname and uptime separated. busybox's versions are preferred
50 mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
51 mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
52
53}
54
55pkg_postinst_${PN} () {
56 # The utilities in /usr/bin
57 for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
58
59 # The utilities in /bin
60 for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
61
62 # The utilities in /usr/sbin
63 for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
64
65 # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
66 update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
67 update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
68 update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
69}
70
71pkg_prerm_${PN} () {
72 # The utilities in /usr/bin
73 for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
74
75 # The utilities in /bin
76 for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
77
78 # The utilities in /usr/sbin
79 for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
80
81 # The special cases
82 update-alternatives --remove hostname hostname.${PN}
83 update-alternatives --remove uptime uptime.${PN}
84 update-alternatives --remove '[' 'lbracket.${PN}'
85}