jargon.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ##
  2. ## jargon.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: jargon
  27. Summary: The New Hacker's Dictionary aka Jargon File
  28. URL: http://tuxedo.org/~esr/jargon/
  29. Vendor: Eric S. Raymond
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: Misc
  33. License: PD
  34. Version: 4.3.3
  35. Release: 20030114
  36. # list of sources
  37. Source0: http://tuxedo.org/~esr/jargon/jargon-%{version}.tar.gz
  38. Source1: http://www.tf.hut.fi/~krisku/soft/jarg.c
  39. Source2: jargon.sh
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20021218
  44. PreReq: OpenPKG, openpkg >= 20021218, w3m
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The New Hacker's Dictionary aka "Jargon File" is a comprehensive
  49. compendium of hacker slang illuminating many aspects of hackish
  50. tradition, folklore, and humor.
  51. %prep
  52. %setup -q
  53. cp %{SOURCE jarg.c} .
  54. %{l_gzip} -d -c jarg[0-9]*.gz >jargon.txt
  55. %build
  56. # pre-build jargon tool for local index generation
  57. %{l_shtool} subst \
  58. -e 's;/usr/local/lib/jarg\.idx;jargon.idx;' \
  59. jarg.c
  60. %{l_cc} %{l_cflags -O} %{l_cppflags} \
  61. -o jarg jarg.c %{l_ldflags}
  62. # create index file
  63. txt="`pwd`/jargon.txt"
  64. ./jarg -i $txt
  65. %{l_shtool} subst \
  66. -e "s;^$txt=;%{l_prefix}/share/jargon/jargon.txt=;" \
  67. jargon.idx
  68. # build jargon tool for remote final searching
  69. %{l_shtool} subst \
  70. -e 's;jargon\.idx;%{l_prefix}/share/jargon/jargon.idx;' \
  71. jarg.c
  72. %{l_cc} %{l_cflags -O} %{l_cppflags} \
  73. -o jarg jarg.c %{l_ldflags}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/bin \
  78. $RPM_BUILD_ROOT%{l_prefix}/libexec/jargon \
  79. $RPM_BUILD_ROOT%{l_prefix}/share/jargon
  80. %{l_shtool} install -c -m 755 \
  81. -e 's;@l_prefix@;%{l_prefix};g' \
  82. %{SOURCE jargon.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/jargon
  83. %{l_shtool} install -c -s -m 755 \
  84. jarg $RPM_BUILD_ROOT%{l_prefix}/libexec/jargon/
  85. %{l_shtool} install -c -m 644 \
  86. jargon.idx jargon.txt jargon.html \
  87. $RPM_BUILD_ROOT%{l_prefix}/share/jargon/
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT