python-www.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## python-www.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 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 versions
  24. %define V_python 2.5
  25. %define V_webpy 0.23
  26. %define V_cheetah 2.0.1
  27. %define V_genshi 0.5.1
  28. # package information
  29. Name: python-www
  30. Summary: Python Modules for World Wide Web
  31. URL: http://www.python.org/
  32. Vendor: Python Community
  33. Packager: OpenPKG Foundation e.V.
  34. Distribution: OpenPKG Community
  35. Class: BASE
  36. Group: Language
  37. License: GPL
  38. Version: %{V_python}
  39. Release: 20080710
  40. # list of sources
  41. Source0: http://webpy.org/static/web.py-%{V_webpy}.tar.gz
  42. Source1: http://switch.dl.sourceforge.net/cheetahtemplate/Cheetah-%{V_cheetah}.tar.gz
  43. Source2: http://ftp.edgewall.com/pub/genshi/Genshi-%{V_genshi}.tar.bz2
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130, python >= %{V_python}
  48. PreReq: OpenPKG, openpkg >= 20040130, python >= %{V_python}
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. This is a set of Python extension modules for WWW.
  53. %track
  54. prog python-www:webpy = {
  55. version = %{V_webpy}
  56. url = http://webpy.org/
  57. regex = web\.py-(__VER__)\.tar\.gz
  58. }
  59. prog python-www:cheetah = {
  60. version = %{V_cheetah}
  61. url = http://prdownloads.sourceforge.net/cheetahtemplate/
  62. regex = Cheetah-(__VER__)\.tar\.gz
  63. }
  64. prog python-www:genshi = {
  65. version = %{V_genshi}
  66. url = http://genshi.edgewall.org/wiki/Download
  67. regex = Genshi-(__VER__)\.tar\.bz2
  68. }
  69. %prep
  70. %setup -q -c
  71. %setup -q -T -D -a 1
  72. %setup -q -T -D -a 2
  73. %build
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. ( cd webpy
  77. PYTHONPATH=$RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages \
  78. %{l_prefix}/bin/python \
  79. setup.py install \
  80. --root=$RPM_BUILD_ROOT \
  81. --prefix=%{l_prefix}
  82. ) || exit $?
  83. ( cd Cheetah-%{V_cheetah}
  84. PYTHONPATH=$RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages \
  85. %{l_prefix}/bin/python \
  86. setup.py install \
  87. --root=$RPM_BUILD_ROOT \
  88. --prefix=%{l_prefix}
  89. ) || exit $?
  90. ( cd Genshi-%{V_genshi}
  91. PYTHONPATH=$RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages \
  92. %{l_prefix}/bin/python \
  93. setup.py install \
  94. --root=$RPM_BUILD_ROOT \
  95. --prefix=%{l_prefix}
  96. ) || exit $?
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT