gv.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ##
  2. ## gv.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: gv
  27. Summary: User Interface for Ghostscript
  28. URL: http://wwwthep.physik.uni-mainz.de/~plass/gv/
  29. Vendor: Johannes Plass
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: XWindow
  33. License: GPL
  34. Version: 3.5.8
  35. Release: 20021017
  36. # list of sources
  37. Source0: ftp://ftpthep.physik.uni-mainz.de/pub/gv/unix/gv-%{version}.tar.gz
  38. Source1: gv.sh
  39. Patch0: gv.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20020206, X11, xaw3d, ghostscript
  44. PreReq: OpenPKG, openpkg >= 20020206, X11, xaw3d, ghostscript
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The gv program allows for PostScript and PDF document viewing and
  49. nagivating on an X display. It essentially provides a user
  50. interface for the ghostscript interpreter in which gv depends.
  51. Please note that gv is derived from Tim Theisen's ghostview
  52. version 1.5.
  53. %prep
  54. %setup -q
  55. %patch -p1
  56. %build
  57. # workaround problems with macros on #include commands
  58. %{l_shtool} subst \
  59. -e 's;\(include[ ]*\)INC_X11(\([^)]*\));\1<X11/\2>;g' \
  60. -e 's;\(include[ ]*\)INC_XMU(\([^)]*\));\1<X11/Xmu/\2>;g' \
  61. -e 's;\(include[ ]*\)INC_XAW(\([^)]*\));\1<X11/Xaw3d/\2>;g' \
  62. `find . -name "*.[ch]" -print`
  63. # workaround trouble with manpage building
  64. cp doc/gv.man source/gv.man
  65. # make sure OpenPKG Xaw3d is found
  66. %{l_shtool} subst \
  67. -e 's;^\(DEFINES[ ]*=\)\(.*\);\1 -I%{l_prefix}/include \2;' \
  68. source/Imakefile
  69. # generate Makefiles and build gv
  70. PATH=$PATH:`%{l_prefix}/etc/rc --query x11_bindir`
  71. xmkmf -a
  72. %{l_make} %{l_mflags}
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. # create hierarchy
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/bin \
  78. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  79. $RPM_BUILD_ROOT%{l_prefix}/libexec/gv \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/gv
  81. # install gv
  82. %{l_shtool} install -c -s -m 755 \
  83. source/gv $RPM_BUILD_ROOT%{l_prefix}/libexec/gv/
  84. # install manpages
  85. %{l_shtool} install -c -m 644 \
  86. doc/gv.man $RPM_BUILD_ROOT%{l_prefix}/man/man1/gv.1
  87. # install application resource
  88. %{l_shtool} install -c -m 644 \
  89. -e 's;\(:[ ]*\)\(gs\);\1%{l_prefix}/bin/\2;' \
  90. source/GV.ad $RPM_BUILD_ROOT%{l_prefix}/share/gv/GV.ad
  91. # install executable wrapper
  92. %{l_shtool} install -c -m 755 \
  93. -e 's;@l_prefix@;%{l_prefix};g' \
  94. %{SOURCE gv.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/gv
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT