chroma.spec 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ##
  2. ## chroma.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_opkg 20171106
  25. %define V_dist 20171106
  26. # package information
  27. Name: chroma
  28. Summary: Syntax Highlighter
  29. URL: https://github.com/alecthomas/chroma
  30. Vendor: Alec Thomas
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Typesetting
  35. License: MIT
  36. Version: %{V_opkg}
  37. Release: 20171106
  38. # list of sources
  39. Source0: http://download.openpkg.org/components/versioned/chroma/chroma-%{V_dist}.tar.xz
  40. # build information
  41. BuildPreReq: OpenPKG, openpkg >= 20160101, go
  42. PreReq: OpenPKG, openpkg >= 20160101
  43. %description
  44. Chroma is a general purpose syntax highlighter. Chroma takes
  45. source code and other structured text and converts it into syntax
  46. highlighted HTML, ANSI-coloured text, etc. Chroma is based heavily
  47. on Pygments, and includes translaters for Pygments lexers and
  48. styles.
  49. %track
  50. prog chroma = {
  51. version = %{version}
  52. url = http://download.openpkg.org/components/versioned/chroma/
  53. regex = chroma-(__VER__)\.tar\.xz
  54. }
  55. %prep
  56. %setup -q -n chroma
  57. %build
  58. # build program
  59. export GOPATH=`pwd`
  60. go build -x -o chroma src/github.com/alecthomas/chroma/cmd/chroma/main.go
  61. %install
  62. # install program
  63. %{l_shtool} mkdir -f -p -m 755 \
  64. $RPM_BUILD_ROOT%{l_prefix}/bin
  65. %{l_shtool} install -c -s -m 755 \
  66. chroma $RPM_BUILD_ROOT%{l_prefix}/bin/
  67. # determine installation files
  68. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  69. %files -f files
  70. %clean