coreutils.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. ##
  2. ## coreutils.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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
  32. Class: BASE
  33. Group: Utility
  34. License: GPL
  35. Version: 5.1.2
  36. Release: 20040203
  37. # package options
  38. %option with_legacy no
  39. # list of sources
  40. Source0: ftp://alpha.gnu.org/gnu/coreutils/coreutils-%{version}.tar.bz2
  41. Patch0: coreutils.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, make, perl
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. The GNU Core Utilities are the basic file, shell and text
  51. manipulation utilities of the GNU operating system. These are the
  52. core utilities which are expected to exist on every operating
  53. system. Previously these utilities were offered as three individual
  54. sets of GNU utilities, fileutils, shellutils, and textutils. Those
  55. three have been combined into a single set of utilities call the
  56. coreutils.
  57. The provided GNU utilities are: basename, chroot, date, dirname,
  58. echo, env, expr, factor, false, groups, hostid, hostname, id
  59. logname, nice, nohup, pathchk, pinky, printenv, printf, pwd, seq,
  60. sleep, stty, tee, test, true, tty, uname, users, who, whoami, yes,
  61. chgrp, chmod, chown, cp, dd, df, dir, dircolors, du, install, ln,
  62. ls, mkdir, mkfifo, mknod, mv, rm, rmdir, shred, sync, touch, vdir.
  63. %track
  64. prog coreutils:alpha = {
  65. version = 5.1.2
  66. url = ftp://alpha.gnu.org/gnu/coreutils/
  67. regex = coreutils-(__VER__)\.tar\.(gz|bz2)
  68. }
  69. prog coreutils:release = {
  70. version = 5.0
  71. url = ftp://ftp.gnu.org/gnu/coreutils/
  72. regex = coreutils-(__VER__)\.tar\.(gz|bz2)
  73. }
  74. %prep
  75. %setup -q
  76. %patch -p0
  77. %{l_shtool} subst \
  78. -e 's;^\(install-exec-local:\).*;\1;' \
  79. -e 's;^\(bin_PROGRAMS =\);\1 su;' \
  80. src/Makefile.in
  81. ( cd man && touch nice.1 stat.1 test.1 ls.1 dir.1 vdir.1 ) || exit 1
  82. %build
  83. CC="%{l_cc}" \
  84. CFLAGS="%{l_cflags -O}" \
  85. CPPFLAGS="%{l_cppflags}" \
  86. LDFLAGS="%{l_ldflags}" \
  87. CONFIG_SHELL="%{l_bash}" \
  88. HELP2MAN="true" \
  89. ./configure \
  90. --prefix=%{l_prefix} \
  91. --program-prefix=g \
  92. --disable-nls
  93. chmod a+rx config/install-sh
  94. %{l_make} %{l_mflags -O}
  95. %install
  96. rm -rf $RPM_BUILD_ROOT
  97. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  98. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  99. rm -f "$RPM_BUILD_ROOT%{l_prefix}/bin/g["
  100. # rename gpr utility to avoid conflict with graphviz
  101. # legacyname becomes nupr
  102. mv "$RPM_BUILD_ROOT%{l_prefix}/bin/gpr" \
  103. "$RPM_BUILD_ROOT%{l_prefix}/bin/gnupr" 2>/dev/null || true
  104. mv "$RPM_BUILD_ROOT%{l_prefix}/man/man1/gpr.1" \
  105. "$RPM_BUILD_ROOT%{l_prefix}/man/man1/gnupr.1" 2>/dev/null || true
  106. %if "%{with_legacy}" == "yes"
  107. ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
  108. for i in g*; do
  109. ln -s $i `echo "$i" | sed -e 's;^g;;'`
  110. done
  111. cd $RPM_BUILD_ROOT%{l_prefix}/man/man1
  112. for i in g*; do
  113. ln -s $i `echo "$i" | sed -e 's;^g;;'`
  114. done
  115. ) || exit $?
  116. %endif
  117. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  118. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
  119. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  120. '%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gsu'
  121. %files -f files
  122. %clean
  123. rm -rf $RPM_BUILD_ROOT