yum.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ##
  2. ## yum.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_yum_major 2.4
  26. %define V_yum_minor 2
  27. # package information
  28. Name: yum
  29. Summary: Automatic RPM Updater and Installer
  30. URL: http://linux.duke.edu/projects/yum/
  31. Vendor: Seth Vidal
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: EVAL
  35. Group: Bootstrapping
  36. License: GPL
  37. Version: %{V_yum_major}.%{V_yum_minor}
  38. Release: 20060222
  39. # list of sources
  40. Source0: http://linux.duke.edu/projects/yum/download/%{V_yum_major}/yum-%{version}.tar.gz
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, python, make
  45. PreReq: OpenPKG, openpkg >= 20040130, python
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. Yum is a utility that can check for and automatically download
  50. and install updated RPM packages. Dependencies are obtained and
  51. downloaded automatically prompting the user as necessary.
  52. %track
  53. prog yum = {
  54. version = %{version}
  55. url = http://linux.duke.edu/projects/yum/download/
  56. regex = (%{V_yum_major})
  57. url = http://linux.duke.edu/projects/yum/download/__NEWVER__/
  58. regex = yum-(__VER__)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q
  62. %{l_shtool} subst \
  63. -e 's;\(DESTDIR[})/\]]*\)/usr;\1%{l_prefix};g' \
  64. -e 's;\(DESTDIR[})/\]]*\)/etc;\1%{l_prefix}/etc/yum;g' \
  65. -e 's;/share/yum-cli;/lib/python/site-packages/yum-cli;g' \
  66. -e 's;/share/man;/man;g' \
  67. docs/Makefile etc/Makefile Makefile
  68. %{l_shtool} subst \
  69. -e 's;$(PYVER);;g' \
  70. yum/Makefile rpmUtils/Makefile repomd/Makefile
  71. %{l_shtool} subst \
  72. -e 's;^#!/usr/bin/python;#!%{l_prefix}/bin/python;' \
  73. `find . -name "*.py" -print` \
  74. bin/yum-arch
  75. %build
  76. %{l_make} %{l_mflags -O}
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. %{l_shtool} mkdir -f -p -m 755 \
  80. $RPM_BUILD_ROOT%{l_prefix}/lib \
  81. $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
  82. $RPM_BUILD_ROOT%{l_prefix}/man/man8
  83. %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
  84. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  85. %files -f files
  86. %clean
  87. rm -rf $RPM_BUILD_ROOT