coreutils.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## coreutils.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: coreutils
  27. Summary: GNU Core Utilities
  28. URL: http://www.gnu.org/software/coreutils/
  29. Vendor: Free Software Foundation
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Utility
  33. License: GPL
  34. Version: 5.0
  35. Release: 20030508
  36. # package options
  37. %option with_prefix yes
  38. # list of sources
  39. Source0: ftp://ftp.gnu.org/gnu/coreutils/coreutils-%{version}.tar.bz2
  40. Patch0: coreutils.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206, make
  45. PreReq: OpenPKG, openpkg >= 20020206
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. The GNU Core Utilities are the basic file, shell and text
  50. manipulation utilities of the GNU operating system. These are the
  51. core utilities which are expected to exist on every operating
  52. system. Previously these utilities were offered as three individual
  53. sets of GNU utilities, fileutils, shellutils, and textutils. Those
  54. three have been combined into a single set of utilities call the
  55. coreutils.
  56. The provided GNU utilities are: basename, chroot, date, dirname,
  57. echo, env, expr, factor, false, groups, hostid, hostname, id
  58. logname, nice, nohup, pathchk, pinky, printenv, printf, pwd, seq,
  59. sleep, stty, tee, test, true, tty, uname, users, who, whoami, yes,
  60. chgrp, chmod, chown, cp, dd, df, dir, dircolors, du, install, ln,
  61. ls, mkdir, mkfifo, mknod, mv, rm, rmdir, shred, sync, touch, vdir.
  62. %prep
  63. %setup -q
  64. %patch -p0
  65. %{l_shtool} subst \
  66. -e 's;^\(install-exec-local:\).*;\1;' \
  67. -e 's;^\(bin_PROGRAMS =\);\1 su;' \
  68. src/Makefile.in
  69. %build
  70. CC="%{l_cc}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. CONFIG_SHELL="%{l_bash}" \
  73. CPPFLAGS="%{l_cppflags}" \
  74. LDFLAGS="%{l_ldflags}" \
  75. ./configure \
  76. --prefix=%{l_prefix} \
  77. %if "%{with_prefix}" == "yes"
  78. --program-prefix=g \
  79. %endif
  80. --disable-nls
  81. chmod a+rx config/install-sh
  82. %{l_make} %{l_mflags -O}
  83. %install
  84. rm -rf $RPM_BUILD_ROOT
  85. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  87. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
  89. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  90. %if "%{with_prefix}" == "yes"
  91. '%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gsu'
  92. %else
  93. '%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/su'
  94. %endif
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT