ghostscript.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ##
  2. ## ghostscript.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2016 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package versions
  24. %define V_real 9.20
  25. %define V_comp 920
  26. %define V_font_std 8.11
  27. %define V_font_other 6.0
  28. # package information
  29. Name: ghostscript
  30. Summary: Ghostscript, Postscript and PDF Rendering Engine
  31. URL: http://ghostscript.com/
  32. Vendor: Aladdin Enterprises
  33. Packager: OpenPKG Foundation e.V.
  34. Distribution: OpenPKG Community
  35. Class: BASE
  36. Group: Postscript
  37. License: GPL
  38. Version: %{V_real}
  39. Release: 20160927
  40. # package options
  41. %option with_a4 yes
  42. # list of sources
  43. Source0: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%{V_comp}/ghostscript-%{V_real}.tar.gz
  44. Source1: http://download.sourceforge.net/gs-fonts/ghostscript-fonts-std-%{V_font_std}.tar.gz
  45. Source2: http://download.sourceforge.net/gs-fonts/ghostscript-fonts-other-%{V_font_other}.tar.gz
  46. Patch0: ghostscript.patch
  47. # build information
  48. BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, make
  49. PreReq: OpenPKG, openpkg >= 20160101
  50. BuildPreReq: libiconv, libidn, png, zlib, freetype, jpeg, openjpeg, lcms
  51. PreReq: libiconv, libidn, png, zlib, freetype, jpeg, openjpeg, lcms
  52. %description
  53. Ghostscript is an interpreter for the PostScript language, with the
  54. ability to convert PostScript language files to many raster formats,
  55. view them on displays, and print them on printers that don't have
  56. PostScript language capability built in. It also works with Portable
  57. Document Format files (PDF), providing the same set of functionality
  58. as with PostScript.
  59. %track
  60. prog ghostscript = {
  61. version = %{version}
  62. url = http://www.ghostscript.com/download/gsdnld.html
  63. regex = ghostscript-(__VER__)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q -c
  67. %setup -q -T -D -a 1
  68. %setup -q -T -D -a 2
  69. %patch -p0 -d ghostscript-%{version}
  70. %build
  71. ( cd ghostscript-%{version}
  72. rm -rf libpng zlib freetype lcms2 jpeg openjpeg tiff
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CPPFLAGS="%{l_cppflags tiff .}" \
  76. LDFLAGS="%{l_ldflags}" \
  77. ./configure \
  78. --prefix=%{l_prefix} \
  79. --mandir=%{l_prefix}/man \
  80. --with-fontpath=%{l_prefix}/share/ghostscript/fonts \
  81. --disable-cups \
  82. --disable-gtk \
  83. --with-libiconv=gnu \
  84. --with-libidn \
  85. --with-drivers=ALL
  86. %{l_make} %{l_mflags -O}
  87. ) || exit $?
  88. %install
  89. ( cd ghostscript-%{version}
  90. %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
  91. ) || exit $?
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts
  94. %{l_shtool} install -c fonts/* \
  95. $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/fonts/
  96. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/%{V_real}/doc
  97. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/ghostscript/%{V_real}/examples
  98. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/de
  99. for prg in eps2eps gsbj gsdj gslj gsdj500 ps2pdf12 ps2pdf13; do
  100. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$prg
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$prg.1
  102. done
  103. mv $RPM_BUILD_ROOT%{l_prefix}/bin/ps2pdf14 \
  104. $RPM_BUILD_ROOT%{l_prefix}/bin/ps2pdf
  105. for prg in fixmswrd.pl lprsetup.sh pj-gs.sh pv.sh sysvlp.sh unix-lpr.sh; do
  106. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$prg
  107. done
  108. for man in ansi2knr.1; do
  109. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$man
  110. done
  111. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  112. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  113. %files -f files
  114. %clean