ant.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## ant.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 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_real 1.6.4
  26. %define V_opkg 1.6.4
  27. # package information
  28. Name: ant
  29. Summary: A Java based build tool
  30. URL: http://ant.apache.org/
  31. Vendor: Apache Software Foundation
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: EVAL
  35. Group: Development
  36. License: Apache Software License
  37. Version: %{V_opkg}
  38. Release: 20050519
  39. # package options
  40. %option with_docs no
  41. # list of sources
  42. Source0: http://www.apache.org/dist/ant/binaries/apache-ant-%{V_real}-bin.tar.bz2
  43. Source1: ant.conf
  44. Source2: rc.ant
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130
  49. PreReq: OpenPKG, openpkg >= 20040130, JRE
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Apache Ant is a Java based build tool. In theory it is kind of like make
  54. without make's wrinkles. In practice it has its own wrinkles.
  55. %track
  56. prog ant = {
  57. version = %{version}
  58. url = http://www.apache.org/dist/ant/binaries/
  59. regex = apache-ant-(__VER__)-bin\.tar\.bz2
  60. }
  61. %prep
  62. %setup -q -n apache-ant-%{V_real}
  63. %build
  64. # Note that there is nothing to build since the Ant binary distribution
  65. # is used. The reason for that is that a Ant build would require other
  66. # tools which build procedures depend on Ant which leads to a chicken
  67. # and egg problem. But in the end this doesn't hurt very much since we
  68. # are talking about Java byte code and shell scripts which are portable
  69. # anyway.
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/bin \
  74. $RPM_BUILD_ROOT%{l_prefix}/etc/ant \
  75. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  76. $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib
  77. %{l_shtool} install -c -m 755 \
  78. -e 's;/etc/ant.conf;%{l_prefix}/etc/ant/ant.conf;' \
  79. -e 's;^\(ANT_LIB="\)[^"]*\("\);\1%{l_prefix}/libexec/ant/lib\2;' \
  80. bin/ant $RPM_BUILD_ROOT%{l_prefix}/bin/
  81. %{l_shtool} install -c -m 644 \
  82. lib/*.jar etc/*.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/
  83. %{l_shtool} install -c -m 644 \
  84. etc/*.xsl etc/checkstyle/*.xsl $RPM_BUILD_ROOT%{l_prefix}/etc/ant/
  85. %if "%{with_docs}" == "yes"
  86. rm docs/LICENSE*
  87. mv docs $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/
  88. %{l_shtool} install -m 644 welcome.html \
  89. $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/docs/
  90. %endif
  91. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  92. %{SOURCE ant.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/ant/
  93. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  94. %{SOURCE rc.ant} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  96. '%config %{l_prefix}/etc/ant/*.conf'
  97. %files -f files
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT