typescript.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. ##
  2. ## typescript.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2022 OpenPKG Project <http://openpkg.org/>
  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_opkg 4.6.4
  25. %define V_typescript 4.6.4
  26. %define V_typescript_snap 20220429
  27. # package information
  28. Name: typescript
  29. Summary: TypeScript Language Compiler
  30. URL: http://www.typescriptlang.org/
  31. Vendor: Microsoft
  32. Packager: OpenPKG Project
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Language
  36. License: Apache
  37. Version: %{V_opkg}
  38. Release: 20220429
  39. # list of sources
  40. Source0: http://download.openpkg.org/components/versioned/typescript/typescript-%{V_typescript}-%{V_typescript_snap}.tar.gz
  41. Source1: tsc.sh
  42. # build information
  43. BuildPreReq: OpenPKG, openpkg >= 20160101, node-openpkg
  44. PreReq: OpenPKG, openpkg >= 20160101, node
  45. %description
  46. TypeScript is a type-safe superset of JavaScript that compiles down
  47. to plain JavaScript.
  48. %track
  49. prog typescript = {
  50. version = %{V_typescript}
  51. url = https://github.com/Microsoft/TypeScript/releases
  52. regex = (\d+\.\d+(?:\.\d+)?)\.tar\.gz
  53. }
  54. prog typescript:snapshot = {
  55. version = %{V_typescript_snap}
  56. url = http://download.openpkg.org/components/versioned/typescript/
  57. regex = typescript-__VER__-(\d+)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q -c
  61. %build
  62. %{l_prefix}/bin/node-openpkg squeeze -n "default:safe"
  63. %install
  64. %{l_shtool} mkdir -f -p -m 755 \
  65. $RPM_BUILD_ROOT%{l_prefix}/bin \
  66. $RPM_BUILD_ROOT%{l_prefix}/lib/typescript
  67. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  68. %{SOURCE tsc.sh} \
  69. $RPM_BUILD_ROOT%{l_prefix}/bin/tsc
  70. %{l_prefix}/bin/node-openpkg install \
  71. %{l_prefix}/lib/typescript/
  72. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  73. %files -f files
  74. %clean