uglifyjs.spec 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ##
  2. ## uglifyjs.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2021 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_uglifyjs 3.13.3
  25. %define V_uglifyjs_snap 20210329
  26. # package information
  27. Name: uglifyjs
  28. Summary: JavaScript Parser/Compressor/Beautifier
  29. URL: http://lisperator.net/uglifyjs/
  30. Vendor: Mihai Bazon
  31. Packager: OpenPKG Project
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Language
  35. License: BSD
  36. Version: %{V_uglifyjs}
  37. Release: 20210329
  38. # list of sources
  39. Source0: http://download.openpkg.org/components/versioned/uglifyjs/uglifyjs-%{V_uglifyjs}-%{V_uglifyjs_snap}.tar.gz
  40. Source1: uglifyjs.sh
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101, node-openpkg, discount, w3m
  43. PreReq: OpenPKG, openpkg >= 20160101, node
  44. %description
  45. UglifyJS is a JavaScript parser/compressor/beautifier running on the
  46. NodeJS engine.
  47. %track
  48. prog uglifyjs = {
  49. version = %{version}
  50. url = https://github.com/mishoo/UglifyJS2/releases
  51. regex = v(__VER__)\.tar\.gz
  52. }
  53. %prep
  54. %setup -q -c
  55. %build
  56. ( cd node_modules/uglify-js
  57. mkd2html README.md
  58. HOME=`pwd` w3m -dump README.html >uglifyjs.1
  59. ) || exit $?
  60. %{l_prefix}/bin/node-openpkg squeeze
  61. %install
  62. %{l_shtool} mkdir -f -p -m 755 \
  63. $RPM_BUILD_ROOT%{l_prefix}/bin \
  64. $RPM_BUILD_ROOT%{l_prefix}/lib/uglifyjs \
  65. $RPM_BUILD_ROOT%{l_prefix}/man/cat1
  66. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  67. %{SOURCE uglifyjs.sh} \
  68. $RPM_BUILD_ROOT%{l_prefix}/bin/uglifyjs
  69. %{l_shtool} install -c -m 644 \
  70. node_modules/uglify-js/uglifyjs.1 $RPM_BUILD_ROOT%{l_prefix}/man/cat1/
  71. %{l_prefix}/bin/node-openpkg install \
  72. %{l_prefix}/lib/uglifyjs/
  73. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  74. %files -f files
  75. %clean