coreutils.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ##
  2. ## coreutils.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: coreutils
  25. Summary: GNU Core Utilities
  26. URL: http://www.gnu.org/software/coreutils/
  27. Vendor: Free Software Foundation
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: BASE
  31. Group: ShellUtils
  32. License: GPL
  33. Version: 8.1
  34. Release: 20091121
  35. # package options
  36. %option with_legacy no
  37. # list of sources
  38. Source0: ftp://ftp.gnu.org/gnu/coreutils/coreutils-%{version}.tar.gz
  39. Patch0: coreutils.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, perl
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The GNU Core Utilities are the basic file, shell and text
  49. manipulation utilities of the GNU operating system. These are the
  50. core utilities which are expected to exist on every operating
  51. system. Previously these utilities were offered as three individual
  52. sets of GNU utilities, fileutils, shellutils, and textutils. Those
  53. three have been combined into a single set of utilities call the
  54. coreutils.
  55. The provided GNU utilities are: base64, basename, cat, chgrp, chmod,
  56. chown, chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir,
  57. dircolors, dirname, du, echo, env, expand, expr, factor, false,
  58. fmt, fold, groups, head, hostid, hostname, id, install, join, kill,
  59. link, ln, logname, ls, md5sum, mkdir, mkfifo, mknod, mv, nice, nl,
  60. nohup, nupr, od, paste, pathchk, pinky, printenv, printf, ptx, pwd,
  61. readlink, rm, rmdir, seq, sha1sum, sha224sum, sha256sum, sha384sum,
  62. sha512sum, shred, shuf, sleep, sort, split, stat, stty, su, sum,
  63. sync, tac, tail, tee, test, touch, tr, true, tsort, tty, uname,
  64. unexpand, uniq, unlink, uptime, users, vdir, wc, who, whoami, yes.
  65. %track
  66. prog coreutils = {
  67. version = %{version}
  68. url = ftp://ftp.gnu.org/gnu/coreutils/
  69. regex = coreutils-(__VER__)\.tar\.(gz|bz2)
  70. }
  71. %prep
  72. %setup -q
  73. %patch -p0
  74. %{l_shtool} subst \
  75. -e 's;^\(install-exec-local:\).*;\1;' \
  76. -e 's;^\(bin_PROGRAMS =\);\1 su;' \
  77. src/Makefile.in
  78. %build
  79. CC="%{l_cc}" \
  80. CFLAGS="%{l_cflags -O}" \
  81. CPPFLAGS="%{l_cppflags}" \
  82. LDFLAGS="%{l_ldflags}" \
  83. CONFIG_SHELL="%{l_bash}" \
  84. HELP2MAN="true" \
  85. GREP="grep" \
  86. ./configure \
  87. --prefix=%{l_prefix} \
  88. --infodir=%{l_prefix}/info \
  89. --mandir=%{l_prefix}/man \
  90. --program-prefix=g \
  91. --disable-nls
  92. %{l_make} %{l_mflags -O}
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  96. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  97. rm -f "$RPM_BUILD_ROOT%{l_prefix}/bin/g["
  98. # rename gpr utility to avoid conflict with graphviz
  99. # legacyname becomes nupr
  100. mv "$RPM_BUILD_ROOT%{l_prefix}/bin/gpr" \
  101. "$RPM_BUILD_ROOT%{l_prefix}/bin/gnupr" 2>/dev/null || true
  102. mv "$RPM_BUILD_ROOT%{l_prefix}/man/man1/gpr.1" \
  103. "$RPM_BUILD_ROOT%{l_prefix}/man/man1/gnupr.1" 2>/dev/null || true
  104. %if "%{with_legacy}" == "yes"
  105. ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
  106. for i in g*; do
  107. ln -s $i `echo "$i" | sed -e 's;^g;;'`
  108. done
  109. # These cause problems on SuSE 8.x and Darwin.
  110. # configure determines system type using these.
  111. for p in hostname uname; do
  112. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$p
  113. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/${p}*
  114. done
  115. cd $RPM_BUILD_ROOT%{l_prefix}/man/man1
  116. for i in g*; do
  117. ln -s $i `echo "$i" | sed -e 's;^g;;'`
  118. done
  119. ) || exit $?
  120. %endif
  121. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  122. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
  123. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  124. '%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gsu'
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT