haxe.spec 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ##
  2. ## haxe.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 version
  24. %define V_release 2.0
  25. %define V_snapshot 20080728
  26. # package information
  27. Name: haxe
  28. Summary: Haxe Programming Language
  29. URL: http://haxe.org/
  30. Vendor: Nicolas Cannasse, Motion Twin
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Language
  35. License: GPL/BSD
  36. Version: %{V_release}.%{V_snapshot}
  37. Release: 20080728
  38. # list of sources
  39. Source0: ftp://ftp.openpkg.org/sources/CPY/haxe/haxe-%{V_snapshot}.tar.bz2
  40. Source1: haxe.sh
  41. Source2: haxe.vim
  42. Patch0: haxe.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20060823, ocaml
  47. PreReq: OpenPKG, openpkg >= 20060823
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. haXe (pronounced as hex) is a multi-platform programming language,
  52. which can be compiled to Javascript, Flash, NekoVM and PHP.
  53. %track
  54. prog haxe = {
  55. version = %{V_release}
  56. url = http://haxe.org/download
  57. regex = haxe-(__VER__)-linux\.tar\.gz
  58. }
  59. %prep
  60. %setup -q -n haxe
  61. %patch -p0
  62. %build
  63. %{l_shtool} subst \
  64. -e 's%"/usr/lib/libz.dylib".*"/lib/libz.so.1"%"%{l_prefix}/lib/libz.a"%' \
  65. haxe/doc/install.ml
  66. %{l_prefix}/bin/ocaml haxe/doc/install.ml
  67. %install
  68. rm -rf $RPM_BUILD_ROOT
  69. %{l_shtool} mkdir -f -p -m 755 \
  70. $RPM_BUILD_ROOT%{l_prefix}/bin \
  71. $RPM_BUILD_ROOT%{l_prefix}/libexec/haxe \
  72. $RPM_BUILD_ROOT%{l_prefix}/lib/haxe \
  73. $RPM_BUILD_ROOT%{l_prefix}/share/vim/syntax
  74. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  75. %{SOURCE haxe.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/haxe
  76. %{l_shtool} install -c -s -m 755 \
  77. bin/haxe $RPM_BUILD_ROOT%{l_prefix}/libexec/haxe/
  78. find haxe/std -name CVS -type d -print | xargs rm -rf
  79. cp -rp haxe/std/* $RPM_BUILD_ROOT%{l_prefix}/lib/haxe/
  80. %{l_shtool} install -c -m 644 \
  81. %{SOURCE haxe.vim} $RPM_BUILD_ROOT%{l_prefix}/share/vim/syntax/
  82. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  83. %files -f files
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT