ghostscript.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ##
  2. ## ghostscript.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2001 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: ghostscript
  27. Summary: Ghostscript, Postscript and PDF Rendering Engine
  28. URL: http://www.cs.wisc.edu/~ghost/
  29. Vendor: Aladdin Enterprises
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Graphics
  33. License: Aladdin
  34. Version: 6.50
  35. Release: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}.tar.bz2
  38. Source1: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}jpeg.tar.gz
  39. Source2: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}libpng.tar.gz
  40. Source3: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-%{version}zlib.tar.gz
  41. Source4: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-fonts-std-6.0.tar.gz
  42. Source5: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/ghostscript-fonts-other-6.0.tar.gz
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20011126.0, gcc
  47. PreReq: OpenPKG, openpkg >= 20011126.0
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Ghostscript is an interpreter for the PostScript language and for
  52. PDF.
  53. %prep
  54. %setup0 -q -c
  55. %setup1 -q -T -D -a 1
  56. %setup2 -q -T -D -a 2
  57. %setup3 -q -T -D -a 3
  58. %setup4 -q -T -D -a 4
  59. %setup5 -q -T -D -a 5
  60. mv jpeg-6b gs%{version}/jpeg
  61. mv libpng-1.0.8 gs%{version}/libpng
  62. mv zlib-1.1.3 gs%{version}/zlib
  63. %build
  64. mtcflags=""
  65. mtldflags=""
  66. case "%{l_target}" in
  67. *-freebsd* ) mtcflags=""; mtldflags="-lc_r" ;;
  68. *-linux* ) mtcflags=""; mtldflags="-lpthread" ;;
  69. *-solaris* ) mtcflags=""; mtldflags="-lpthread" ;;
  70. esac
  71. cd gs%{version}
  72. %{l_rpmtool} subst \
  73. "s;^STDLIBS=-lpthread -lm;STDLIBS=$mtldflags -lm;" \
  74. "s;^prefix = /usr/local;prefix = %{l_prefix};" \
  75. "s;CC=gcc;CC=%{l_cc};" \
  76. "s;GCFLAGS=.*(-f.*)\$;GCFLAGS=\$1;" \
  77. "s;XCFLAGS=.*\$;XCFLAGS=$mtcflags;" \
  78. -- src/unix-gcc.mak
  79. %{l_make} %{l_mflags} -f src/unix-gcc.mak DEVICE_DEVS=""
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. ( cd gs%{version}
  83. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  84. %{l_make} %{l_mflags} -f src/unix-gcc.mak install DEVICE_DEVS="" \
  85. prefix=$RPM_BUILD_ROOT%{l_prefix}
  86. )
  87. %{l_shtool} mkdir -f -p -m 755 \
  88. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts
  89. %{l_shtool} install -c fonts/* \
  90. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts/
  91. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT