ghostscript-esp.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. ##
  2. ## ghostscript-esp.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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_espgs 7.07.1
  27. %define V_fonts 6.0
  28. # package information
  29. Name: ghostscript-esp
  30. Summary: ESP Ghostscript, Postscript and PDF Rendering Engine
  31. URL: http://sourceforge.net/projects/espgs/
  32. Vendor: Easy Software Products
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: EVAL
  36. Group: Graphics
  37. License: GPL
  38. Version: %{V_espgs}
  39. Release: 20040715
  40. # package options
  41. %option with_cups no
  42. # list of sources
  43. Source0: http://osdn.dl.sourceforge.net/sourceforge/espgs/espgs-%{V_espgs}-source.tar.bz2
  44. Source1: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/fonts/gnu-gs-fonts-std-%{V_fonts}.tar.gz
  45. Source2: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/fonts/gnu-gs-fonts-other-%{V_fonts}.tar.gz
  46. Patch0: ghostscript-esp.patch
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, make, gcc
  51. BuildPreReq: glib, zlib, jpeg, png
  52. %if "%{with_cups}" == "yes"
  53. BuildPreReq: cups
  54. %endif
  55. PreReq: OpenPKG, openpkg >= 20040130, X11
  56. PreReq: glib, zlib, jpeg, png
  57. %if "%{with_cups}" == "yes"
  58. PreReq: cups
  59. %endif
  60. AutoReq: no
  61. AutoReqProv: no
  62. %description
  63. ESP Ghostscript is an enhanced version of GNU Ghostscript that
  64. includes new printer drivers and support for the Common Unix
  65. Printing System.
  66. %track
  67. prog ghostscript-esp = {
  68. version = %{version}
  69. url = http://prdownloads.sourceforge.net/espgs/
  70. regex = espgs-(\d+\.\d+\.\d+)-source\.tar\.bz2
  71. }
  72. prog ghostscript-esp:gnu-gs-fonts-other = {
  73. version = %{V_fonts}
  74. url = ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/fonts/
  75. regex = gnu-gs-fonts-other-(__VER__)\.tar\.gz
  76. }
  77. prog ghostscript-esp:gnu-gs-fonts-std = {
  78. version = %{V_fonts}
  79. url = ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/fonts/
  80. regex = gnu-gs-fonts-std-(__VER__)\.tar\.gz
  81. }
  82. %prep
  83. %setup -q -n espgs-%{V_espgs}
  84. %setup -q -n espgs-%{V_espgs} -T -D -a 1
  85. %setup -q -n espgs-%{V_espgs} -T -D -a 2
  86. %patch -p0
  87. %build
  88. CUPSCONFIG="%{l_prefix}/bin/cups-config" \
  89. GLIB_CONFIG="%{l_prefix}/bin/glib-config" \
  90. CC="%{l_cc}" \
  91. CXX="%{l_cxx}" \
  92. CFLAGS="%{l_cflags -O} %{l_cppflags}" \
  93. CXXFLAGS="%{l_cxxflags -O} %{l_cppflags}" \
  94. CPPFLAGS="%{l_cppflags}" \
  95. LDFLAGS="%{l_ldflags}" \
  96. ./configure \
  97. --prefix=%{l_prefix} \
  98. --with-x \
  99. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  100. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  101. --with-fontpath=%{l_prefix}/share/ghostscript/fonts \
  102. %if "%{with_cups}" == "yes"
  103. --enable-cups \
  104. %else
  105. --disable-cups \
  106. %endif
  107. --without-gimp-print \
  108. --with-ijs
  109. %{l_make} %{l_mflags}
  110. %install
  111. rm -rf $RPM_BUILD_ROOT
  112. # adjust paths for installation
  113. %{l_shtool} subst -s \
  114. -e "s;^\(prefix =\) \(.*\)$;\1 $RPM_BUILD_ROOT\2;" \
  115. -e "s;^\(datadir =\) \(.*\)$;\1 $RPM_BUILD_ROOT\2;" \
  116. Makefile
  117. %{l_shtool} subst -s \
  118. -e "s;^\(CUPSSERVER=\)[ ]*\(.*\)$;\1$RPM_BUILD_ROOT\2;" \
  119. -e "s;^\(CUPSCONFIG=\)[ ]*\(.*\)$;\1$RPM_BUILD_ROOT\2;" \
  120. pstoraster/cups.mak
  121. # perform installation
  122. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  123. %{l_shtool} mkdir -f -p -m 755 \
  124. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts
  125. %{l_shtool} install -c -m 644 \
  126. fonts/* \
  127. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts/
  128. # strip installation
  129. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/de || true
  130. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pv.sh
  131. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/fixmswrd.pl
  132. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/unix-lpr.sh
  133. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pj-gs.sh
  134. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/sysvlp.sh
  135. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/lprsetup.sh
  136. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  137. # generate file list
  138. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  139. '%not %dir %{l_prefix}/libexec/cups/filter' \
  140. '%not %dir %{l_prefix}/libexec/cups' \
  141. '%not %dir %{l_prefix}/libexec'
  142. %files -f files
  143. %clean
  144. rm -rf $RPM_BUILD_ROOT