ghostscript.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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: 20011121.0
  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-20011025.0, gcc
  46. PreReq: OpenPKG, openpkg >= 0.9-20011025.0
  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. mtcflags=""
  64. mtldflags=""
  65. case "%{l_target}" in
  66. *-freebsd* ) mtcflags=""; mtldflags="-lc_r" ;;
  67. *-linux* ) mtcflags=""; mtldflags="-lpthread" ;;
  68. *-solaris* ) mtcflags=""; mtldflags="-lpthread" ;;
  69. esac
  70. cd gs%{version}
  71. %{l_rpmtool} subst \
  72. "s;^STDLIBS=-lpthread -lm;STDLIBS=$mtldflags -lm;" \
  73. "s;^prefix = /usr/local;prefix = %{l_prefix};" \
  74. "s;CC=gcc;CC=%{l_cc};" \
  75. "s;GCFLAGS=.*(-f.*)\$;GCFLAGS=\$1;" \
  76. "s;XCFLAGS=.*\$;XCFLAGS=$mtcflags;" \
  77. -- src/unix-gcc.mak
  78. %{l_make} %{l_mflags} -f src/unix-gcc.mak DEVICE_DEVS=""
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. ( cd gs%{version}
  82. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  83. %{l_make} %{l_mflags} -f src/unix-gcc.mak install DEVICE_DEVS="" \
  84. prefix=$RPM_BUILD_ROOT%{l_prefix}
  85. )
  86. %{l_shtool} mkdir -f -p -m 755 \
  87. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts
  88. %{l_shtool} install -c fonts/* \
  89. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts/
  90. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  91. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT