sweetjs.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ##
  2. ## sweetjs.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2014 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_sweetjs 0.7.1
  25. %define V_sweetjs_snap 20140929
  26. # package information
  27. Name: sweetjs
  28. Summary: JavaScript Macro Language
  29. URL: http://sweetjs.org/
  30. Vendor: Mozilla
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Language
  35. License: BSD
  36. Version: %{V_sweetjs}
  37. Release: 20140929
  38. # list of sources
  39. Source0: http://download.openpkg.org/components/versioned/sweetjs/sweetjs-%{V_sweetjs}-%{V_sweetjs_snap}.tar.gz
  40. Source1: sjs.sh
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20100101
  43. PreReq: OpenPKG, openpkg >= 20100101, node
  44. %description
  45. Sweet.js brings hygienic macros from languages like Scheme and Rust
  46. to JavaScript. Macros allow you to sweeten the syntax of JavaScript
  47. and craft the language you've always wanted.
  48. %track
  49. prog sweetjs = {
  50. version = %{V_sweetjs}-%{V_sweetjs_snap}
  51. url = http://download.openpkg.org/components/versioned/sweetjs/
  52. regex = sweetjs-(__VER__-\d+)\.tar\.gz
  53. }
  54. %prep
  55. %setup -q -c
  56. %build
  57. %install
  58. %{l_shtool} mkdir -f -p -m 755 \
  59. $RPM_BUILD_ROOT%{l_prefix}/bin \
  60. $RPM_BUILD_ROOT%{l_prefix}/lib/sweetjs
  61. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  62. %{SOURCE sjs.sh} \
  63. $RPM_BUILD_ROOT%{l_prefix}/bin/sjs
  64. ( cd node_modules/sweet.js
  65. cp -rp \
  66. bin lib node_modules package.json macros \
  67. $RPM_BUILD_ROOT%{l_prefix}/lib/sweetjs/
  68. ) || exit $?
  69. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  70. %files -f files
  71. %clean