ghostscript.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ##
  2. ## ghostscript.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: ghostscript
  26. Summary: Ghostscript, Postscript and PDF Rendering Engine
  27. URL: http://www.cs.wisc.edu/~ghost/
  28. Vendor: Aladdin Enterprises
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: Graphics
  32. License: Aladdin
  33. Version: 6.50
  34. Release: 2
  35. # list of sources
  36. Source0: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}.tar.bz2
  37. Source1: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}jpeg.tar.gz
  38. Source2: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}libpng.tar.gz
  39. Source3: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}zlib.tar.gz
  40. Source4: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-fonts-std-6.0.tar.gz
  41. Source5: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-fonts-other-6.0.tar.gz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 0.9-33
  46. PreReq: OpenPKG, openpkg >= 0.9-33
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Ghostscript is an interpreter for the PostScript language and for
  51. PDF.
  52. %prep
  53. %setup0 -q -c
  54. %setup1 -q -T -D -a 1
  55. %setup2 -q -T -D -a 2
  56. %setup3 -q -T -D -a 3
  57. %setup4 -q -T -D -a 4
  58. %setup5 -q -T -D -a 5
  59. mv jpeg-6b gs%{version}/jpeg
  60. mv libpng-1.0.8 gs%{version}/libpng
  61. mv zlib-1.1.3 gs%{version}/zlib
  62. %build
  63. cd gs%{version}
  64. %{l_rpmtool} subst \
  65. "s;^STDLIBS=-lpthread -lm;STDLIBS=-lc_r -lm;" \
  66. "s;^prefix = /usr/local;prefix = %{l_prefix};" \
  67. "s;XINCLUDE=-I/usr/local/X/include;XINCLUDE=-I/usr/X11R6/include;" \
  68. "s;XLIBDIRS=-L/usr/X11/lib;XLIBDIRS=-L/usr/X11R6/lib;" \
  69. "s;CC=gcc;CC=%{l_cc};" \
  70. "s;GCFLAGS=.*(-f.*)\$;GCFLAGS=\$1;" \
  71. -- src/unix-gcc.mak
  72. %{l_make} %{l_mflags} -f src/unix-gcc.mak
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. ( cd gs%{version}
  76. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  77. %{l_make} %{l_mflags} -f src/unix-gcc.mak install \
  78. prefix=$RPM_BUILD_ROOT%{l_prefix}
  79. )
  80. %{l_shtool} mkdir -f -p -m 755 \
  81. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts
  82. %{l_shtool} install -c fonts/* \
  83. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts/
  84. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  86. %files -f files
  87. %clean
  88. rm -rf $RPM_BUILD_ROOT