yarn.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ##
  2. ## yarn.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2017 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_yarn 0.27.0
  25. %define V_yarn_snap 20170623
  26. # package information
  27. Name: yarn
  28. Summary: NPM-Compatible Package Manager
  29. URL: http://yarnpkg.com/
  30. Vendor: Facebook
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Archiver
  35. License: MIT
  36. Version: %{V_yarn}.%{V_yarn_snap}
  37. Release: 20170623
  38. # list of sources
  39. Source0: http://download.openpkg.org/components/versioned/yarn/yarn-%{V_yarn}-%{V_yarn_snap}.tar.gz
  40. Source1: yarn.sh
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101, node-openpkg
  43. PreReq: OpenPKG, openpkg >= 20160101, node
  44. %description
  45. Yarn is (the client side of) a package manager for JavaScript. It
  46. caches every package it downloads, so it never needs to again. It
  47. also parallelizes operations to maximize resource utilization so
  48. install times are faster than ever. Yarn is compatible with (the
  49. server/registry side of) NPM and Bower.
  50. %track
  51. prog yarn = {
  52. version = %{V_yarn}
  53. url = https://github.com/yarnpkg/yarn/releases
  54. regex = v(\d+\.\d+\.\d+)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q -c
  58. %build
  59. # %{l_prefix}/bin/node-openpkg squeeze -I "**/*license*.js"
  60. %install
  61. %{l_shtool} mkdir -f -p -m 755 \
  62. $RPM_BUILD_ROOT%{l_prefix}/bin \
  63. $RPM_BUILD_ROOT%{l_prefix}/lib/yarn
  64. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  65. %{SOURCE yarn.sh} \
  66. $RPM_BUILD_ROOT%{l_prefix}/bin/yarn
  67. %{l_prefix}/bin/node-openpkg install \
  68. %{l_prefix}/lib/yarn/
  69. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  70. %files -f files
  71. %clean