ghostscript.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ##
  2. ## ghostscript.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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 versions
  26. %define V_real 7.04
  27. %define V_mini 704
  28. %define V_font 6.0
  29. # package information
  30. Name: ghostscript
  31. Summary: Ghostscript, Postscript and PDF Rendering Engine
  32. URL: http://www.cs.wisc.edu/~ghost/
  33. Vendor: Aladdin Enterprises
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [BASE]
  36. Group: Graphics
  37. License: Aladdin
  38. Version: %{V_real}
  39. Release: 20020926
  40. # list of sources
  41. Source0: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs%{V_mini}/ghostscript-%{V_real}.tar.bz2
  42. Source1: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs%{V_mini}/jpegsrc.v6b.tar.gz
  43. Source2: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs%{V_mini}/libpng-1.2.1.tar.gz
  44. Source3: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs%{V_mini}/zlib-1.1.4.tar.gz
  45. Source4: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/fonts/ghostscript-fonts-std-%{V_font}.tar.gz
  46. Source5: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/fonts/ghostscript-fonts-other-%{V_font}.tar.gz
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20020206, gcc
  51. PreReq: OpenPKG, openpkg >= 20020206
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. Ghostscript is an interpreter for the PostScript language, with the ability to
  56. convert PostScript language files to many raster formats, view them on
  57. displays, and print them on printers that don't have PostScript
  58. language capability built in. It also works with Portable Document Format
  59. files (PDF), providing the same set of functionality as with PostScript.
  60. %prep
  61. %setup0 -q -c
  62. %setup1 -q -T -D -a 1
  63. %setup2 -q -T -D -a 2
  64. %setup3 -q -T -D -a 3
  65. %setup4 -q -T -D -a 4
  66. %setup5 -q -T -D -a 5
  67. mv jpeg-6b gs%{version}/jpeg
  68. mv libpng-1.2.1 gs%{version}/libpng
  69. mv zlib-1.1.4 gs%{version}/zlib
  70. %build
  71. mtcflags=""
  72. mtldflags=""
  73. case "%{l_target}" in
  74. *-freebsd* ) mtcflags=""; mtldflags="-lc_r" ;;
  75. *-linux* ) mtcflags=""; mtldflags="-lpthread" ;;
  76. *-solaris* ) mtcflags=""; mtldflags="-lpthread" ;;
  77. esac
  78. cd gs%{version}
  79. %{l_shtool} subst \
  80. -e "s;^STDLIBS=-lpthread -lm;STDLIBS=$mtldflags -lm;" \
  81. -e "s;^prefix = /usr/local;prefix = %{l_prefix};" \
  82. -e "s;CC=gcc;CC=%{l_cc};" \
  83. -e "s;GCFLAGS=.*(-f.*)\$;GCFLAGS=\$1;" \
  84. -e "s;XCFLAGS=.*\$;XCFLAGS=$mtcflags;" \
  85. src/unix-gcc.mak
  86. %{l_make} %{l_mflags} -f src/unix-gcc.mak DEVICE_DEVS=""
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. ( cd gs%{version}
  90. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  91. %{l_make} %{l_mflags} -f src/unix-gcc.mak install DEVICE_DEVS="" \
  92. prefix=$RPM_BUILD_ROOT%{l_prefix}
  93. )
  94. %{l_shtool} mkdir -f -p -m 755 \
  95. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts
  96. %{l_shtool} install -c fonts/* \
  97. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts/
  98. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/de
  99. for man in eps2eps.1 gsbj.1 gsdj.1 gslj.1 gsdj500.1 ps2pdf12.1 ps2pdf13.1; do
  100. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man1/$man
  101. done
  102. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  103. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  104. %files -f files
  105. %clean
  106. rm -rf $RPM_BUILD_ROOT